-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update readme after_script -> after_deploy #2
base: main
Are you sure you want to change the base?
Update readme after_script -> after_deploy #2
Conversation
Issue with after_deploy is that only works for pipelines with deploy: key, the after script will work for those that use the script: block to also run deploy Maybe we can have both examples here with this mention |
@@ -10,6 +10,6 @@ deploy: | |||
provider: script | |||
script: echo deploying my app | |||
|
|||
after_script: | |||
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone https://github.com/searchmetrics/dd-deploy-metric.git ; bash dd-deploy-metric/dd-deploy-metric.sh; fi | |||
after_deploy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we report metrics only after the story is delivered to production ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shall be executed only when it's deployed to production.
In that case maybe it makes sense to clarify that the "deploy" phase shall be used only for production deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amalioadam only when its production
@sm-tomislav-civcija its should be after script and not after deploy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sm-tomislav-civcija should be after script
@@ -10,6 +10,6 @@ deploy: | |||
provider: script | |||
script: echo deploying my app | |||
|
|||
after_script: | |||
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git clone https://github.com/searchmetrics/dd-deploy-metric.git ; bash dd-deploy-metric/dd-deploy-metric.sh; fi | |||
after_deploy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amalioadam only when its production
@sm-tomislav-civcija its should be after script and not after deploy
Travis supports "after_deploy" step that is more appropriate for this use case than "after_script".
It is triggered only if deployment occurs, while after_script is triggered always so you have to put some IF (it reinvents the wheel)
https://docs.travis-ci.com/user/job-lifecycle/#the-job-lifecycle