add develop tag and update docker push script

This commit is contained in:
Martin McKeaveney 2021-06-21 16:25:12 +01:00
parent dc637c6240
commit 9deeef2d9e
5 changed files with 9 additions and 9 deletions

View File

@ -43,13 +43,13 @@ jobs:
verbose: true verbose: true
- run: yarn test:e2e:ci - run: yarn test:e2e:ci
- name: Build and Push Staging Docker Image - name: Build and Push Development Docker Image
# Only run on push # Only run on push
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
run: | run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
yarn build yarn build
yarn build:docker:staging yarn build:docker:develop
env: env:
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}

View File

@ -5,12 +5,12 @@ tag=${tag:-latest}
echo "Tagging images with SHA: $GITHUB_SHA and tag: $tag" echo "Tagging images with SHA: $GITHUB_SHA and tag: $tag"
docker tag app-service budibase/apps:$tag docker tag app-service:$tag budibase/apps:$tag
docker tag worker-service budibase/worker:$tag docker tag worker-service:$tag budibase/worker:$tag
# Tag with git sha # Tag with git sha
docker tag app-service budibase/apps:$GITHUB_SHA docker tag app-service:$tag budibase/apps:$GITHUB_SHA
docker tag worker-service budibase/worker:$GITHUB_SHA docker tag worker-service:$tag budibase/worker:$GITHUB_SHA
docker push budibase/apps docker push budibase/apps
docker push budibase/worker docker push budibase/worker

View File

@ -41,6 +41,6 @@
"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 && cd -", "build:docker": "lerna run build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -",
"build:docker:staging": "lerna run build:docker:staging && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh staging && cd -" "build:docker:develop": "lerna run build:docker:develop && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -"
} }
} }

View File

@ -13,7 +13,7 @@
"test:integration": "jest --coverage --detectOpenHandles", "test:integration": "jest --coverage --detectOpenHandles",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"build:docker": "docker build . -t app-service", "build:docker": "docker build . -t app-service",
"build:docker:staging": "docker build . -t app-service:staging", "build:docker:develop": "docker build . -t app-service:develop",
"run:docker": "node src/index", "run:docker": "node src/index",
"dev:stack:up": "node scripts/dev/manage.js up", "dev:stack:up": "node scripts/dev/manage.js up",
"dev:stack:down": "node scripts/dev/manage.js down", "dev:stack:down": "node scripts/dev/manage.js down",

View File

@ -14,7 +14,7 @@
"scripts": { "scripts": {
"run:docker": "node src/index.js", "run:docker": "node src/index.js",
"build:docker": "docker build . -t worker-service", "build:docker": "docker build . -t worker-service",
"build:docker:staging": "docker build . -t worker-service:staging", "build:docker:develop": "docker build . -t worker-service:develop",
"dev:stack:init": "node ./scripts/dev/manage.js init", "dev:stack:init": "node ./scripts/dev/manage.js init",
"dev:builder": "npm run dev:stack:init && nodemon src/index.js", "dev:builder": "npm run dev:stack:init && nodemon src/index.js",
"test": "jest --runInBand" "test": "jest --runInBand"