Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

update flink to 1.17.2, spark 3.3.4 (#171) #75

update flink to 1.17.2, spark 3.3.4 (#171)

update flink to 1.17.2, spark 3.3.4 (#171) #75

name: Integration tests
on:
push:
tags:
- "cloudflow_contrib_it_v*"
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
env:
PROJECT_ID: ${{ secrets.CLOUDFLOW_GKE_PROJECT }}
GKE_REGION: europe-west1
GKE_ZONE: europe-west1-b
DOCKER_REGISTRY: "eu.gcr.io"
DOCKER_REPOSITORY: ${{ secrets.CLOUDFLOW_GKE_PROJECT }}
MACHINE_ID: "cicon"
CLOUDFLOW_URL: "https://github.com/lightbend/cloudflow-contrib.git"
JAVA_OPTS: -Xms2048M -Xmx4096M -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
jobs:
gke:
name: Run Cloudflow-contrib Integration tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: 'Set version'
env:
VERSION: ${{ steps.vars.outputs.tag }}
run: |
echo "${VERSION}" | sed "s/cloudflow_contrib_it_v//" > .version
cat .version
- name: Set up JDK 11
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache Coursier cache
uses: coursier/cache-action@v5
# Latest tagged version uses a deprecated github actions feature that is going to be removed on 16th nov
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@15dc2ebff158fa77e9b28e43515bae5f990345b4
with:
version: '290.0.1'
service_account_key: ${{ secrets.CLOUDFLOW_GKE_SA_KEY }}
project_id: ${{ secrets.CLOUDFLOW_GKE_PROJECT }}
# jq it's installed with snap to avoid permissions errors
## when reading files.
- name: Setup the cluster
shell: bash {0}
run: |
sudo snap install helm --classic
sudo snap install kubectl --classic
sudo snap install yq
sudo apt-get update && sudo apt-get install -y jq
export VERSION=$(cat .version)
gcloud config set compute/region ${GKE_REGION}
gcloud config set compute/zone ${GKE_ZONE}
export VERSION=$(cat .version)
git clone ${CLOUDFLOW_URL} --branch v${VERSION} --depth 1 --single-branch ./cloudflow-contrib
cat cloudflow-contrib/project/Dependencies.scala | grep 'val cloudflowVersion' | awk '{ print $4}' > .cloudflow-version
cat .cloudflow-version
export CLOUDFLOW_VERSION=$(cat .cloudflow-version)
cd cloudflow-contrib
cd cloudflow-it
make spawn-gke-cluster version=${CLOUDFLOW_VERSION}
gcloud --quiet auth configure-docker
make prepare-cluster version=${CLOUDFLOW_VERSION}
- name: Cache locally cloudflow-contrib to avoid sonatype delays
run: |
export VERSION=$(cat .version)
cd cloudflow-contrib
echo "ThisBuild / version := \"$VERSION\"" > version.sbt
sbt 'set ThisBuild / publishMavenStyle := false' +publishLocal
- name: Prepare swiss-knife
run: |
export VERSION=$(cat .version)
cd cloudflow-contrib
cd cloudflow-it
make prepare-swiss-knife version=${VERSION}
- name: Prepare clis
run: |
export VERSION=$(cat .version)
cd cloudflow-contrib
cd cloudflow-it
make prepare-clis version=${VERSION}
- name: Integration test
run: |
export VERSION=$(cat .version)
cd cloudflow-contrib
cd cloudflow-it
make run-it-tests version=${VERSION}
- name: Cleanup the environment
if: ${{ always() }}
shell: bash {0}
run: |
export VERSION=$(cat .version)
echo y | gcloud container images delete $DOCKER_REGISTRY/${{ secrets.CLOUDFLOW_GKE_PROJECT }}/swiss-knife-akka:$VERSION
echo y | gcloud container images delete $DOCKER_REGISTRY/${{ secrets.CLOUDFLOW_GKE_PROJECT }}/swiss-knife-flink:$VERSION
echo y | gcloud container images delete $DOCKER_REGISTRY/${{ secrets.CLOUDFLOW_GKE_PROJECT }}/swiss-knife-spark:$VERSION
(cd cloudflow-contrib/cloudflow-it && make delete-gke-cluster version=${VERSION})