Auto generate a CLI config #404
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020, 2023, Oracle Corporation and/or its affiliates. All rights reserved. | |
# Licensed under the Universal Permissive License v 1.0 as shown at | |
# http://oss.oracle.com/licenses/upl. | |
# --------------------------------------------------------------------------- | |
# Coherence Operator GitHub Actions K8s Certification build. | |
# --------------------------------------------------------------------------- | |
name: K8s Certification | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
- gh-pages | |
- 1.0.0 | |
- 2.x | |
- 3.x | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- committed | |
branches-ignore: | |
- gh-pages | |
- 1.0.0 | |
- 2.x | |
- 3.x | |
env: | |
MAVEN_USER: ${{ secrets.MAVEN_USER }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
LOAD_KIND: true | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
matrixName: | |
- v1.27 | |
- v1.26 | |
- v1.25 | |
- v1.24 | |
- v1.23 | |
- v1.22 | |
- v1.21 | |
include: | |
- matrixName: v1.27 | |
k8s: kindest/node:v1.27.1@sha256:9915f5629ef4d29f35b478e819249e89cfaffcbfeebda4324e5c01d53d937b09 | |
kindCommand: kind-calico | |
runNetTests: true | |
- matrixName: v1.26 | |
k8s: kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f | |
kindCommand: kind-calico | |
runNetTests: true | |
- matrixName: v1.25 | |
k8s: kindest/node:v1.25.8@sha256:00d3f5314cc35327706776e95b2f8e504198ce59ac545d0200a89e69fce10b7f | |
kindCommand: kind-calico | |
runNetTests: true | |
- matrixName: v1.24 | |
k8s: kindest/node:v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16 | |
kindCommand: kind-calico | |
runNetTests: true | |
- matrixName: v1.23 | |
k8s: kindest/node:v1.23.17@sha256:e5fd1d9cd7a9a50939f9c005684df5a6d145e8d695e78463637b79464292e66c | |
kindCommand: kind-calico | |
runNetTests: true | |
- matrixName: v1.22 | |
k8s: kindest/node:v1.22.17@sha256:c8a828709a53c25cbdc0790c8afe12f25538617c7be879083248981945c38693 | |
kindCommand: kind-calico | |
runNetTests: true | |
- matrixName: v1.21 | |
k8s: kindest/node:v1.21.14@sha256:27ef72ea623ee879a25fe6f9982690a3e370c68286f4356bf643467c552a3888 | |
kindCommand: kind | |
runNetTests: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# This step will free up disc space on the runner by removing | |
# lots of things that we do not need. | |
- name: disc | |
shell: bash | |
run: | | |
echo "Listing 100 largest packages" | |
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 | |
df -h | |
echo "Removing large packages" | |
sudo apt-get remove -y '^dotnet-.*' || true | |
sudo apt-get remove -y '^llvm-.*' || true | |
sudo apt-get remove -y 'monodoc-http' || true | |
sudo apt-get remove -y 'php.*' || true | |
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel || true | |
sudo apt-get autoremove -y || true | |
sudo apt-get clean | |
df -h | |
echo "Removing large directories" | |
rm -rf /usr/share/dotnet/ | |
df -h | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.x | |
- name: Cache Go Modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-mods- | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Cache Tools | |
uses: actions/cache@v3 | |
with: | |
path: build/tools | |
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }} | |
restore-keys: ${{ runner.os }}-build-tools | |
- name: Edit DNS Resolve | |
shell: bash | |
run: | | |
sudo chown -R runner:runner /run/systemd/resolve/stub-resolv.conf | |
sudo echo nameserver 8.8.8.8 > /run/systemd/resolve/stub-resolv.conf | |
- name: Start KinD Cluster | |
shell: bash | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
make ${{ matrix.kindCommand }} KIND_IMAGE=${{ matrix.k8s }} CALICO_TIMEOUT=600s | |
kubectl version | |
kubectl get nodes | |
docker pull gcr.io/distroless/java | |
docker pull gcr.io/distroless/java11-debian11 | |
docker pull gcr.io/distroless/java17-debian11 | |
- name: Certification Tests | |
shell: bash | |
run: | | |
export RUN_NET_TEST=${{ matrix.runNetTests }} | |
./hack/k8s-certification.sh | |
- uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: test-output-${{ matrix.matrixName }} | |
path: build/_output/test-logs |