-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add more options to run custom scripts at multiple points in the build stages #50
base: main
Are you sure you want to change the base?
Conversation
@@ -124,19 +140,29 @@ RUN echo "pip install pip \\" >> $WORKSPACE/.install-dependencies.sh && \ | |||
fi && \ | |||
echo ";" >> $WORKSPACE/.install-dependencies.sh | |||
|
|||
# add custom installation commands to install script | |||
ARG CUSTOM_SCRIPT_FILE="docker/custom.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.
Should we rename CUSTOM_SCRIPT_FILE
?
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 would tend to keep the naming of the custom.sh
cat src/target/${CUSTOM_SCRIPT_FILE} >> $WORKSPACE/.install-dependencies.sh ; \ | ||
# add custom script to run after dependency installation to install script | ||
ARG AFTER_DEPENDENCY_INSTALLATION_SCRIPT="docker/after_dependency_installation.sh" | ||
ARG ENABLE_RECURSIVE_AFTER_DEPENDENCY_INSTALLATION_SCRIPT="false" |
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.
Do we need recursion for all variables?
@@ -12,21 +12,24 @@ variables: | |||
ADDITIONAL_DEBS_FILE: docker/additional-debs.txt # Relative filepath to file containing additional apt deb packages to install | |||
ADDITIONAL_FILES_DIR: docker/additional-files # Relative path to directory containing additional files to copy into image" | |||
ADDITIONAL_PIP_FILE: docker/additional-pip-requirements.txt # Relative filepath to file containing additional pip packages to install | |||
AFTER_DEPENDENCY_IDENTIFICATION_SCRIPT: docker/after_dependency_identification.sh # Relative filepath to script containing commands to run after dependency identification |
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 am not sure about this one. Whats the use case for this script?
BEFORE_DEPENDENCY_IDENTIFCATION_SCRIPT
: runs independencies
stage after basic setup, before .repos are clonedAFTER_DEPENDENCY_IDENTIFICATION_SCRIPT
: runs independencies
stage at the very endBEFORE_DEPENDENCY_INSTALLATION_SCRIPT
: runs independencies-install
stage as first step in.install-dependencies.sh
AFTER_DEPENDENCY_INSTALLATION_SCRIPT
: runs independencies-install
stage as last step in.install-dependencies.sh
CUSTOM_SCRIPT_FILE
effectively has been renamed toAFTER_DEPENDENCY_INSTALLATION_SCRIPT