Skip to content

JKube Smoke Testing #34

JKube Smoke Testing

JKube Smoke Testing #34

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 Smoke Testing
on:
workflow_dispatch:
inputs:
version:
description: Eclipse JKube version to test
required: true
permissions:
contents: read
jobs:
download-dependencies:
name: Download IT dependencies
runs-on: ubuntu-latest
steps:
- 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
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
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: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- name: Download IT dependencies
run: |
./mvnw -B -DskipTests clean install \
&& ./mvnw -B -DskipTests clean -P'quarkus','quarkus-native','springboot','webapp','other','dockerfile'
minikube:
name: K8S
needs: download-dependencies
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: 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
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
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: |
./mvnw -B -PKubernetes,${{ matrix.suite }} clean verify -Djkube.version=${{ github.event.inputs.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: download-dependencies
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: 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: |
./mvnw -B -POpenShift,${{ matrix.suite }} verify -Djkube.version=${{ github.event.inputs.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