diff --git a/.github/workflows/.build-osx.yml b/.github/workflows/.build-osx.yml index 32b0b22d8d..ef366c4916 100644 --- a/.github/workflows/.build-osx.yml +++ b/.github/workflows/.build-osx.yml @@ -1,6 +1,6 @@ # Build the bes for the same architecture as OPeNDAP developer # machines, to ensure code changes won't break local development - +name: OSX CI on: # For now, run only on manually triggered builds (workflow_dispatch). # Uncomment the "push" and "pull_request" to build on all non-draft PRs diff --git a/.travis.yml b/.travis.yml index f467891507..f273f7dfd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -207,11 +207,15 @@ jobs: - export DIST=el8 - export OS=rocky8 - export BES_REPO_DIR=${TRAVIS_BUILD_DIR} - # Note: We use `source` instead of `bash` here so that we - # have downstream access to the environment variable - # `BUILD_VERSION_TAG` that must be exported AFTER the image + - ./travis/build-rhel-docker.sh + # Note: We need downstream access to the environment variable + # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: - - source ${TRAVIS_BUILD_DIR}/travis/build-rhel-docker.sh + - | + export BES_VERSION="$(docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'cat bes_VERSION')" + export BUILD_VERSION_TAG="opendap/${DOCKER_NAME}:${BES_VERSION}" + echo "Tagging image with BES version: ${BUILD_VERSION_TAG}" + docker tag ${SNAPSHOT_IMAGE_TAG} ${BUILD_VERSION_TAG} - stage: build-and-package name: "dist" diff --git a/travis/build-rhel-docker.sh b/travis/build-rhel-docker.sh old mode 100644 new mode 100755 index f5ce9cccb9..0750e476ef --- a/travis/build-rhel-docker.sh +++ b/travis/build-rhel-docker.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This is part of the Travis build CD process. It is intended to be # run from within the Travis build process and depends on env variables @@ -89,15 +89,4 @@ docker build \ echo "Docker build complete!" docker image ls -a -loggy "Tagging the image with its version number..." -export BES_VERSION="$(docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'cat bes_VERSION')" -echo "BES_VERSION is ${BES_VERSION}" -export BUILD_VERSION_TAG="opendap/${DOCKER_NAME}:${BES_VERSION}" -echo "BUILD_VERSION_TAG is ${BUILD_VERSION_TAG}" -docker tag ${SNAPSHOT_IMAGE_TAG} ${BUILD_VERSION_TAG} - loggy "Complete!" - -# Because this script is often sourced (at least by travis), -# unset these commands to prevent spurious downstream failures -set +eux \ No newline at end of file