-
Notifications
You must be signed in to change notification settings - Fork 396
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
DT-598: Fixes #2722: ci.blt.yml not consistently applied. #3857
Conversation
@@ -7,7 +7,7 @@ export PATH=${COMPOSER_BIN}:${PATH} | |||
# Generate artifact in a separate directory. | |||
export NEW_BUILD_DIR=/tmp/artifact | |||
blt deploy:check-dirty --ansi --verbose | |||
blt artifact:build -D deploy.dir=${NEW_BUILD_DIR} --ansi --verbose | |||
blt artifact:build -D deploy.dir=${NEW_BUILD_DIR} --environment=ci --ansi --verbose |
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.
This is the second or third bug we've caught where this parameter was missing.
There are ways we could refactor this to avoid passing --environment=ci
every time, such as setting BLT_ENV=ci
as an environment variable once at the start of the script, or by incorporating EnvironmentDetector::isCiEnv()
into the DefaultConfig environment detection step. They aren't without risk though, and at any rate are beyond the scope of this PR.
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.
CI=true is present in most CI environments today. If not (looking at Jenkins, people can set it).
Why does blt have to act differently in CI vs on your machine ?
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.
Good point about the CI variable, we should key off of that. I created this followup issue: #3859
This ticket is itself a good example of why BLT needs to behave differently. System paths are different, available resources are different, you need different modules enabled, etc... In this particular case, the deploy directory is pretty special in Pipelines.
@@ -7,7 +7,7 @@ export PATH=${COMPOSER_BIN}:${PATH} | |||
# Generate artifact in a separate directory. | |||
export NEW_BUILD_DIR=/tmp/artifact | |||
blt deploy:check-dirty --ansi --verbose | |||
blt artifact:build -D deploy.dir=${NEW_BUILD_DIR} --ansi --verbose | |||
blt artifact:build -D deploy.dir=${NEW_BUILD_DIR} --environment=ci --ansi --verbose |
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.
CI=true is present in most CI environments today. If not (looking at Jenkins, people can set it).
Why does blt have to act differently in CI vs on your machine ?
Fixes #2722
Changes proposed
Steps to replicate the issue
post-deploy-build
command toci.blt.yml
, i.e.:Previous (bad) behavior, before applying PR
The post-deploy-build command is not run
Expected behavior, after applying PR and re-running test steps
The post-deploy-build command is run