Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rolling upgrade by node #668

Merged
merged 9 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand Down Expand Up @@ -151,26 +144,30 @@ jobs:
with:
name: coherence-operator-manifests.tar.gz
path: build/_output/coherence-operator-manifests.tar.gz
if-no-files-found: ignore

- name: Upload Yaml
uses: actions/upload-artifact@v4
if: success()
with:
name: coherence-operator.yaml
path: build/_output/coherence-operator.yaml
if-no-files-found: ignore

- name: Upload CRD
uses: actions/upload-artifact@v4
if: success()
with:
name: coherence.oracle.com_coherence.yaml
path: build/_output/manifests/crd/coherence.oracle.com_coherence.yaml
if-no-files-found: ignore

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output
path: build/_output/test-logs
if-no-files-found: ignore

- name: Deploy Snapshots & Docs
if: ${{ github.ref == 'refs/heads/main' && success() }}
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/coherence-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand Down Expand Up @@ -213,7 +206,8 @@ jobs:
make coherence-compatibility-test

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output-${{ matrix.matrixName }}
path: build/_output/test-logs
if-no-files-found: ignore
10 changes: 2 additions & 8 deletions .github/workflows/compatibility-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand Down Expand Up @@ -193,7 +186,8 @@ jobs:
make compatibility-test

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output-${{ matrix.compatibilityVersion }}
path: build/_output/test-logs
if-no-files-found: ignore
7 changes: 0 additions & 7 deletions .github/workflows/doc-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/istio-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand Down Expand Up @@ -139,7 +132,8 @@ jobs:
ISTIO_VERSION=${{ matrix.istioVersion }} make uninstall-istio

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output-${{ matrix.istioVersion }}
path: build/_output/test-logs
if-no-files-found: ignore
119 changes: 119 additions & 0 deletions .github/workflows/k3d-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Copyright 2019, 2024, 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 K3d build.
# ---------------------------------------------------------------------------
name: K3d Tests

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:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest

# Checkout the source, we need a depth of zero to fetch all the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
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/
sudo rm -rf /usr/local/lib/android
df -h

- name: Set up JDK
uses: oracle-actions/setup-java@v1
with:
website: oracle.com
release: 21

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x

- name: Cache Go Modules
uses: actions/cache@v4
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@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- 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: Run K3d Tests
shell: bash
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
make build-operator
make k3d
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: K3d Tests
shell: bash
timeout-minutes: 60
run: |
make e2e-k3d-test

- uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
name: test-output
path: build/_output/test-logs
10 changes: 2 additions & 8 deletions .github/workflows/k8s-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand All @@ -161,7 +154,8 @@ jobs:
./hack/k8s-certification.sh

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output-${{ matrix.matrixName }}
path: build/_output/test-logs
if-no-files-found: ignore
10 changes: 2 additions & 8 deletions .github/workflows/minikube-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand All @@ -141,7 +134,8 @@ jobs:
./hack/k8s-certification.sh

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output-${{ matrix.matrixName }}
path: build/_output/test-logs
if-no-files-found: ignore
10 changes: 2 additions & 8 deletions .github/workflows/prometheus-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand All @@ -121,7 +114,8 @@ jobs:
make e2e-prometheus-test

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output
path: build/_output/test-logs
if-no-files-found: ignore
29 changes: 22 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Start KinD Cluster
shell: bash
run: |
Expand Down Expand Up @@ -124,6 +117,28 @@ jobs:
asset_name: coherence.oracle.com_coherence_small.yaml
asset_content_type: text/plain

- name: Upload Release Job CRD
id: upload-release-crd
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /tmp/coherence-operator/_output/manifests/crd/coherencejob.oracle.com_coherence.yaml
asset_name: coherence.oracle.com_coherence.yaml
asset_content_type: text/plain

- name: Upload Release Small Job CRD
id: upload-release-small-crd
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /tmp/coherence-operator/_output/manifests/crd-small/coherencejob.oracle.com_coherence.yaml
asset_name: coherence.oracle.com_coherence_small.yaml
asset_content_type: text/plain

- name: Upload Release Dashboards
id: upload-release-dashboards
uses: actions/upload-release-asset@v1
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/tanzu-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache Tools
uses: actions/cache@v4
with:
path: build/tools
key: ${{ runner.os }}-build-tools-${{ hashFiles('**/Makefile') }}
restore-keys: ${{ runner.os }}-build-tools

- name: Edit DNS Resolve
shell: bash
run: |
Expand Down Expand Up @@ -140,13 +133,15 @@ jobs:
make run-certification OPERATOR_NAMESPACE=coherence

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: tanzu-artifacts
path: build/_output/tanzu
if-no-files-found: ignore

- uses: actions/upload-artifact@v4
if: failure()
if: ${{ failure() || cancelled() }}
with:
name: test-output
path: build/_output/test-logs
if-no-files-found: ignore
Loading
Loading