🐳 Deploy image to the internal docker registry
* Deploy the image to the internal docker registry * Removed unnecessary stage in backend build
This commit is contained in:
@@ -27,13 +27,4 @@ jobs:
|
||||
run: cd twake && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb -e PUBSUB_TYPE=local node npm run test:e2e
|
||||
- name: e2e-cassandra-test
|
||||
run: cd twake && docker-compose -f docker-compose.tests.yml up -d scylladb elasticsearch rabbitmq && sleep 60 && docker-compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=elasticsearch -e DB_DRIVER=cassandra node npm run test:e2e
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cd twake && mv docker-compose.tests.yml docker-compose.yml
|
||||
- run: cd twake && docker-compose up -d
|
||||
- run: cd twake && docker-compose exec -T php php composer.phar install
|
||||
- run: cd twake && docker-compose exec -T php php bin/console twake:schema:update #Test if scylla is live
|
||||
- run: cd twake && docker-compose exec -T php php bin/console twake:mapping #Test if es is live
|
||||
- run: cd twake && docker-compose exec -T php php bin/console twake:init #Test in we can do things
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ on:
|
||||
- "twake/docker/**"
|
||||
|
||||
jobs:
|
||||
build-nginx:
|
||||
build-frontend:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cd twake && docker build -t twaketech/tdrive-nginx -f docker/twake-nginx/Dockerfile .
|
||||
- run: cd twake && docker build -t tdrive/tdrive-frontend -f docker/tdrive-frontend/Dockerfile .
|
||||
|
||||
build-node:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cd twake && docker build --target production -t twaketech/tdrive-node -f docker/twake-node/Dockerfile .
|
||||
- run: cd twake && docker build --target production -t docker-registry.linagora.com/tdrive/tdrive-node -f docker/tdrive-node/Dockerfile .
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: integration-test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "twake/**"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build
|
||||
run: cd twake && docker build -t integration-test -f docker/integration-test/Dockerfile .
|
||||
- name: build-node
|
||||
run: cd twake && docker build -t twaketech/tdrive-node -f docker/twake-node/Dockerfile .
|
||||
- name: run-twake-instance
|
||||
run: cd twake && docker-compose -f docker-compose.onpremise.mongo.yml up -d && sleep 60
|
||||
- name: get-logs
|
||||
run: cd twake && docker-compose -f docker-compose.onpremise.mongo.yml logs && curl http://localhost:3000
|
||||
- name: run integration-test
|
||||
run: cd twake && docker run --network host -e SERVER=http://localhost:3000 integration-test
|
||||
@@ -10,10 +10,11 @@ on:
|
||||
- ".github/workflows/**"
|
||||
|
||||
jobs:
|
||||
deploy-node:
|
||||
publish-node:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- run: 'echo "DOCKERTAGVERSION=2023.Q1.1223" >> $GITHUB_ENV'
|
||||
- name: "Setup version"
|
||||
run: 'echo "DOCKERTAGVERSION=2023.Q1.1223" >> $GITHUB_ENV'
|
||||
- name: Set env to develop
|
||||
if: endsWith(github.ref, '/develop')
|
||||
run: 'echo "DOCKERTAG=develop" >> $GITHUB_ENV; echo "DOCKERTAGVERSION=2023.Q1.1223" >> $GITHUB_ENV'
|
||||
@@ -26,15 +27,19 @@ jobs:
|
||||
- name: Set env to production
|
||||
if: endsWith(github.ref, '/main')
|
||||
run: 'echo "DOCKERTAG=latest" >> $GITHUB_ENV'
|
||||
- name: "Push to the registry following labels:"
|
||||
run: |
|
||||
echo "${{ env.DOCKERTAG }},${{ env.DOCKERTAGVERSION }}"
|
||||
- uses: actions/checkout@v2
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
uses: elgohr/Publish-Docker-Github-Action@v5
|
||||
with:
|
||||
name: twaketech/tdrive-node
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
name: tdrive/tdrive-node
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
workdir: twake
|
||||
registry: docker-registry.linagora.com
|
||||
context: .
|
||||
target: production
|
||||
buildoptions: "-t twaketech/tdrive-node -f docker/twake-node/Dockerfile"
|
||||
buildoptions: "-t docker-registry.linagora.com/tdrive/tdrive-node -f docker/tdrive-node/Dockerfile"
|
||||
tags: "${{ env.DOCKERTAG }},${{ env.DOCKERTAGVERSION }}"
|
||||
@@ -1,4 +1,4 @@
|
||||
name: update-saas-frontend
|
||||
name: publish-frontend
|
||||
|
||||
# Edit with caution ! Made for build+test on "feature/*" push and pull requests events
|
||||
# And for only deploying on pushes on "main" branch
|
||||
@@ -43,8 +43,8 @@ jobs:
|
||||
name: frontend-build
|
||||
path: twake/frontend/build/
|
||||
|
||||
deploy-nginx:
|
||||
needs: build-frontend
|
||||
publish-frontend:
|
||||
# needs: build-frontend
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/qa' || github.ref == 'refs/heads/canary'
|
||||
steps:
|
||||
@@ -63,11 +63,12 @@ jobs:
|
||||
run: 'echo "DOCKERTAG=latest" >> $GITHUB_ENV'
|
||||
- uses: actions/checkout@v2
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
uses: elgohr/Publish-Docker-Github-Action@v5
|
||||
with:
|
||||
name: twaketech/tdrive-nginx
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
name: tdrive/tdrive-frontend
|
||||
registry: docker-registry.linagora.com
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
workdir: twake
|
||||
buildoptions: "-t twaketech/tdrive-nginx -f docker/twake-nginx/Dockerfile"
|
||||
buildoptions: "-t docker-registry.linagora.com/tdrive/tdrive-frontend -f docker/tdrive-frontend/Dockerfile"
|
||||
tags: "${{ env.DOCKERTAG }},${{ env.DOCKERTAGVERSION }}"
|
||||
Reference in New Issue
Block a user