Stabilize CI behavior (#796)

* reduce parallelism of builds and increase install.sh test setup buffer

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* change logging mechanism for signing

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* restore automatic parallelism determination for goreleaser

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* rm logging goreleaser version

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman 2022-02-07 10:55:11 -05:00 committed by GitHub
parent 1e338502ff
commit 950ad681a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 27 deletions

View File

@ -6,6 +6,7 @@ IS_SNAPSHOT="$1"
## grab utilities ## grab utilities
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. "$SCRIPT_DIR"/utils.sh . "$SCRIPT_DIR"/utils.sh
mkdir -p "$SCRIPT_DIR/log"
main() { main() {
@ -33,17 +34,13 @@ main() {
echo -n "$MAC_SIGNING_IDENTITY" > "$SCRIPT_DIR/$SIGNING_IDENTITY_FILENAME" echo -n "$MAC_SIGNING_IDENTITY" > "$SCRIPT_DIR/$SIGNING_IDENTITY_FILENAME"
} }
set +u # capture all output from a subshell to log output additionally to a file (as well as the terminal)
if [ -z "$SCRIPT" ] ( (
then set +u
if [ -n "$SKIP_SIGNING" ]; then
commentary "skipping signing setup..."
else
set -u set -u
# log all output main
mkdir -p "$SCRIPT_DIR/log" fi
/usr/bin/script "$SCRIPT_DIR/log/setup.txt" /bin/bash -c "$0 $*" ) 2>&1) | tee "$SCRIPT_DIR/log/setup.txt"
exit $?
elif [ -n "$SKIP_SIGNING" ]; then
commentary "skipping signing setup..."
else
set -u
main
fi

View File

@ -7,6 +7,7 @@ IS_SNAPSHOT="$2"
## grab utilities ## grab utilities
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. "$SCRIPT_DIR"/utils.sh . "$SCRIPT_DIR"/utils.sh
mkdir -p "$SCRIPT_DIR/log"
# sign_binary [binary-path] [signing-identity] # sign_binary [binary-path] [signing-identity]
@ -124,17 +125,13 @@ main() {
fi fi
} }
set +u # capture all output from a subshell to log output additionally to a file (as well as the terminal)
if [ -z "$SCRIPT" ] ( (
then set +u
if [ -n "$SKIP_SIGNING" ]; then
commentary "skipping signing setup..."
else
set -u set -u
# log all output main
mkdir -p "$SCRIPT_DIR/log" fi
/usr/bin/script "$SCRIPT_DIR/log/signing-$(basename $ARCHIVE_PATH).txt" /bin/bash -c "$0 $*" ) 2>&1) | tee "$SCRIPT_DIR/log/signing-$(basename $ARCHIVE_PATH).txt"
exit $?
elif [ -n "$SKIP_SIGNING" ]; then
commentary "skipping signing..."
else
set -u
main
fi

View File

@ -94,7 +94,7 @@ setup_snapshot_server() {
worker_pid=$! worker_pid=$!
# it takes some time for the server to be ready... # it takes some time for the server to be ready...
sleep 0.5 sleep 3
echo "$worker_pid" echo "$worker_pid"
} }