diff --git a/pipeline.sh b/pipeline.sh index 12e24ffc..43280207 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -1,7 +1,12 @@ #!/bin/bash -ex EE=${EE:-false} -SNAPSHOT=${SNAPSHOT:-true} + +if [ -z "$SNAPSHOT" ]; then + SNAPSHOT_ARGUMENT="" +else + SNAPSHOT_ARGUMENT="--build-arg SNAPSHOT=${SNAPSHOT}" +fi # evaluate if the version argument must be passed if [ -z "$VERSION" ]; then @@ -21,6 +26,7 @@ docker buildx build . \ --build-arg PASSWORD=${NEXUS_PASS} \ --build-arg SNAPSHOT=${SNAPSHOT} \ ${VERSION_ARGUMENT} \ + ${SNAPSHOT_ARGUMENT} \ --cache-to type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ --cache-from type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ --load