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:
|
deploy:
|
||||||
- provider: script
|
- provider: script
|
||||||
script: scripts/docker_push.sh
|
script: bash scripts/docker_push.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
- provider: script
|
- provider: script
|
||||||
script: scripts/deploy.sh
|
script: bash scripts/deploy.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
- provider: script
|
- provider: script
|
||||||
script: scripts/github_release.sh
|
script: bash scripts/github_release.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
|||||||
@ -5,7 +5,7 @@ DOCKER_CLI_EXPERIMENTAL=enabled
|
|||||||
|
|
||||||
IFS='.' read -r major minor patch < $ROOT_DIR/VERSION
|
IFS='.' read -r major minor patch < $ROOT_DIR/VERSION
|
||||||
apps=(nitro-web nitro-backend neo4j maintenance)
|
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:
|
# 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
|
# 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[@]}"
|
for app in "${apps[@]}"
|
||||||
do
|
do
|
||||||
|
SOURCE="humanconnection/${app}:latest"
|
||||||
|
echo "docker push $SOURCE"
|
||||||
|
docker push $SOURCE
|
||||||
|
|
||||||
for tag in "${tags[@]}"
|
for tag in "${tags[@]}"
|
||||||
do
|
do
|
||||||
SOURCE="humanconnection/${app}:latest"
|
|
||||||
TARGET="humanconnection/${app}:${tag}"
|
TARGET="humanconnection/${app}:${tag}"
|
||||||
if docker manifest inspect $TARGET &> /dev/null; then
|
if docker manifest inspect $TARGET >/dev/null; then
|
||||||
echo "Docker image ${TARGET} already present, skipping ..."
|
echo "docker image ${TARGET} already present, skipping ..."
|
||||||
else
|
else
|
||||||
|
echo -e "docker tag $SOURCE $TARGET\ndocker push $TARGET"
|
||||||
docker tag $SOURCE $TARGET
|
docker tag $SOURCE $TARGET
|
||||||
docker push $TARGET
|
docker push $TARGET
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user