a more robust docker release process that only tags latest in prod
This commit is contained in:
parent
4cb057d6ab
commit
a22f4759a7
|
@ -1,12 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
tag=$1
|
tag=$1
|
||||||
tag=${tag:-latest}
|
production=$2
|
||||||
|
|
||||||
|
if [[ ! "$tag" ]]; then
|
||||||
|
echo "No tag present. You must pass a tag to this script"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Tagging images with tag: $tag"
|
echo "Tagging images with tag: $tag"
|
||||||
|
|
||||||
docker tag app-service budibase/apps:$tag
|
docker tag app-service budibase/apps:$tag
|
||||||
docker tag worker-service budibase/worker:$tag
|
docker tag worker-service budibase/worker:$tag
|
||||||
|
|
||||||
docker push budibase/apps:$tag
|
if [[ "$production" ]]; then
|
||||||
docker push budibase/worker:$tag
|
echo "Production Deployment. Tagging latest.."
|
||||||
|
docker tag app-service budibase/apps:latest
|
||||||
|
docker tag worker-service budibase/worker:latest
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker push --all-tags budibase/apps
|
||||||
|
docker push --all-tags budibase/worker
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"lint:fix": "yarn run lint:fix:ts && yarn run lint:fix:prettier && yarn run lint:fix:eslint",
|
"lint:fix": "yarn run lint:fix:ts && yarn run lint:fix:prettier && yarn run lint:fix:eslint",
|
||||||
"test:e2e": "lerna run cy:test",
|
"test:e2e": "lerna run cy:test",
|
||||||
"test:e2e:ci": "lerna run cy:ci",
|
"test:e2e:ci": "lerna run cy:ci",
|
||||||
"build:docker": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -",
|
"build:docker": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION release && cd -",
|
||||||
"build:docker:develop": "node scripts/pinVersions && lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
|
"build:docker:develop": "node scripts/pinVersions && lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -",
|
||||||
"release:helm": "./scripts/release_helm_chart.sh",
|
"release:helm": "./scripts/release_helm_chart.sh",
|
||||||
"multi:enable": "lerna run multi:enable",
|
"multi:enable": "lerna run multi:enable",
|
||||||
|
|
Loading…
Reference in New Issue