-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (48 loc) · 1.59 KB
/
ci.yml
File metadata and controls
48 lines (48 loc) · 1.59 KB
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
name: CI
on: [push]
jobs:
build-linux:
strategy:
matrix:
java: [8,11]
os: [ubuntu-latest]
docker-version: [19.09]
docker-channel: [stable]
runs-on: ${{ matrix.os }}
name: java-${{ matrix.java }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- run: sudo apt-get update -yqq --fix-missing
- uses: docker-practice/actions-setup-docker@master
with:
docker_version: ${{ matrix.docker-version }}
docker_channel: ${{ matrix.docker-channel }}
- run: sudo apt-get install -yqq jq curl httpie
- uses: actions/cache@v1
with:
path: ~/.docker
key: ${{ runner.os }}-${{ matrix.os }}-docker-${{ hashFiles('**/Dockerfile*') }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-docker-
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- run: ./mvnw clean ; ./mvnw
- run: ./mvnw -f webapps-deploymen docker:build docker:start
- run: |
echo http
which http
http get :8080/webapp1/hello | jq '.'
http get :8080/webapp2/hello | jq '.'
echo curl
which curl
curl -sS 0:8080/webapp1/hello | jq '.'
curl -sS 0:8080/webapp2/hello | jq '.'
echo "done!"
./mvnw -f webapps-deploymen docker:stop docker:remove