-
Notifications
You must be signed in to change notification settings - Fork 157
122 lines (122 loc) · 3.75 KB
/
containerize-tiny-java-containers.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: native-image/containerize/tiny-java-containers
on:
push:
paths:
- 'native-image/containerize/tiny-java-containers/**'
- '.github/workflows/containerize-tiny-java-containers.yml'
schedule:
- cron: "0 0 1 * *" # run every month
workflow_dispatch:
permissions:
contents: read
jobs:
run:
name: Run 'native-image/containerize/tiny-java-containers'
runs-on: ubuntu-20.04 # Docker has changed its behavior on Ubuntu 22.04
timeout-minutes: 20
strategy:
matrix:
java-version: ['21', '24-ea']
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run 'native-image/containerize/tiny-java-containers'
run: |
sleep_period=5
cd native-image/containerize/tiny-java-containers
# Hello World
#
cd helloworld
./build.sh
docker run --rm hello:upx
cd ..
#
# jwebserver
#
cd jwebserver
#
# Dynamic
#
./build-dynamic.sh
container_id=$(docker run -d --rm -p8000:8000 jwebserver:distroless-java-base.dynamic)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Mostly Static
#
./build-mostly.sh
container_id=$(docker run -d --rm -p8000:8000 jwebserver:distroless-base.mostly)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Static
#
./build-static.sh
#
# Static Scratch
#
container_id=$(docker run -d --rm -p8000:8000 jwebserver:scratch.static)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Static Scratch UPX
#
container_id=$(docker run -d --rm -p8000:8000 jwebserver:scratch.static-upx)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Distroless Static
#
container_id=$(docker run -d --rm -p8000:8000 jwebserver:distroless-static.static)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Alping Static
#
container_id=$(docker run -d --rm -p8000:8000 jwebserver:alpine.static)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# jlink
#
./build-jlink.sh
container_id=$(docker run -d --rm -p8000:8000 jwebserver:distroless-java-base.jlink)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# JDK Build
#
./build-jvm.sh
#
# Debian JDK
#
container_id=$(docker run -d --rm -p8000:8000 jwebserver:debian)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Eclipse Temurin Static
#
container_id=$(docker run -d --rm -p8000:8000 jwebserver:temurin)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id
#
# Distroless Java
#
./build-jlink.sh
container_id=$(docker run -d --rm -p8000:8000 jwebserver:distroless-java)
sleep $sleep_period
curl "http://localhost:8000"
docker stop $container_id