-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add an entrypoint to perform env setup #11
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
base: main
Are you sure you want to change the base?
Conversation
9417d82 to
46b4f6f
Compare
f4ca184 to
bdcbfc6
Compare
6859a9d to
18a273b
Compare
61e21c1 to
92c9e7c
Compare
| echo "Preparing Rust build environment" | ||
|
|
||
|
|
||
| if [ -n "${FRC_SSH_KEY}" ]; 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.
Can you clarify a bit why is this needed? Can we just mount ssh socket -v $SSH_AUTH_SOCK:/ssh.sock -e SSH_AUTH_SOCK=/ssh.sock?
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 was taken on from our existing scripts. I don't think GitHub sets up an ssh socket with a configured ssh key natively. The container is started before we start any jobs, so we can't set up a socket in the workflow before this is launched; if you know some way to do that with git workflows shout though!
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, and in docker-build action we set it up manually:
7fef141 to
a8f79a8
Compare
8917d0b to
f634a57
Compare
f634a57 to
f0265af
Compare
| ( | ||
| ssh-keyscan -H gitlab.com | ||
| ssh-keyscan -H github.com | ||
| ) >> "$SSH_HOME/.ssh/known_hosts" |
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.
can we move these to build stage? (into a RUN statement)
| color = 'always' | ||
| [net] | ||
| git-fetch-with-cli = true | ||
| EOF |
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.
can we just COPY or ADD this to the container? does it need to happen at runtime?
| echo "CARGO_HOME=${CARGO_HOME}" | ||
| echo "SSH_AUTH_SOCK=${SSH_AUTH_SOCK}" | ||
| ) >> "$GITHUB_ENV" | ||
| fi |
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.
how does this work? this script is run insede the container but GITHUB_ENV is host variable in ci
This is needed for the new test workflow. Everything this adds is inert unless you run the new workflow, so this shouldn't break anything (but it will increase image sizes).