-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: e2e | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
jobs: | ||
deploy-services: | ||
runs-on: self-hosted | ||
- name: Check changes path | ||
uses: dorny/paths-filter@v3 | ||
id: changes | ||
with: | ||
filters: | | ||
auth: | ||
- 'rococo-auth/**' | ||
api: | ||
- 'rococo-api/**' | ||
client: | ||
- 'rococo-client/**' | ||
- name: Docker login | ||
run: | | ||
docker login --username ${{ vars.DOCKER_HUB_ACC }} --password "${{ secrets.DOCKER_HUB_PASSWORD }}" | ||
- name: build auth & deploy to staging | ||
if: steps.changes.outputs.auth == 'true' | ||
working-directory: ./ | ||
run: | | ||
pwd | ||
bash ./gradlew :rococo-auth:jib -Pskipjaxb -x :rococo-e2e:test | ||
docker-compose pull auth.rococo.dc | ||
docker-compose stop auth.rococo.dc && docker-compose up -d --no-deps auth.rococo.dc | ||
docker system prune -a -f | ||
echo "Deploy auth to stage done!" | ||
- name: build currency & deploy to staging | ||
if: steps.changes.outputs.api == 'true' | ||
working-directory: ./ | ||
run: | | ||
pwd | ||
bash ./gradlew :rococo-api:jib -Pskipjaxb -x :rococo-e2e:test | ||
docker-compose pull api.rococo.dc | ||
docker-compose stop api.rococo.dc && docker-compose up -d --no-deps api.rococo.dc | ||
docker system prune -a -f | ||
echo "Deploy api to stage done!" | ||
- name: build frontend & deploy to staging | ||
if: steps.changes.outputs.client == 'true' | ||
working-directory: ./rococo-client | ||
run: | | ||
pwd | ||
docker build -t ${{ vars.DOCKER_HUB_ACC }}/rococo-client:0.0.1-SNAPSHOT -t ${{ vars.DOCKER_HUB_ACC }}/rococo-client:latest . | ||
docker push ${{ vars.DOCKER_HUB_ACC }}/rococo-client:0.0.1-SNAPSHOT | ||
docker push ${{ vars.DOCKER_HUB_ACC }}/rococo-client:latest | ||
cd ../ || exit 1 | ||
docker-compose pull client.rococo.dc | ||
docker-compose stop client.rococo.dc && docker-compose up -d --no-deps client.rococo.dc | ||
docker system prune -a -f | ||
echo "Deploy frontend to stage done!" |