Skip to content

Commit 4ab93fb

Browse files
authored
Merge pull request #256 from jhuttana/Add_GHA_tests_for_ubi8_openjdk-17
Added GHA tests for ubi8/openjdk-17
2 parents d4495ea + 633eb43 commit 4ab93fb

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: OpenJDK 17 Runtime Image CI
2+
on: [push, pull_request]
3+
env:
4+
LANG: en_US.UTF-8
5+
CEKIT_VERSION: 3.11.0
6+
S2I_URI: https://github.com/openshift/source-to-image/releases/download/v1.3.1/source-to-image-v1.3.1-a5a77147-linux-amd64.tar.gz
7+
jobs:
8+
openjdkci:
9+
name: OpenJDK Runtime Build and Test
10+
runs-on: ubuntu-18.04
11+
strategy:
12+
fail-fast: false
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Verify latest UBI image is present
16+
run: |
17+
docker pull registry.access.redhat.com/ubi8/ubi-minimal:latest
18+
docker image ls | grep ubi8
19+
- name: Setup required system packages
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y krb5-multidev virtualenv
23+
- name: Setup virtualenv and install cekit and required packages
24+
run: |
25+
mkdir ~/cekit${{ env.CEKIT_VERSION }}
26+
virtualenv -p python3.6 ~/cekit${{ env.CEKIT_VERSION }}
27+
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate
28+
pip3 install cekit==${{ env.CEKIT_VERSION }} docker docker-squash odcs behave lxml
29+
- name: Build
30+
run: |
31+
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate
32+
cekit -v --descriptor ubi8-openjdk-17-runtime.yaml build docker
33+
docker image ls
34+
35+
# even though we don't run any S2I tests for the runtime images, the test suite
36+
# will fail to start if the s2i binary is not present.
37+
- name: install s2i binary
38+
run: |
39+
echo ===== Installing s2i from ${{ env.S2I_URL }} =====
40+
mkdir /tmp/s2i/ && cd /tmp/s2i/
41+
wget ${{ env.S2I_URI }}
42+
tar xvf source-to-image*.gz
43+
sudo mv s2i /usr/bin
44+
which s2i
45+
s2i version
46+
47+
- name: Behave Tests
48+
run: |
49+
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate
50+
cekit -v --descriptor ubi8-openjdk-17-runtime.yaml test behave

.github/workflows/ubi8-openjdk-17.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: OpenJDK 17 S2I Image CI
2+
on: [push, pull_request]
3+
env:
4+
LANG: en_US.UTF-8
5+
CEKIT_VERSION: 3.6.0
6+
S2I_URI: https://github.com/openshift/source-to-image/releases/download/v1.3.1/source-to-image-v1.3.1-a5a77147-linux-amd64.tar.gz
7+
jobs:
8+
openjdkci:
9+
name: OpenJDK S2I Build and Test
10+
runs-on: ubuntu-18.04
11+
strategy:
12+
fail-fast: false
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Verify latest UBI image is present
16+
run: |
17+
docker pull registry.access.redhat.com/ubi8/ubi-minimal:latest
18+
docker image ls | grep ubi8
19+
- name: Setup required system packages
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y krb5-multidev virtualenv
23+
- name: Setup virtualenv and install cekit and required packages
24+
run: |
25+
mkdir ~/cekit${{ env.CEKIT_VERSION }}
26+
virtualenv -p python3.6 ~/cekit${{ env.CEKIT_VERSION }}
27+
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate
28+
pip3 install cekit==${{ env.CEKIT_VERSION }} docker docker-squash odcs behave lxml
29+
- name: Build
30+
run: |
31+
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate
32+
cekit -v --descriptor ubi8-openjdk-17.yaml build docker
33+
docker image ls
34+
- name: install s2i binary
35+
run: |
36+
echo ===== Installing s2i from ${{ env.S2I_URL }} =====
37+
mkdir /tmp/s2i/ && cd /tmp/s2i/
38+
wget ${{ env.S2I_URI }}
39+
tar xvf source-to-image*.gz
40+
sudo mv s2i /usr/bin
41+
which s2i
42+
s2i version
43+
- name: Behave Tests
44+
run: |
45+
. ~/cekit${{ env.CEKIT_VERSION }}/bin/activate
46+
cekit -v --descriptor ubi8-openjdk-17.yaml test behave

0 commit comments

Comments
 (0)