This repository has been archived by the owner on Feb 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (34 loc) · 1.84 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
services:
- docker
git:
submodules: false
env:
global:
- REGISTRY_USER='robot$vikoverflow'
before_install:
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
script:
- cp deployment/Dockerfile.backend backend
- cp deployment/Dockerfile.frontend frontend
- cp deployment/vikoverflow.template frontend
- docker build -t vikoverflow-backend-deploy -f backend/Dockerfile.backend backend
- docker build -t vikoverflow-frontend-deploy --build-arg version=$TRAVIS_TAG -f frontend/Dockerfile.frontend frontend
before_deploy:
- docker login https://registry.k8s.sch.bme.hu -u "$REGISTRY_USER" -p "$REGISTRY_PASS"
deploy:
provider: script
script:
docker tag vikoverflow-backend-deploy registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-backend:$TRAVIS_TAG &&
docker tag vikoverflow-backend-deploy registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-backend:latest &&
docker push registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-backend:$TRAVIS_TAG &&
docker push registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-backend:latest &&
docker tag vikoverflow-frontend-deploy registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-frontend:$TRAVIS_TAG &&
docker tag vikoverflow-frontend-deploy registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-frontend:latest &&
docker push registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-frontend:$TRAVIS_TAG &&
docker push registry.k8s.sch.bme.hu/vikoverflow/vikoverflow-frontend:latest
on:
tags: true
after_deploy:
- "curl -d '{\"version\":\"'$TRAVIS_TAG'\", \"token\":\"'$FRONTEND_TOKEN'\"}' -H \"Content-Type: application/json\" -X POST https://devteam-updater.dev.k8s.sch.bme.hu"
- "curl -d '{\"version\":\"'$TRAVIS_TAG'\", \"token\":\"'$BACKEND_TOKEN'\"}' -H \"Content-Type: application/json\" -X POST https://devteam-updater.dev.k8s.sch.bme.hu"