-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve & rename main build-push script.
This script orchestrates running of the actual `build_push.sh` script, on behalf of various github containers-org repos. Rename it to better reflect that purpose. Change behavior WRT first argument (git repo. URL) to shallow-clone the repo into a temporary directory. Remove the auto-update library in anticipation of executing builds from Cirrus-cron in this (automation_images) repo. Given encrypted secrets are protected by execution context and actor. Update labeling to also annotate the images, since newer tooling prefers annotations but older tools only support labels. Remove wait-for-copr from build-push VM image since it's not needed. An alternate build system was put in place. Signed-off-by: Chris Evich <cevich@redhat.com>
- Loading branch information
Showing
8 changed files
with
158 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20230822t185743z-f38f37d13 | ||
20230918t183521z-f38f37d13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# This script is intended to be used from two places only: | ||
# 1) When building the build-push VM image, to install the scripts as-is | ||
# in a PR in order for CI testing to operate on them. | ||
# 2) From the autoupdate.sh script, when $BUILDPUSHAUTOUPDATED is unset | ||
# or '0'. This clones the latest repository to install (possibly) | ||
# updated scripts. | ||
# This script is intended to be run from a task using a pre-existing | ||
# build-push VM image (having an image-suffix from the IMG_SFX file). | ||
# It's purpose is to install the latest version of the scripts in the | ||
# `bin` directory onto the system. | ||
# | ||
# WARNING: Use under any other circumstances will probably screw things up. | ||
|
||
if [[ -z "$BUILDPUSHAUTOUPDATED" ]]; | ||
then | ||
echo "This script must only be run under Packer or autoupdate.sh" | ||
# Common automation library pre-installed into the build-push VM | ||
if [[ -r /etc/automation_environment ]]; then | ||
# Defines AUTOMATION_LIB_PATH and updates PATH | ||
source /etc/automation_environment | ||
source "$AUTOMATION_LIB_PATH/common_lib.sh" | ||
else | ||
echo "ERROR: The common automation library has not been installed." > /dev/stderr | ||
exit 1 | ||
fi | ||
|
||
source /etc/automation_environment | ||
source "$AUTOMATION_LIB_PATH/common_lib.sh" | ||
# Defined by common automation library | ||
# shellcheck disable=SC2154 | ||
cd $(dirname "${BASH_SOURCE[0]}") || exit 1 | ||
|
||
#shellcheck disable=SC2154 | ||
cd $(dirname "$SCRIPT_FILEPATH") || exit 1 | ||
# Must be installed into $AUTOMATION_LIB_PATH/../bin which is on $PATH | ||
cp ./bin/* $AUTOMATION_LIB_PATH/../bin/ | ||
cp ./lib/* $AUTOMATION_LIB_PATH/ | ||
chmod +x $AUTOMATION_LIB_PATH/../bin/* | ||
# Must be installed into $AUTOMATION_LIB_PATH/../bin which is also now on $PATH | ||
install -g root -o root -m 550 ./bin/* $AUTOMATION_LIB_PATH/../bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.