Add CI utility scripts to the go build image from a versioned container - #907
Add CI utility scripts to the go build image from a versioned container#907RoryDoherty wants to merge 1 commit into
Conversation
905ffdb to
d9c7afe
Compare
| COPY scripts/checkout.sh /usr/local/bin/checkout | ||
| COPY scripts/setup-github-ssh.sh /usr/local/bin/setup-github-ssh | ||
| COPY scripts/create-local-secret.sh /usr/local/bin/create-local-secret | ||
| COPY --from=ci-scripts / /usr/local/bin/ |
There was a problem hiding this comment.
You can copy from /from-script-name to /usr/local/bin/to-script-name so no need to run ln later.
There was a problem hiding this comment.
the ln is to allow the script to be called with either name
The scripts that were removed are using kebab-case for the names whereas ArgoCI uses camelCase for the script names
I added the ln so that it doesn't break any existing CI that might be using the kebab-case method calls
There was a problem hiding this comment.
OK. It is better to do an explicit copy from the source to the target (like the lines you removed), rather than all files under / to /usr/local/bin. We don't want files or folders to get overwritten without realizing it. Being explicit will also make the build fail loudly if the source file doesn't exist.
| pcre-devel \ | ||
| pigz \ | ||
| pkg-config \ | ||
| sudo \ |
There was a problem hiding this comment.
The checkout script uses sudo to chmod on the checked out directory to give broader write permissions
https://github.com/tigera/cc-utils/blob/tsla-11651-pre/argoci-images/common-scripts/checkout#L34
we do support no-sudo as an option so if you would prefer I can remove this
Copies the scripts in from a versioned image instead of trying to keep the scripts updated in two locations at once