mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Hope to fix our deployment with explicit bash
We should have been wary after seeing the version tags in the same loop as the `latest` tag.
This commit is contained in:
parent
4293fb845b
commit
7457e677b2
@ -63,14 +63,14 @@ before_deploy:
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
script: scripts/docker_push.sh
|
||||
script: bash scripts/docker_push.sh
|
||||
on:
|
||||
branch: master
|
||||
- provider: script
|
||||
script: scripts/deploy.sh
|
||||
script: bash scripts/deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
- provider: script
|
||||
script: scripts/github_release.sh
|
||||
script: bash scripts/github_release.sh
|
||||
on:
|
||||
branch: master
|
||||
|
||||
@ -5,7 +5,7 @@ DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
|
||||
IFS='.' read -r major minor patch < $ROOT_DIR/VERSION
|
||||
apps=(nitro-web nitro-backend neo4j maintenance)
|
||||
tags=(latest $major $major.$minor $major.$minor.$patch)
|
||||
tags=($major $major.$minor $major.$minor.$patch)
|
||||
|
||||
# These three docker images have already been built by now:
|
||||
# docker build --build-arg BUILD_COMMIT=$BUILD_COMMIT --target production -t humanconnection/nitro-backend:latest $ROOT_DIR/backend
|
||||
@ -17,13 +17,17 @@ echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
|
||||
for app in "${apps[@]}"
|
||||
do
|
||||
SOURCE="humanconnection/${app}:latest"
|
||||
echo "docker push $SOURCE"
|
||||
docker push $SOURCE
|
||||
|
||||
for tag in "${tags[@]}"
|
||||
do
|
||||
SOURCE="humanconnection/${app}:latest"
|
||||
TARGET="humanconnection/${app}:${tag}"
|
||||
if docker manifest inspect $TARGET &> /dev/null; then
|
||||
echo "Docker image ${TARGET} already present, skipping ..."
|
||||
if docker manifest inspect $TARGET >/dev/null; then
|
||||
echo "docker image ${TARGET} already present, skipping ..."
|
||||
else
|
||||
echo -e "docker tag $SOURCE $TARGET\ndocker push $TARGET"
|
||||
docker tag $SOURCE $TARGET
|
||||
docker push $TARGET
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user