forked from apache/incubator-kie-kogito-serverless-operator
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from rgdoliveira/sync_main
Sync main branch with Apache main branch
- Loading branch information
Showing
146 changed files
with
32,990 additions
and
2,441 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,8 @@ on: | |
- ".ci/jenkins/**" | ||
|
||
env: | ||
GO_VERSION: 1.19 | ||
# Kubernetes version should aligned with OCP LTS, aka OCP 4.10 (k8s 1.23) for now | ||
# https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.23.md | ||
# WARNING: kindest/node is not always existing with given version ... | ||
KUBERNETES_VERSION: v1.26.3 | ||
DEBUG: true | ||
GO_VERSION: 1.21 | ||
KIND_VERSION: v0.20.0 | ||
|
||
jobs: | ||
e2e: | ||
|
@@ -26,7 +22,7 @@ jobs: | |
cancel-in-progress: true | ||
timeout-minutes: 120 | ||
runs-on: ubuntu-latest | ||
name: End-to-end tests (Minikube) | ||
name: End-to-end tests (Kind) | ||
steps: | ||
- name: Install package | ||
run: | | ||
|
@@ -48,64 +44,48 @@ jobs: | |
go-version: ${{ env.GO_VERSION }} | ||
cache: true | ||
|
||
- name: Setup Minikube cluster | ||
# Should be set back with correct version once https://github.com/radtriste/setup-minikube/tree/issue_49 is done | ||
uses: medyagh/[email protected] | ||
with: | ||
addons: registry,metrics-server | ||
kubernetes-version: ${{ env.KUBERNETES_VERSION }} | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
cpus: max | ||
memory: max | ||
insecure-registry: localhost:5000,192.168.0.0/16 | ||
|
||
- name: Wait for Minikube up and running | ||
- name: Setup Kind cluster | ||
run: | | ||
minikube ssh cat /lib/systemd/system/docker.service | ||
kubectl get pods -A | ||
set -x | ||
MINIKUBE_COMPONENTS=(etcd kube-apiserver kube-controller-manager kube-scheduler) | ||
for component in "${MINIKUBE_COMPONENTS[@]}" | ||
do | ||
echo "Check component '${component}' is in 'Running' state" | ||
COMPONENT_NAME=${component} timeout 60s bash -c 'kubectl get pods -l tier=control-plane -l component=${COMPONENT_NAME} -n kube-system && while [[ "$(kubectl get pods -l tier=control-plane -l component=${COMPONENT_NAME} -n kube-system -o jsonpath={.items[0].status.phase})" != "Running" ]] ; do sleep 2 && kubectl get pods -l tier=control-plane -l component=${COMPONENT_NAME} -n kube-system -o jsonpath={.items[0].status.phase}; done' | ||
done | ||
make KIND_VERSION=${{ env.KIND_VERSION }} create-cluster | ||
- name: Wait for Minikube registry | ||
- name: Set OPERATOR_IMAGE_NAME to point to Kind's local registry | ||
run: | | ||
kubectl get pods -A | ||
timeout 60s bash -c 'kubectl get pods -l kubernetes.io/minikube-addons=registry -l actual-registry=true -n kube-system && while [[ "$(kubectl get pods -l kubernetes.io/minikube-addons=registry -l actual-registry=true -n kube-system -o jsonpath={.items[0].status.phase})" != "Running" ]] ; do sleep 2 && kubectl get pods -l kubernetes.io/minikube-addons=registry -l actual-registry=true -n kube-system -o jsonpath={.items[0].status.phase}; done' | ||
- name: Retrieve Minikube registry | ||
run: | | ||
minikube_registry="$(minikube ip):5000" | ||
echo "MINIKUBE_REGISTRY=${minikube_registry}" >> $GITHUB_ENV | ||
echo "OPERATOR_IMAGE_NAME=${minikube_registry}/kogito-serverless-operator:0.0.1" >> $GITHUB_ENV | ||
- name: Setup Python for cekit | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
echo "OPERATOR_IMAGE_NAME=127.0.0.1:5001/kogito-serverless-operator:0.0.1" >> $GITHUB_ENV | ||
# TODO: cache this installation | ||
- name: Build operator image | ||
run: | | ||
pip install cekit==4.5.0 | ||
pip install odcs podman behave lxml krb5 | ||
make container-build BUILDER=podman IMG=${{ env.OPERATOR_IMAGE_NAME }} | ||
make docker-build IMG=${{ env.OPERATOR_IMAGE_NAME }} | ||
- name: Load image in Minikube | ||
- name: Load image in Kind | ||
run: | | ||
podman push --tls-verify=false ${{ env.OPERATOR_IMAGE_NAME }} | ||
kind load docker-image 127.0.0.1:5001/kogito-serverless-operator:0.0.1 | ||
- name: Check pods | ||
run: | | ||
kubectl version | ||
kubectl get pods -A | ||
# TODO: install the operator-sdk first, then cache the installation | ||
|
||
- name: Deploy operator | ||
run: | | ||
make deploy IMG=${{ env.OPERATOR_IMAGE_NAME }} | ||
kubectl wait pod -A -l control-plane=controller-manager --for condition=Ready | ||
- name: Run tests | ||
run: | | ||
make test-e2e | ||
- name: Export kind logs | ||
if: always() | ||
run: | | ||
mkdir -p /tmp/kind/logs | ||
kind export logs --loglevel=debug /tmp/kind/logs | ||
- name: Upload kind logs | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} | ||
path: /tmp/kind/logs | ||
retention-days: 1 |
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
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
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
Oops, something went wrong.