Skip to content

Commit

Permalink
chore: Update GitHub actions CI
Browse files Browse the repository at this point in the history
- Use Camel K to 1.10.4
- Use newer Kind cluster version v0.17.0
- Bump YAKS to 0.15.1
- Use Knative serving v1.9.4
- Use Knative eventing v1.9.7
  • Loading branch information
christophd committed Aug 22, 2023
1 parent 0ada736 commit 5b7a25e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 60 deletions.
71 changes: 21 additions & 50 deletions .github/workflows/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,28 @@ on:
- main
- 1.6.x
- 1.8.x
- 1.10.x
push:
branches:
- main
- 1.6.x
- 1.8.x
- 1.10.x

jobs:
test:
runs-on: ubuntu-latest
env:
CAMEL_K_VERSION: 1.8.2
YAKS_VERSION: 0.10.0
CAMEL_K_VERSION: 1.10.4
YAKS_VERSION: 0.15.1
YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks"
YAKS_RUN_OPTIONS: "--timeout=15m"
KUBECTL_WAIT_TIMEOUT: "180s"
KNATIVE_SERVING_VERSION: v1.9.4
KNATIVE_EVENTING_VERSION: v1.9.7
KNATIVE_KOURIER_VERSION: v1.9.2
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Cleanup
run: |
ls -lart
Expand All @@ -59,62 +63,29 @@ jobs:
echo "Final status:"
df -h
- name: Set up JDK 11
uses: AdoptOpenJDK/install-jdk@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
version: "11"
java-version: '11'
distribution: 'temurin'
- name: Kind Cluster
uses: container-tools/kind-action@v1
uses: container-tools/kind-action@v2.0.1
with:
version: v0.11.0
node_image: kindest/node:v1.21.1@sha256:fae9a58f17f18f06aeac9772ca8b5ac680ebbed985e266f711d936e91d113bad
version: v0.17.0
node_image: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c
knative_serving: ${{ env.KNATIVE_SERVING_VERSION }}
knative_eventing: ${{ env.KNATIVE_EVENTING_VERSION }}
knative_kourier: ${{ env.KNATIVE_KOURIER_VERSION }}
- name: Info
run: |
kubectl version
kubectl cluster-info
kubectl describe nodes
- name: Install Knative
run: |
# Prerequisites
sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq
export SERVING_VERSION=v0.23.1
export EVENTING_VERSION=v0.23.2
export KOURIER_VERSION=v0.23.0
# Serving
kubectl apply --filename https://github.com/knative/serving/releases/download/$SERVING_VERSION/serving-crds.yaml
curl -L -s https://github.com/knative/serving/releases/download/$SERVING_VERSION/serving-core.yaml | head -n -1 | yq e 'del(.spec.template.spec.containers[].resources)' - | kubectl apply -f -
# Kourier
kubectl apply --filename https://github.com/knative/net-kourier/releases/download/$KOURIER_VERSION/kourier.yaml
kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}'
# Eventing
kubectl apply --filename https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/eventing-crds.yaml
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/eventing-core.yaml | head -n -1 | yq e 'del(.spec.template.spec.containers[].resources)' - | kubectl apply -f -
# Eventing channels
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/in-memory-channel.yaml | head -n -1 | yq e 'del(.spec.template.spec.containers[].resources)' - | kubectl apply -f -
# Eventing broker
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/mt-channel-broker.yaml | head -n -1 | yq e 'del(.spec.template.spec.containers[].resources)' - | kubectl apply -f -
# Eventing sugar controller for injection
kubectl apply -f https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/eventing-sugar-controller.yaml
# Wait for installation completed
echo "Waiting for all pods to be ready in kourier-system"
kubectl wait --for=condition=Ready pod --all -n kourier-system --timeout=$KUBECTL_WAIT_TIMEOUT
echo "Waiting for all pods to be ready in knative-serving"
kubectl wait --for=condition=Ready pod --all -n knative-serving --timeout=$KUBECTL_WAIT_TIMEOUT
echo "Waiting for all pods to be ready in knative-eventing"
kubectl wait --for=condition=Ready pod --all -n knative-eventing --timeout=$KUBECTL_WAIT_TIMEOUT
kubectl apply -f https://github.com/knative/serving/releases/download/knative-${{ env.KNATIVE_SERVING_VERSION }}/serving-default-domain.yaml
- name: Camel K Tools
uses: container-tools/camel-k-action@v1
uses: container-tools/camel-k-action@v1.0.3
with:
version: v${{ env.CAMEL_K_VERSION }}
- name: Install Camel K
Expand All @@ -126,7 +97,7 @@ jobs:
kamel install
- name: YAKS tools
uses: citrusframework/yaks-install-action@v1.0
uses: citrusframework/yaks-install-action@v1.1
with:
version: v${{ env.YAKS_VERSION }}
- name: Install YAKS
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/install-amq-broker-olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ TIMEOUT=${TIMEOUT:-30}
SOURCE=$(dirname "${BASH_SOURCE[0]}")
INFRA="${SOURCE}"/../../infra

CSV=$(oc get csv amq-broker-operator.${AMQ_BROKER_VERSION} -n ${YAKS_NAMESPACE} || echo "ERROR: failed to find AMQ Broker CSV")
CSV=$(oc get csv amq-broker-operator.${AMQ_BROKER_VERSION} -n ${YAKS_NAMESPACE} || echo "")
#check for existing amq-broker subscription
if [ "${CSV//ERROR/}" != "${CSV}" ]; then
if [ -z "$CSV" ]; then
echo "Create AMQ Broker subscription"

#create OperatorGroup
Expand Down
8 changes: 4 additions & 4 deletions test/scripts/install-amq-broker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

set -e

function waitFor() {
waitFor() {
for i in {1..30}; do
sleep 5
("$@") && return
echo "$i Waiting for exit code of command \"$@\"."
echo "$i Waiting for command to finish"
done
exit 1
}
Expand All @@ -31,10 +31,10 @@ INFRA="${SOURCE}"/../../infra
ACTIVEMQ_VERSION=v0.19.3
URL="https://raw.githubusercontent.com/artemiscloud/activemq-artemis-operator/${ACTIVEMQ_VERSION}"

BROKER=$(kubectl get activemqartemis/broker -n ${YAKS_NAMESPACE} || echo "ERROR: failed to find AMQ Broker instance")
BROKER=$(kubectl get activemqartemis/broker -n ${YAKS_NAMESPACE} || echo "")

#check for existing amq-broker instance
if [ "${BROKER//ERROR/}" != "${BROKER}" ]; then
if [ -z "$BROKER" ]; then

# Install AMQ Artemis
kubectl create -f "${URL}"/deploy/service_account.yaml
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/install-amq-streams-olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ TIMEOUT=${TIMEOUT:-30}
SOURCE=$(dirname "${BASH_SOURCE[0]}")
INFRA="${SOURCE}"/../../infra

CSV=$(oc get csv amqstreams.${AMQ_STREAMS_VERSION} -n ${YAKS_NAMESPACE} || echo "ERROR: failed to find AMQ Streams CSV")
CSV=$(oc get csv amqstreams.${AMQ_STREAMS_VERSION} -n ${YAKS_NAMESPACE} || echo "")
#check for existing amq-streams subscription
if [ "${CSV//ERROR/}" != "${CSV}" ]; then
if [ -z "$CSV" ]; then
echo "Create AMQ Streams subscription"

#create OperatorGroup
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/install-kafka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

set -e

CLUSTER=$(kubectl get kafka/my-cluster -n ${YAKS_NAMESPACE} || echo "ERROR: failed to find AMQ Streams Kafka instance")
CLUSTER=$(kubectl get kafka/my-cluster -n ${YAKS_NAMESPACE} || echo "")

#check for existing amq-streams kafka instance
if [ "${CLUSTER//ERROR/}" != "${CLUSTER}" ]; then
if [ -z "$CLUSTER" ]; then

# Install Kafka
kubectl create -f https://strimzi.io/install/latest?namespace=${YAKS_NAMESPACE}
Expand Down

0 comments on commit 5b7a25e

Please sign in to comment.