add workspace envvar persistence

This commit is contained in:
Gergő Jedlicska
2022-04-04 21:26:38 +02:00
parent 10e984099f
commit ffc60911bf
2 changed files with 10 additions and 6 deletions
+3 -2
View File
@@ -8,7 +8,9 @@ FOLDER="${FOLDER:-packages}"
DOCKER_IMAGE_TAG=speckle/speckle-$SPECKLE_SERVER_PACKAGE
IMAGE_VERSION_TAG=$(./.circleci/get_version.sh)
# IMAGE_VERSION_TAG=$(./.circleci/get_version.sh)
IMAGE_VERSION_TAG="${IMAGE_VERSION_TAG:-0}"
echo $IMAGE_VERSION_TAG
docker build --build-arg SPECKLE_SERVER_VERSION=$IMAGE_VERSION_TAG -t $DOCKER_IMAGE_TAG:latest . -f $FOLDER/$SPECKLE_SERVER_PACKAGE/Dockerfile
@@ -19,5 +21,4 @@ if [[ "$IMAGE_VERSION_TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
fi
echo "$DOCKER_REG_PASS" | docker login -u "$DOCKER_REG_USER" --password-stdin $DOCKER_REG_URL
docker image ls
docker push -a $DOCKER_IMAGE_TAG
+7 -4
View File
@@ -109,7 +109,7 @@ jobs:
get-version:
docker: *docker-image
working_directory: /tmp/ci
working_directory: &work-dir /tmp/ci
steps:
- checkout
- run: pwd
@@ -117,15 +117,14 @@ jobs:
- run:
name: set version
command: |
echo "export SPECKLE_VERSION=$(./.circleci/get_version.sh)" >> workspace/env-vars
echo "export IMAGE_VERSION_TAG=$(circleci/get_version.sh)" >> workspace/env-vars
- run: cat workspace/env-vars >> $BASH_ENV
- run: echo $SPECKLE_VERSION
- run: echo $IMAGE_VERSION_TAG
- persist_to_workspace:
root: workspace
paths:
- env-vars
test-server:
docker:
- image: cimg/node:lts
@@ -179,8 +178,12 @@ jobs:
docker-build-and-publish: &docker-job
docker: *docker-image
working_directory: *work-dir
steps:
- checkout
- attach_workspace:
at: /tmp/ci/workspace
- run: cat workspace/env-vars >> $BASH_ENV
- setup_remote_docker:
docker_layer_caching: true
- run: