add docker jobs for link shortner

This commit is contained in:
Simon Larsen 2023-07-10 08:28:23 +01:00
parent 49b4388491
commit ba46931979
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
4 changed files with 71 additions and 0 deletions

View File

@ -39,6 +39,20 @@ jobs:
- run: cd CommonServer && npm install - run: cd CommonServer && npm install
- run: cd ApiReference && npm install && npm run compile - run: cd ApiReference && npm install && npm run compile
compile-link-shortner:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd LinkShortner && npm install && npm run compile
compile-common-server: compile-common-server:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:

View File

@ -25,6 +25,21 @@ jobs:
- name: build docker image - name: build docker image
run: sudo docker build -f ./Accounts/Dockerfile . run: sudo docker build -f ./Accounts/Dockerfile .
docker-build-link-shortner:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Preinstall
run: npm run prerun
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./LinkShortner/Dockerfile .
docker-build-api-reference: docker-build-api-reference:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:

View File

@ -87,6 +87,28 @@ jobs:
- run: sudo docker buildx create --use - run: sudo docker buildx create --use
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/workflow:$ONEUPTIME_VERSION --tag oneuptime/workflow:release --push -f ./Workflow/Dockerfile . - run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/workflow:$ONEUPTIME_VERSION --tag oneuptime/workflow:release --push -f ./Workflow/Dockerfile .
link-shortner-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
env:
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
steps:
- uses: actions/checkout@v3
with:
ref: release
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: npm run prerun
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
# Build and deploy accounts.
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
- run: sudo docker buildx create --use
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/link-shortner:$ONEUPTIME_VERSION --tag oneuptime/link-shortner:release --push -f ./LinkShortner/Dockerfile .
workers-docker-image-deploy: workers-docker-image-deploy:
needs: generate-build-number needs: generate-build-number
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -39,6 +39,26 @@ jobs:
- run: sudo docker buildx create --use - run: sudo docker buildx create --use
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/test-server:$ONEUPTIME_VERSION-test --tag oneuptime/test-server:test --push -f ./TestServer/Dockerfile . - run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/test-server:$ONEUPTIME_VERSION-test --tag oneuptime/test-server:test --push -f ./TestServer/Dockerfile .
link-shortner-test-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
env:
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: npm run prerun
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
# Build and deploy accounts.
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
- run: sudo docker buildx create --use
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/link-shortner:$ONEUPTIME_VERSION-test --tag oneuptime/link-shortner:test --push -f ./LinkShortner/Dockerfile .
workflow-test-docker-image-deploy: workflow-test-docker-image-deploy:
needs: generate-build-number needs: generate-build-number
runs-on: ubuntu-latest runs-on: ubuntu-latest