Skip to content

JKube E2E Tests

JKube E2E Tests #2515

Workflow file for this run

#
# Copyright (c) 2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at:
#
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
name: JKube E2E Tests
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 1 * * *' # Every day at 1
permissions:
contents: read
jobs:
build-jkube:
name: Build JKube
uses: ./.github/workflows/build-jkube.yml
with:
run-id: ${{ github.run_id }}
minikube:
name: K8S
needs: build-jkube
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kubernetes: [v1.25.13,v1.28.1]
suite: ['quarkus','quarkus-native','springboot','webapp','other','dockerfile']
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- name: Cache configuration
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
~/.m2/repository
./jkube
key: cache-it-${{ github.run_id }}
- name: Setup Minikube-Kubernetes
uses: manusa/actions-setup-minikube@0e8062ceff873bd77979f39cf8fd3621416afe4d
with:
minikube version: v1.31.2
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
start args: --force
- name: Harden Runner
uses: step-security/harden-runner@398bb08048482c421b1da00a58a1b472a306eb85
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
auth.docker.io:443
azure.archive.ubuntu.com:80
cdn03.quay.io:443
downloads.gradle.org:443
gcr.io:443
github.com:443
jcenter.bintray.com:443
k8s.gcr.io:443
maven.repository.redhat.com:443
md-hdd-51w5snc21ccf.z49.blob.storage.azure.net:443
md-hdd-bfh3mwcdlxsh.z21.blob.storage.azure.net:443
md-hdd-dxgvrxd2cnjf.z22.blob.storage.azure.net:443
objects.githubusercontent.com:443
packages.microsoft.com:443
plugins-artifacts.gradle.org:443
plugins.gradle.org:443
ppa.launchpadcontent.net:443
ppa.launchpad.net:80
production.cloudflare.docker.com:443
quay.io:443
services.gradle.org:443
registry-1.docker.io:443
registry.access.redhat.com:443
registry.k8s.io:443
repo1.maven.org:443
repo.maven.apache.org:443
repository.jboss.org:443
storage.googleapis.com:443
us-south1-docker.pkg.dev:443
us-west2-docker.pkg.dev:443
us-east4-docker.pkg.dev:443
- name: Install and Run Integration Tests
run: |
JKUBE_VERSION=$(./mvnw -q -f 'jkube/pom.xml' -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) \
&& ./mvnw -B -PKubernetes,${{ matrix.suite }} clean verify -Djkube.version="$JKUBE_VERSION"
- name: Save reports as artifact
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: Test reports (Minikube ${{ matrix.kubernetes }}-${{ matrix.suite }})
path: ./it/target/jkube-test-report.txt
minikube-legacy:
name: K8S
needs: build-jkube
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
suite: ['quarkus','quarkus-native','springboot','webapp','other','dockerfile']
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- name: Cache configuration
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
~/.m2/repository
./jkube
key: cache-it-${{ github.run_id }}
- name: Setup Minikube-Kubernetes
uses: manusa/actions-setup-minikube@0e8062ceff873bd77979f39cf8fd3621416afe4d
with:
minikube version: v1.31.2
kubernetes version: v1.12.10
github token: ${{ secrets.GITHUB_TOKEN }}
start args: --force
- name: Harden Runner
uses: step-security/harden-runner@398bb08048482c421b1da00a58a1b472a306eb85
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
auth.docker.io:443
azure.archive.ubuntu.com:80
cdn03.quay.io:443
downloads.gradle.org:443
gcr.io:443
github.com:443
jcenter.bintray.com:443
k8s.gcr.io:443
maven.repository.redhat.com:443
md-hdd-51w5snc21ccf.z49.blob.storage.azure.net:443
md-hdd-bfh3mwcdlxsh.z21.blob.storage.azure.net:443
md-hdd-dxgvrxd2cnjf.z22.blob.storage.azure.net:443
objects.githubusercontent.com:443
packages.microsoft.com:443
plugins-artifacts.gradle.org:443
plugins.gradle.org:443
ppa.launchpadcontent.net:443
ppa.launchpad.net:80
production.cloudflare.docker.com:443
quay.io:443
services.gradle.org:443
registry-1.docker.io:443
registry.access.redhat.com:443
registry.k8s.io:443
repo1.maven.org:443
repo.maven.apache.org:443
repository.jboss.org:443
storage.googleapis.com:443
us-south1-docker.pkg.dev:443
us-west2-docker.pkg.dev:443
us-east4-docker.pkg.dev:443
- name: Install and Run Integration Tests
run: |
JKUBE_VERSION=$(./mvnw -q -f 'jkube/pom.xml' -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) \
&& ./mvnw -B -PKubernetes,${{ matrix.suite }} clean verify -Djkube.version="$JKUBE_VERSION"
- name: Save reports as artifact
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: Test reports (Minikube ${{ matrix.kubernetes }}-${{ matrix.suite }})
path: ./it/target/jkube-test-report.txt
openshift:
name: OpenShift
needs: build-jkube
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
openshift: [v3.10.0]
suite: ['quarkus','springboot','webapp','other']
steps:
# This seems to cause problems with OpenShift Setup Action
# - name: Harden Runner
# uses: step-security/harden-runner@398bb08048482c421b1da00a58a1b472a306eb85
# with:
# egress-policy: audit
- name: Free up Space
# 'linux-headers.*' \ # Takes > 2 minutes
# 'google-cloud.*' \
run: |
sudo apt list --installed
sudo apt-get purge -y \
'aspnetcore.*' \
'cabal-install.*' \
'clang.*' \
'dotnet.*' \
'firefox.*' \
'ghc.*' \
'google-chrome.*' \
'libmagic.*' \
'libmono.*' \
'mono-.*' \
'mysql.*' \
'php.*' \
'ruby.*'
sudo apt-get autoremove
df -h
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- name: Cache configuration
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
~/.m2/repository
./jkube
key: cache-it-${{ github.run_id }}
- name: Check Docker Status
run: systemctl status docker.service
- name: Setup OpenShift
uses: manusa/actions-setup-openshift@e59fe3caa18d7cde81e2ce4797e6549a13f7648c
with:
oc version: ${{ matrix.openshift }}
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Install and Run Integration Tests
run: |
JKUBE_VERSION=$(./mvnw -q -f 'jkube/pom.xml' -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) \
&& ./mvnw -B -POpenShift,${{ matrix.suite }} verify -Djkube.version="$JKUBE_VERSION" -Djunit.jupiter.execution.parallel.config.fixed.parallelism=4
- name: Save reports as artifact
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: Test reports (OpenShift ${{ matrix.openshift }}-${{ matrix.suite }})
path: ./it/target/jkube-test-report.txt
- name: Cluster Information
if: always()
run: |
oc login -u system:admin
oc describe node localhost
oc login -u developer