Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update readme after_script -> after_deploy #2

wants to merge 3 commits into from

Conversation

sm-tomislav-civcija
Copy link

@sm-tomislav-civcija sm-tomislav-civcija commented Dec 28, 2020

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

@Maycon-Santos-sm
Copy link
Contributor

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

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:
Copy link
Contributor

@amalioadam amalioadam Dec 28, 2020

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 ?

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

@pmotwani pmotwani left a 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:
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants