forked from jsquad-consulting/openbank-jee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (86 loc) · 4.11 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
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
82
83
84
85
86
87
88
89
90
91
#
# Copyright 2021 JSquad AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
dist: focal
services:
- docker
cache:
directories:
- .autoconf
- $HOME/.m2
before_install:
- echo $JAVA_HOME
- which java
- sudo rm -rf /usr/local/lib/jvm/
- sudo apt-get install -y openjdk-11-jdk-headless
- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
- which java
- java -version
- $JAVA_HOME/bin/java -version
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.zip
- unzip -qq apache-maven-3.6.1-bin.zip
- export M2_HOME=$PWD/apache-maven-3.6.1
- export PATH=$M2_HOME/bin:$PATH
- nvm install 10.16.2
- npm install -g @angular/[email protected]
- cd client/src/main/openbank-app && npm rebuild node-sass
- cd ..
- cd ..
- cd ..
- cd ..
- mvn clean compile -U
- source openbank_setup_local.sh
- curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
- sudo apt-get update
- sudo apt-get install kubectl=1.20.1-00 -y
- curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
- sudo apt-get install apt-transport-https --yes
- echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
- sudo apt-get update
- sudo apt-get install helm -y
- sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common wget -y
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install docker-ce docker-ce-cli containerd.io -y
- docker --version
- docker run hello-world
jobs:
include:
- stage: build and run unit/system tests and coverage tests
script:
- source openbank_setup_local.sh
- travis_wait 60 mvn clean install -Pgenerate-coverage && mvn verify -Pcoverage-check -T 1C
- stage: run integration tests
script:
- mvn clean install -DskipTests -T 1C
- docker-compose -f docker-compose-int.yaml build --force
- travis_wait 60 mvn verify -Pintegrationtests -T 1C
- stage: push OpenBank to dockerhub on master branch after an merge
if: branch = master
script:
- mvn clean install -DskipTests -T 1C
- docker build -f Dockerfile --no-cache -t openbank-jee .
- docker tag openbank-jee:latest jsquadab/openbank-jee:latest
- docker push jsquadab/openbank-jee:latest
env:
global:
- SH=bash
- secure: jMHzoYwhSj/9PyvpmkBEe7XIkzGoIg2OdTKk612NQFZaLHTgEpL0V/T4w3QubHXXUuqSnWm5kTmSChoFI2hVrjbGi2vl3BdsIzwDCdAOO9/OhYyyCLE3XmC2dAqhd+0zXBWRQbZ3MZri4QlL/oGv+Xhlg2cScun5TXJV520tT6t3Cr5+TZc3mvQgH8rCNab3LWaZMLJIhZLm/OajnclsmxGQ1ahcOb+4H8SMck8tPS6DGU2yi4Y/WaP6BPKc2vmpuIs1fp6SsMmqi30gvA6QQZAwNyDEL3U2q5C5JpiKoweQWSDY2KzZieTb3e2uPtBkBoI6RXgwqrvD2IgBvWKUlj/ExN7LIKUgPmjuN3sTrENlOJayhDyyIslRg2uJrXULSwW/C4WUFXmXcQAfbO2PWoBExdlaieHj+/IpNVCkyPomMHRVxcLY1sdY3p7aqxLJmJFouvnbsgWG9eWjN1InSgfUteA+dxvVCWnau/OBnHKd5q/nHk+ak5TFGDa2rA4tgXgUf6+J8g5nWmWqGBFLhDyfYwyigx1KtFf+IDcqU+HHq8an5cJ6d8BSBh5Al0NEOVvuCCUHCdpdbm1NVYPE38z7ByF9Y5ZP1XJR2HAOyyFIk5eCy5pbblfIDdquRCL0VraeclMUIqV4NvaoSnrc7tUgLFSGbSbKV2NwMvbk1Mw=