Skip to content
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
14 changes: 13 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,23 @@ jobs:
echo "Removing large packages"
sudo docker image prune --all --force
sudo docker builder prune -a
sudo apt-get remove -y '^aspnetcore-.*' || true
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y '^llvm-.*' || true
sudo apt-get remove -y '^temurin-.*' || 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 remove -y 'ruby.*' || true
sudo apt-get remove -y mercurial-common || true
sudo apt-get remove -y azure-cli || true
sudo apt-get remove -y google-cloud-cli-anthoscli || true
sudo apt-get remove -y google-cloud-sdk || true
sudo apt-get remove -y hhvm || true
sudo apt-get remove -y google-chrome-stable || true
sudo apt-get remove -y firefox || true
sudo apt-get remove -y microsoft-edge-stable || true
sudo apt-get remove -y powershell || true
sudo apt-get remove -y mono-devel || true
sudo apt-get autoremove -y || true
sudo apt-get clean
df -h
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coherence-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
LOAD_KIND: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/compatibility-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/istio-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/k3d-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/k8s-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ env:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
LOAD_KIND: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
33 changes: 26 additions & 7 deletions .github/workflows/minikube-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ env:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
LOAD_KIND: false
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand All @@ -40,19 +41,19 @@ jobs:
fail-fast: false
matrix:
matrixName:
- v1.34
- v1.33
- v1.32
- v1.31
- v1.30
include:
- matrixName: v1.34
k8s: v1.34.0
- matrixName: v1.33
k8s: v1.33.1
- matrixName: v1.32
k8s: v1.32.5
- matrixName: v1.31
k8s: v1.31.9
- matrixName: v1.30
k8s: v1.30.13

steps:
- uses: actions/checkout@v4
Expand All @@ -68,17 +69,33 @@ jobs:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
df -h
echo "Removing large packages"
sudo docker image prune --all --force
sudo docker builder prune -a
sudo apt-get remove -y '^aspnetcore-.*' || true
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y '^llvm-.*' || true
sudo apt-get remove -y '^temurin-.*' || 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 remove -y 'ruby.*' || true
sudo apt-get remove -y mercurial-common || true
sudo apt-get remove -y azure-cli || true
sudo apt-get remove -y google-cloud-cli-anthoscli || true
sudo apt-get remove -y google-cloud-sdk || true
sudo apt-get remove -y hhvm || true
sudo apt-get remove -y google-chrome-stable || true
sudo apt-get remove -y firefox || true
sudo apt-get remove -y microsoft-edge-stable || true
sudo apt-get remove -y powershell || true
sudo apt-get remove -y 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
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h

- name: Set up JDK
Expand Down Expand Up @@ -121,11 +138,13 @@ jobs:
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
docker pull gcr.io/distroless/java17-debian12
docker pull gcr.io/distroless/java21-debian12
./hack/k8s-certification.sh
make build-operator
make build-basic-test-image
make build-compatibility-image
make helm-chart
make certification-test

- uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prometheus-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tanzu-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_SPRING_CNBP: true

jobs:
build:
Expand Down
85 changes: 74 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ OPERATOR_REPO_IMAGE := $(OPERATOR_REPO_PREFIX):$(OPERATOR_IMAGE_TAG)
# ----------------------------------------------------------------------------------------------------------------------
# The test application images used in integration tests
# ----------------------------------------------------------------------------------------------------------------------
TEST_APPLICATION_IMAGE := $(OPERATOR_IMAGE_REGISTRY)/operator-test:1.0.0
TEST_APPLICATION_IMAGE ?= $(OPERATOR_IMAGE_REGISTRY)/operator-test:1.0.0
TEST_COMPATIBILITY_IMAGE := $(OPERATOR_IMAGE_REGISTRY)/operator-test-compatibility:1.0.0
TEST_APPLICATION_IMAGE_CLIENT := $(OPERATOR_IMAGE_REGISTRY)/operator-test-client:1.0.0
TEST_APPLICATION_IMAGE_HELIDON := $(OPERATOR_IMAGE_REGISTRY)/operator-test-helidon:1.0.0
Expand Down Expand Up @@ -1283,6 +1283,57 @@ oc-login:
# Allow anything in operator-test to pull images
# oc policy add-role-to-user system:image-puller system:serviceaccounts:operator-test --namespace=oracle

REDHAT_EXAMPLE_BASE_IMAGE ?= registry.redhat.io/ubi9/openjdk-21:latest
REDHAT_EXAMPLE_IMAGE_NAME := coherence-operator-operand
REDHAT_EXAMPLE_IMAGE := $(OPERATOR_RELEASE_REGISTRY)/$(REDHAT_EXAMPLE_IMAGE_NAME):$(COHERENCE_VERSION_LTS)-rh
OPENSHIFT_COHERENCE_COMPONENT_ID := 68d28054a49e977fe49f4234
OPENSHIFT_API_KEY ?= FAKE
SUBMIT_RESULTS ?= false

.PHONY: build-redhat-coherence-image
build-redhat-coherence-image: $(BUILD_TARGETS)/java ## Build the Red Hat Operator operand image
./mvnw $(MAVEN_BUILD_OPTS) -B -f java/operator-test clean package -DskipTests
mkdir -p java/operator-test/target/docker/licenses || true
cp LICENSE.txt java/operator-test/target/docker/licenses/LICENSE.txt
export DOCKER_CMD=$(DOCKER_CMD) \
&& export PROJECT_ROOT=$(CURRDIR) \
&& export BUILD_ALL_IMAGES=true \
&& export COHERENCE_VERSION=$(COHERENCE_VERSION_LTS) \
&& export REDHAT_REGISTRY_USERNAME=$(REDHAT_REGISTRY_USERNAME) \
&& export REDHAT_REGISTRY_PASSWORD=$(REDHAT_REGISTRY_PASSWORD) \
&& export AMD_BASE_IMAGE=$(REDHAT_EXAMPLE_BASE_IMAGE) \
&& export ARM_BASE_IMAGE=$(REDHAT_EXAMPLE_BASE_IMAGE) \
&& export IMAGE_NAME=$(REDHAT_EXAMPLE_IMAGE) \
&& export IMAGE_ARCH=$(IMAGE_ARCH) \
&& export MAIN_CLASS="com.tangosol.net.Coherence" \
&& export VERSION=$(VERSION) \
&& export REVISION=$(GITCOMMIT) \
&& export NO_DOCKER_DAEMON=$(NO_DOCKER_DAEMON) \
&& export DOCKER_CMD=$(DOCKER_CMD) \
&& $(SCRIPTS_DIR)/buildah/run-buildah.sh BUILD

.PHONY: push-redhat-coherence-image
push-redhat-coherence-image: ## Push the Red Hat Operator operand image
chmod +x $(SCRIPTS_DIR)/buildah/run-buildah.sh
export IMAGE_NAME=$(REDHAT_EXAMPLE_IMAGE) \
export IMAGE_NAME_AMD=$(REDHAT_EXAMPLE_IMAGE)-amd64 \
export IMAGE_NAME_ARM=$(REDHAT_EXAMPLE_IMAGE)-arm64 \
&& export IMAGE_NAME_REGISTRY=$(OPERATOR_RELEASE_REGISTRY) \
&& export VERSION=$(COHERENCE_VERSION_LTS) \
&& export REVISION=$(COHERENCE_VERSION_LTS) \
&& export NO_DOCKER_DAEMON=$(NO_DOCKER_DAEMON) \
&& export DOCKER_CMD=$(DOCKER_CMD) \
&& $(SCRIPTS_DIR)/buildah/run-buildah.sh PUSH

.PHONY: redhat-coherence-image-preflight
redhat-coherence-image-preflight: ## Run the OpenShift preflight tests against the Operator operand image in a container
chmod +x $(SCRIPTS_DIR)/openshift/run-coherence-preflight.sh
mkdir -p $(BUILD_PREFLIGHT) || true
export OPENSHIFT_COHERENCE_COMPONENT_ID=$(OPENSHIFT_COHERENCE_COMPONENT_ID) \
&& export SUBMIT_RESULTS=$(SUBMIT_RESULTS) \
&& export REDHAT_EXAMPLE_IMAGE=$(REDHAT_EXAMPLE_IMAGE) \
&& $(SCRIPTS_DIR)/openshift/run-coherence-preflight.sh

# ======================================================================================================================
# Targets to run various tests
# ======================================================================================================================
Expand Down Expand Up @@ -2667,10 +2718,10 @@ ifneq ("$(OPERATOR_RELEASE_REGISTRY)","$(OPERATOR_IMAGE_REGISTRY)")
$(DOCKER_CMD) tag $(OPERATOR_IMAGE_AMD) $(OPERATOR_RELEASE_AMD)
endif
chmod +x $(SCRIPTS_DIR)/buildah/run-buildah.sh
export OPERATOR_IMAGE=$(OPERATOR_RELEASE_IMAGE) \
&& export OPERATOR_IMAGE_AMD=$(OPERATOR_RELEASE_AMD) \
&& export OPERATOR_IMAGE_ARM=$(OPERATOR_RELEASE_ARM) \
&& export OPERATOR_IMAGE_REGISTRY=$(OPERATOR_RELEASE_REGISTRY) \
export IMAGE_NAME=$(OPERATOR_RELEASE_IMAGE) \
&& export IMAGE_NAME_AMD=$(OPERATOR_RELEASE_AMD) \
&& export IMAGE_NAME_ARM=$(OPERATOR_RELEASE_ARM) \
&& export IMAGE_NAME_REGISTRY=$(OPERATOR_RELEASE_REGISTRY) \
&& export VERSION=$(VERSION) \
&& export REVISION=$(GITCOMMIT) \
&& export NO_DOCKER_DAEMON=$(NO_DOCKER_DAEMON) \
Expand All @@ -2692,10 +2743,10 @@ ifneq ("$(OPERATOR_RELEASE_REGISTRY)","$(OPERATOR_IMAGE_REGISTRY)")
$(DOCKER_CMD) tag $(PREV_OPERATOR_IMAGE_AMD) $(PREV_OPERATOR_RELEASE_AMD)
endif
chmod +x $(SCRIPTS_DIR)/buildah/run-buildah.sh
export OPERATOR_IMAGE=$(PREV_OPERATOR_RELEASE_IMAGE) \
&& export OPERATOR_IMAGE_AMD=$(PREV_OPERATOR_RELEASE_AMD) \
&& export OPERATOR_IMAGE_ARM=$(PREV_OPERATOR_RELEASE_ARM) \
&& export OPERATOR_IMAGE_REGISTRY=$(PREV_OPERATOR_RELEASE_REGISTRY) \
export IMAGE_NAME=$(PREV_OPERATOR_RELEASE_IMAGE) \
&& export IMAGE_NAME_AMD=$(PREV_OPERATOR_RELEASE_AMD) \
&& export IMAGE_NAME_ARM=$(PREV_OPERATOR_RELEASE_ARM) \
&& export IMAGE_NAME_REGISTRY=$(PREV_OPERATOR_RELEASE_REGISTRY) \
&& export VERSION=$(PREV_VERSION) \
&& export REVISION=$(GITCOMMIT) \
&& export NO_DOCKER_DAEMON=$(NO_DOCKER_DAEMON) \
Expand All @@ -2706,8 +2757,7 @@ endif
# Push the Operator JIB Test Docker images
# ----------------------------------------------------------------------------------------------------------------------
.PHONY: push-test-images
push-test-images:
$(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE)
push-test-images: push-basic-test-image
$(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_CLIENT)
$(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_HELIDON)
$(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_HELIDON_2)
Expand All @@ -2721,6 +2771,19 @@ ifneq (true,$(SKIP_SPRING_CNBP))
$(DOCKER_CMD) push $(PUSH_ARGS) $(TEST_APPLICATION_IMAGE_SPRING_CNBP_2)
endif

.PHONY: push-basic-test-image
push-basic-test-image:
chmod +x $(SCRIPTS_DIR)/buildah/run-buildah.sh
export IMAGE_NAME=$(TEST_APPLICATION_IMAGE) \
export IMAGE_NAME_AMD=$(TEST_APPLICATION_IMAGE)-amd64 \
export IMAGE_NAME_ARM=$(TEST_APPLICATION_IMAGE)-arm64 \
&& export IMAGE_NAME_REGISTRY=$(OPERATOR_RELEASE_REGISTRY) \
&& export VERSION=$(VERSION) \
&& export REVISION=$(GITCOMMIT) \
&& export NO_DOCKER_DAEMON=$(NO_DOCKER_DAEMON) \
&& export DOCKER_CMD=$(DOCKER_CMD) \
&& $(SCRIPTS_DIR)/buildah/run-buildah.sh PUSH

# ----------------------------------------------------------------------------------------------------------------------
# Push the Operator Test images to ttl.sh
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
Loading