Closed kwent closed 7 years ago
Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.
@bacongobbler, @mboersma and @Joshua-Anderson are potential reviewers of this pull request based on my analysis of git blame
information. Thanks @kwent!
I'm kind of concerned about adding new fields to the request, but as long as older versions of the client can still interact with the controller (i.e. false is defaulted when the field is not present in the request) then I'm fine with this. Our semver contract dictates that we maintain API backwards compatiblilty.
Jenkins, test this please.
@bacongobbler If you don't pass deploy_now
attribute to the POST /v2/apps/example-go/builds/
endpoint. It's defaulted to true
by default. So not changing the default behavior and maintaining backwards compatibility.
@kwent thanks for the PR! Will the additional code and workflow-cli PR(s) covering the TODOs mentioned in the description also be ready soon as well? I've added this to the 2.13 milestone currently scheduled for April 5th.
@vdice I did some work on it . (Updated description). But i might need some help. Not sure i covered everything that needs to be updated.
@kwent Great, thanks. I'll take a look at all of the PRs soon but in the meantime, when convenient, can you squash and rebase this into one commit, while also adding requires workflow-cli#296
somewhere in the git commit message like so? That way the e2e run should pick up/use the workflow-cli artifact as well...
Merging #1269 into master will decrease coverage by
0.03%
. The diff coverage is86.66%
.
@@ Coverage Diff @@
## master #1269 +/- ##
==========================================
- Coverage 87.29% 87.25% -0.04%
==========================================
Files 44 44
Lines 3887 3900 +13
Branches 675 676 +1
==========================================
+ Hits 3393 3403 +10
- Misses 326 329 +3
Partials 168 168
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 24675b5...71cff13. Read the comment docs.
@vdice Done.
Jenkins, test this please.
@vdice Jenkins failed with
Installing Workflow CLI version '37ede0d' via url 'https://storage.googleapis.com/workflow-cli-master/37ede0d/deis-37ede0d-linux-amd64'
17:17:05 curl: (22) The requested URL returned error: 404 Not Found
@kwent Ah yes -- we need to get the workflow-cli artifact building (and uploaded) from https://github.com/deis/controller-sdk-go/pull/118 -- encountering build errors currently; will comment on that ticket.
Jenkins, test this please.
E2E tests success! :tada: https://ci.deis.io/job/workflow-chart-e2e/1076/consoleFull
So this PR adds the idea of delaying the release... But after the release has been delayed, how does one deploy it with the CLI? Can you run me through the typical story on how one would use this feature? I see reference documentation on the API but nothing on how one would actually use this feature in the real world.
Essentially I'm looking for another section in https://deis.com/docs/workflow/applications/deploying-apps/ to flesh this feature out.
@bacongobbler
Here is my workflow story:
We have an Jenkins listening to our git push and doing the build for us. Output of this process is docker image. We don't want to deploy them now but we want deis to be aware of those builds and let the developer choose what release to deploy later on via deis deploy
/ deis releases:deploy
.
These PRs haven't been updated in a few months. @kwent I'm going to close this, but please re-open if you can address the remaining issues, and thanks again!
Deploy releases asynchronously
Requires https://github.com/deis/workflow/pull/776 Requires https://github.com/deis/workflow-cli/pull/296 Requires https://github.com/deis/controller-sdk-go/pull/118
Idea
This idea of this PR is too be able to create a build (which is creating a release) without deploying the release right away.
Solution implemented
This is possible via a
deploy_now
flag on the follow endpoint:A new endpoint allows us to deploy a release later on:
TODO
workflow
API docs. https://github.com/deis/workflow/pull/776workflow-cli
to showdeploy_now
column of build objects. https://github.com/deis/workflow-cli/pull/296workflow-cli
to showdeployed
column of release objects. https://github.com/deis/workflow-cli/pull/296controller-sdk-go
. https://github.com/deis/controller-sdk-go/pull/118Other idea
Another idea would be to implement a
Deploy
model/object/table and keep track of the deploys with the following attributesapp
,timestamp
,release
,who
,status
. This will introduce adeis deploys -a app
command as well.2 scenarios would be the following:
Scenario 1 (Default, Synchronous): When you push a build, it will always attempt to deploy and so create a deploy object with the release associated and the current status of the deployment.
Scenario 2 (Asynchronous): Otherwise in async mode just a build will be created and only a deploy object will be created if you call the endpoint to deploy the specific release.