-
Notifications
You must be signed in to change notification settings - Fork 18
81 lines (68 loc) · 2.59 KB
/
deploy.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Develop CI
on:
push:
branches:
- develop
env:
MULTIBANKING_IMAGE_NAME: multibanking-service
MULTIBANKING_IMAGE_TAG: develop
MULTIBANKING_APP_IMAGE_NAME: mmultibanking-app
OPENSHIFT_REGISTRY: openshift-registry.adorsys.de
OPENSHIFT_NAMESPACE_BANKING_GATEWAY_DEV: banking-gateway-dev
jobs:
build_and_test:
name: Build and test multibanking (openjdk 1.11)
runs-on: ubuntu-latest
steps:
- name: Clone Multibanking repository
uses: actions/checkout@v2
- name: Set up JDK 11 for x64
uses: actions/setup-java@v1
with:
java-version: 1.11
architecture: x64
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build Multibanking
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -V -q
- name: Run Unit Tests
run: mvn clean test -B -V -q
deploy:
name: Build Docker Image in Openshift
needs: build_and_test
runs-on: ubuntu-latest
steps:
- name: Clone Smartanalytics repository
uses: actions/checkout@v2
- name: Set up JDK 11 for x64
uses: actions/setup-java@v1
with:
java-version: 1.11
architecture: x64
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build Multibanking
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -V -q
- name: BG DEV Docker login
uses: docker/login-action@v1
with:
registry: ${{ env.OPENSHIFT_REGISTRY }}
username: ${{ secrets.OPENSHIFT_BANKING_GATEWAY_DEV_USER }}
password: ${{ secrets.OPENSHIFT_BANKING_GATEWAY_TOKEN }}
- name: BG DEV Deploy docker image to openshift
env:
OPENSHIFT_IMAGE_NAME: ${{ env.OPENSHIFT_REGISTRY }}/${{ env.OPENSHIFT_NAMESPACE_BANKING_GATEWAY_DEV }}/${{ env.MULTIBANKING_IMAGE_NAME }}:latest
OPENSHIFT_APP_IMAGE_NAME: ${{ env.OPENSHIFT_REGISTRY }}/${{ env.OPENSHIFT_NAMESPACE_BANKING_GATEWAY_DEV }}/${{ env.MULTIBANKING_APP_IMAGE_NAME }}:latest
run: |
docker build -t ${{ env.OPENSHIFT_IMAGE_NAME }} multibanking-server/
docker push ${{ env.OPENSHIFT_IMAGE_NAME }}
# docker build -t ${{ env.OPENSHIFT_APP_IMAGE_NAME }} multibanking-app/
# docker push ${{ env.OPENSHIFT_APP_IMAGE_NAME }}