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
ci: combine "define_env_vars" and "download_yarn" anchor #28788
Conversation
d4399da
to
cd147ea
Compare
cd147ea
to
a0dcb58
Compare
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.
The &download_yarn
anchor is no longer needed and should be removed.
command: ./.circleci/env.sh | ||
name: Initializing environment (setting up variables, downloading Yarn) | ||
command: | | ||
source ./.circleci/env.sh |
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.
Why do you need to source it now?
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's because we need the yarn version variable available in the current bash shell. The command after the env.sh
script depends on it.
Not sure if we want to add a comment for this. Should be quite clear IMO 😁
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.
I thought that PROFILE=$BASH_ENV
was sufficient. Fair enough then 😏
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.
😄 Yeah that PROFILE
variable is just used by the Yarn install script to update the $PATH
.
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.
We've gone back and forth between installing tooling during the run (slower) or building the right environment into the docker image (more maintenance)
I feel like the latter is the more principled thing but maybe not practical, up to you
With more work, we ought to be able to have both:
- change the Dockerfile, the CI picks that up and builds a new docker image for this build
- don't need to do any environment setup on each execution
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.
Yeah I'm personally a bigger fan of preparing a proper docker image. We should have a discussion about this in a follow-up as this should be something we need to figure out long-term.
As discussed in angular#28546 (comment), we want to combine the `define_env_vars` and `download_yarn` anchor since downloading Yarn depends on setting up the environment variables. In addition this simplifies our setup and reduces code-duplication.
a0dcb58
to
f577341
Compare
As discussed in #28546 (comment), we want to combine the `define_env_vars` and `download_yarn` anchor since downloading Yarn depends on setting up the environment variables. In addition this simplifies our setup and reduces code-duplication. PR Close #28788
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
As discussed in #28546 (comment), we want to combine the
define_env_vars
anddownload_yarn
anchor since downloading Yarn depends on setting up the environmentvariables. In addition this simplifies our setup and reduces code-duplication.