Commit graph

13 commits

Author SHA1 Message Date
Grzegorz Bizon
785d5c8ed1 Create pipeline along with builds in the transation 2016-11-24 15:58:31 +01:00
Kamil Trzcinski
6a6a69f4af Use state machine for pipeline event processing 2016-08-11 21:32:16 +02:00
Kamil Trzcinski
39203f1adf Pre-create all builds for Pipeline when a trigger is received
This change simplifies a Pipeline processing by introducing a special new status: created.
This status is used for all builds that are created for a pipeline.
We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped).
This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled.
This also allows us to visualise a full pipeline (with created builds).

This also removes an after_touch used for updating a pipeline state parameters.
Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
2016-08-11 15:22:35 +02:00
Kamil Trzcinski
1556d4848d Track a user who created a pipeline 2016-07-15 17:42:27 +02:00
Grzegorz Bizon
ab9a8643d8 Merge branch 'master' into fix/status-of-pipeline-without-builds
* master: (538 commits)
  Fix broken URI joining for `teamcity_url` with suffixes
  Factorize duplicated code into a method in BambooService and update specs
  Fix broken URI joining for `bamboo_url` with suffixes
  Honor credentials on calling Bamboo CI trigger
  Update CHANGELOG
  Use Issue.visible_to_user in Notes.search to avoid query duplication
  Project members with guest role can't access confidential issues
  Allow users to create confidential issues in private projects
  Update CHANGELOG
  Remove deprecated issues_tracker and issues_tracker_id from project
  Schema doesn’t reflect the changes of the last 3 migrations
  Apply reviewer notes: update CHANGELOG, adjust code formatting
  Move issue rendering tests into separate contexts
  Move change description to proper release and fix typo
  Add more information into RSS fead for issues
  Revert CHANGELOG
  Also rename "find" in the specs
  Change to new Notes styleguide
  Add guide on changing a document's location
  Change logs.md location in README
  ...

Conflicts:
	app/services/ci/create_builds_service.rb
	app/services/ci/create_pipeline_service.rb
	app/services/create_commit_builds_service.rb
	spec/models/ci/commit_spec.rb
	spec/services/ci/create_builds_service_spec.rb
	spec/services/create_commit_builds_service_spec.rb
2016-06-14 13:44:03 +02:00
Kamil Trzcinski
c6bce7e63c Save Ci::Commit object to persist all created builds 2016-06-03 11:34:36 +02:00
Grzegorz Bizon
af2f56f8f7 Refactor ci commit pipeline to prevent implicit saves 2016-06-03 11:34:36 +02:00
Kamil Trzcinski
021d3810c3 Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipeline 2016-06-02 16:59:04 +02:00
Kamil Trzcinski
4f1c636831 Create pipeline objects with parameters 2016-05-18 17:01:42 -05:00
Kamil Trzcinski
ef60b8e168 Use pipelines.errors when communicating the error 2016-05-18 13:02:10 -05:00
Kamil Trzcinski
003526e2ee Add method new_pipeline 2016-05-14 19:47:16 -05:00
Kamil Trzcinski
0d43b92706 Fix CI tests 2016-05-12 13:08:18 -05:00
Kamil Trzcinski
fe2137d871 Improve pipelines design 2016-05-10 02:26:13 +03:00