Skip to content

Commit

Permalink
Map to env var before using in script (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmwinther authored Nov 13, 2023
1 parent cc6fd4f commit 1834462
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions deploy/jupyterhub/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ jobs:
cd $REPO
git pull
echo "Using tag $(imageTag)"
sed "s/<TAG>/$(imageTag)/g" docker/jupyterhub/.env.staging > ~/secrets/compose/.env
echo "Using tag $IMAGE_TAG"
sed "s/<TAG>/$IMAGE_TAG/g" docker/jupyterhub/.env.staging > ~/secrets/compose/.env
IMAGE=${{ variables.imageNameNexus }}:$(imageTag)
IMAGE=${{ variables.imageNameNexus }}:$IMAGE_TAG
echo "Pulling $IMAGE"
docker pull $IMAGE
Expand All @@ -84,6 +84,8 @@ jobs:
echo "starting service."
sudo systemctl start jupyterhub.service
fi
env:
IMAGE_TAG: $(imageTag)
- job: deploy_prod
condition: ${{ eq(variables['environment'], 'prod') }}
Expand Down Expand Up @@ -122,10 +124,10 @@ jobs:
cd $REPO
git pull
echo "Using tag $(imageTag)"
sed "s/<TAG>/$(imageTag)/g" docker/jupyterhub/.env.prod > ~/secrets/compose/.env
echo "Using tag $IMAGE_TAG"
sed "s/<TAG>/$IMAGE_TAG/g" docker/jupyterhub/.env.prod > ~/secrets/compose/.env
IMAGE=${{ variables.imageNameNexus }}:$(imageTag)
IMAGE=${{ variables.imageNameNexus }}:$IMAGE_TAG
echo "Pulling $IMAGE"
docker pull $IMAGE
Expand All @@ -146,3 +148,5 @@ jobs:
echo "starting service."
sudo systemctl start jupyterhub.service
fi
env:
IMAGE_TAG: $(imageTag)

0 comments on commit 1834462

Please sign in to comment.