Try using a JobDTO which doesn't have an enum to avoid serialisation … #1128
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
name: Java CI | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
build-oss: | |
strategy: | |
fail-fast: false | |
matrix: | |
cassandra-version: ['3.11', '4.0', '4.1', '3.11_ubi', '4.0_ubi', '4.1_ubi'] | |
itTest : ['LifecycleIT', 'KeepAliveIT', 'NonDestructiveOpsIT', 'DestructiveOpsIT', 'NonDestructiveOpsResourcesV2IT'] | |
include: | |
- cassandra-version: '3.11' | |
run311tests: true | |
run311testsUBI: false | |
run40tests: false | |
run40testsUBI: false | |
run41tests: false | |
run41testsUBI: false | |
- cassandra-version: '4.0' | |
run311tests: false | |
run311testsUBI: false | |
run40tests: true | |
run40testsUBI: false | |
run41tests: false | |
run41testsUBI: false | |
- cassandra-version: '4.1' | |
run311tests: false | |
run311testsUBI: false | |
run40tests: false | |
run40testsUBI: false | |
run41tests: true | |
run41testsUBI: false | |
- cassandra-version: '3.11_ubi' | |
run311tests: false | |
run311testsUBI: true | |
run40tests: false | |
run40testsUBI: false | |
run41tests: false | |
run41testsUBI: false | |
- cassandra-version: '4.0_ubi' | |
run311tests: false | |
run311testsUBI: false | |
run40tests: false | |
run40testsUBI: true | |
run41tests: false | |
run41testsUBI: false | |
- cassandra-version: '4.1_ubi' | |
run311tests: false | |
run311testsUBI: false | |
run40tests: false | |
run40testsUBI: false | |
run41tests: false | |
run41testsUBI: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'zulu' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
- name: Build with Maven and run tests | |
run: | | |
mvn -B -q install --file pom.xml \ | |
-Drun311tests=${{ matrix.run311tests }} \ | |
-Drun40tests=${{ matrix.run40tests }} \ | |
-Drun41tests=${{ matrix.run41tests }} \ | |
-Drun311testsUBI=${{ matrix.run311testsUBI }} \ | |
-Drun40testsUBI=${{ matrix.run40testsUBI }} \ | |
-Drun41testsUBI=${{ matrix.run41testsUBI }} \ | |
-Dit.test=${{ matrix.itTest }} -DfailIfNoTests=false | |
build-dse: | |
if: github.repository_owner == 'k8ssandra' | |
strategy: | |
fail-fast: false | |
matrix: | |
platform-version: ['jdk8', 'ubi'] | |
itTest : ['LifecycleIT', 'KeepAliveIT', 'NonDestructiveOpsIT', 'DestructiveOpsIT', 'DSESpecificIT', 'NonDestructiveOpsResourcesV2IT'] | |
include: | |
- platform-version: 'jdk8' | |
runDSEtests: true | |
runDSEtestsUBI: false | |
- platform-version: 'ubi' | |
runDSEtests: false | |
runDSEtestsUBI: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'zulu' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
- name: Build with Maven and run tests | |
run: | | |
cat <<EOF > ~/.m2/settings.xml | |
<settings> | |
<servers> | |
<server> | |
<id>artifactory-snapshots</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
<server> | |
<id>artifactory-releases</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
</servers> | |
</settings> | |
EOF | |
cp ~/.m2/settings.xml settings.xml | |
mvn -B -q install --file pom.xml -P dse -Dit.test=${{ matrix.itTest }} -DfailIfNoTests=false \ | |
-DrunDSEtests=${{ matrix.runDSEtests }} \ | |
-DrunDSEtestsUBI=${{ matrix.runDSEtestsUBI }} | |
build-dse7: | |
if: github.repository_owner == 'k8ssandra' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'zulu' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
- name: Build with Maven and run tests | |
run: | | |
cat <<EOF > ~/.m2/settings.xml | |
<settings> | |
<servers> | |
<server> | |
<id>artifactory-snapshots</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
<server> | |
<id>artifactory-releases</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
<server> | |
<id>artifactory</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
</servers> | |
</settings> | |
EOF | |
cp ~/.m2/settings.xml settings.xml | |
mvn -B -q install --file pom.xml -P dse7 | |
publish-oss: | |
name: Publish ${{ matrix.cassandra-version }} Cassandra image | |
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push'}} | |
needs: build-oss | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- cassandra-version: '3.11' | |
docker-file: Dockerfile-oss | |
build-target: oss311 | |
- cassandra-version: '4.0' | |
docker-file: Dockerfile-4_0 | |
build-target: oss40 | |
- cassandra-version: '4.1' | |
docker-file: Dockerfile-4_1 | |
build-target: oss41 | |
- cassandra-version: '3.11-ubi8' | |
docker-file: Dockerfile-oss.ubi8 | |
build-target: oss311 | |
- cassandra-version: '4.0-ubi8' | |
docker-file: Dockerfile-4_0.ubi8 | |
build-target: oss40 | |
- cassandra-version: '4.1-ubi8' | |
docker-file: Dockerfile-4_1.ubi8 | |
build-target: oss41 | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
# Setup metadata based on the commit/tag that will be used for tagging the image | |
# Only build and publish a commit based tag | |
- name: Setup Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: k8ssandra/cass-management-api | |
tags: type=sha,prefix=${{ matrix.cassandra-version }}- | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push Cassandra ${{ matrix.cassandra-version }} | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
file: ${{ matrix.docker-file }} | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
platforms: linux/amd64,linux/arm64 | |
target: ${{ matrix.build-target }} | |
publish-dse-ubuntu: | |
name: Publish DSE 6.8 Ubuntu image | |
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push'}} | |
needs: build-dse | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
jdk-version: [jdk8, jdk11] | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
- name: Setup Maven settings file | |
run: | | |
mkdir -p ~/.m2 | |
cat <<EOF > ~/.m2/settings.xml | |
<settings> | |
<servers> | |
<server> | |
<id>artifactory-snapshots</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
<server> | |
<id>artifactory-releases</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
</servers> | |
</settings> | |
EOF | |
cp ~/.m2/settings.xml settings.xml | |
# Setup metadata based on the commit/tag that will be used for tagging the image | |
# Only build and publish a commit based tag | |
- name: Setup Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: datastax/dse-mgmtapi-6_8 | |
tags: type=sha,prefix=dse68-${{ matrix.jdk-version }}- | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Build and push DSE 6.8-${{ matrix.jdk-version }} | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
file: dse-68/Dockerfile.${{ matrix.jdk-version }} | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
platforms: linux/amd64,linux/arm64 | |
target: dse68 | |
publish-dse-ubi: | |
name: Publish DSE 6.8 UBI 8 image | |
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push'}} | |
needs: publish-dse-ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
- name: Setup Maven settings file | |
run: | | |
mkdir -p ~/.m2 | |
cat <<EOF > ~/.m2/settings.xml | |
<settings> | |
<servers> | |
<server> | |
<id>artifactory-snapshots</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
<server> | |
<id>artifactory-releases</id> | |
<username>${{ secrets.ARTIFACTORY_USERNAME }}</username> | |
<password>${{ secrets.ARTIFACTORY_PASSWORD }}</password> | |
</server> | |
</servers> | |
</settings> | |
EOF | |
cp ~/.m2/settings.xml settings.xml | |
# Setup metadata based on the commit/tag that will be used for tagging the image | |
# Only build and publish a commit based tag | |
- name: Setup Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: datastax/dse-mgmtapi-6_8 | |
tags: type=sha,prefix=dse68-ubi8- | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Build and push DSE 6.8-ubi8 | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
file: dse-68/Dockerfile.ubi8 | |
build-args: VERSION=dse68-jdk8-${{ steps.vars.outputs.sha_short }} | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
platforms: linux/amd64,linux/arm64 | |
target: dse68 |