-
Notifications
You must be signed in to change notification settings - Fork 23
58 lines (55 loc) · 2.48 KB
/
ubi8-openjdk-17-runtime.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
name: run behave-test-steps on OpenJDK 17 Runtime Image
on: [push, pull_request]
env:
LANG: en_US.UTF-8
OPENJDK_CONTAINER_SOURCE_TAG: openjdk-containers-1.13
OPENJDK_CONTAINER: ubi8/openjdk-17-runtime
OPENJDK_CONTAINER_VERSION: 1.13
OPENJDK_CONTAINER_DESCRIPTOR: ubi8-openjdk-17-runtime.yaml
PYTHON: python3.10 # this is what ubuntu-latest provides right now
jobs:
openjdkci:
name: OpenJDK Runtime Build and Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- id: cekit_version
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: cekit
repo: cekit
excludes: prerelease, draft
- uses: actions/checkout@v2
- name: fetch openjdk runtime image
run: |
docker pull registry.access.redhat.com/${{ env.OPENJDK_CONTAINER }}:${{ env.OPENJDK_CONTAINER_VERSION }}
docker tag registry.access.redhat.com/${{ env.OPENJDK_CONTAINER }}:${{ env.OPENJDK_CONTAINER_VERSION }} \
${{ env.OPENJDK_CONTAINER }}:${{ env.OPENJDK_CONTAINER_VERSION }}
- name: Setup required system packages
run: |
sudo apt-get update
sudo apt-get install -y libkrb5-dev virtualenv
- name: Setup virtualenv and install cekit and required packages
run: |
mkdir ~/cekit${{ steps.cekit_version.outputs.release }}
virtualenv -p ${{ env.PYTHON }} ~/cekit${{ steps.cekit_version.outputs.release }}
. ~/cekit${{ steps.cekit_version.outputs.release }}/bin/activate
pip3 install cekit==${{ steps.cekit_version.outputs.release }} docker behave lxml
# docker-squash odcs lxml
# even though we don't run any S2I tests for the runtime images, the test suite
# will fail to start if the s2i binary is not present.
- name: mock s2i binary
run: sudo ln -s /usr/bin/echo /usr/bin/s2i
- name: clone openjdk container sources
run: |
git clone https://github.com/jboss-container-images/openjdk.git ~/openjdk-container
cd ~/openjdk-container
git checkout ${{ env.OPENJDK_CONTAINER_SOURCE_TAG }}
- name: Run behave tests
run: |
. ~/cekit${{ steps.cekit_version.outputs.release }}/bin/activate
STEPSDIR=$(pwd)
git tag v1 # cekit hard-codes using ref v1
cd ~/openjdk-container
cekit -v --descriptor ${{ env.OPENJDK_CONTAINER_DESCRIPTOR }} test behave --steps-url file://$STEPSDIR