Skip to content

Commit

Permalink
Add Cassandra 4.1 builds (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
emerkle826 authored Oct 14, 2022
1 parent edf0c28 commit 5001edf
Show file tree
Hide file tree
Showing 36 changed files with 1,727 additions and 104 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,67 @@ jobs:
strategy:
fail-fast: false
matrix:
cassandra-version: [3.11, 4.0]
cassandra-version: [3.11, 4.0, 4.1]
include:
- cassandra-version: 3.11
run311tests: true
run40tests: false
run41tests: false
- cassandra-version: 4.0
run311tests: false
run40tests: true
run41tests: false
- cassandra-version: 4.1
run311tests: false
run40tests: false
run41tests: true

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: 8
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v1
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@v1
uses: docker/setup-qemu-action@v2
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v1
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 }}
mvn -B -q install --file pom.xml -Drun311tests=${{ matrix.run311tests }} -Drun40tests=${{ matrix.run40tests }} -Drun41tests=${{ matrix.run41tests }}
build-dse:
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push'}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: 8
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v1
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@v1
uses: docker/setup-qemu-action@v2
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Build with Maven and run tests
Expand Down Expand Up @@ -96,9 +104,12 @@ jobs:
- cassandra-version: '4.0'
docker-file: Dockerfile-4_0
build-target: oss40
- cassandra-version: '4.1'
docker-file: Dockerfile-4_1
build-target: oss41
steps:
- name: Check out source code
uses: actions/checkout@v2
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
Expand All @@ -108,9 +119,9 @@ jobs:
images: k8ssandra/cass-management-api
tags: type=sha,prefix=${{ matrix.cassandra-version }}-
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -136,7 +147,7 @@ jobs:
jdk-version: [jdk8, jdk11]
steps:
- name: Check out source code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Maven settings file
run: |
mkdir -p ~/.m2
Expand Down Expand Up @@ -166,7 +177,7 @@ jobs:
images: datastax/dse-mgmtapi-6_8
tags: type=sha,prefix=dse68-${{ matrix.jdk-version }}-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand Down
62 changes: 53 additions & 9 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Setup Maven Settings File
run: |
mkdir -p ~/.m2
Expand All @@ -39,10 +39,10 @@ jobs:
EOF
cp ~/.m2/settings.xml settings.xml
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to Docker Hub
Expand Down Expand Up @@ -104,12 +104,12 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to Docker Hub
Expand Down Expand Up @@ -148,12 +148,12 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: latest
- name: Login to Docker Hub
Expand Down Expand Up @@ -181,3 +181,47 @@ jobs:
--file Dockerfile-4_0 \
--target oss40 \
--platform linux/amd64,linux/arm64 .
build-oss-4-1x:
strategy:
fail-fast: false
matrix:
cassandra-version: [4.1-beta1]
include:
- cassandra-version: 4.1-beta1
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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: Login to Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
- if: ${{ matrix.latest }}
name: Publish ${{ matrix.cassandra-version }} to Registry
run: |
RELEASE_VERSION="${GITHUB_REF##*/}"
docker buildx build --push \
--build-arg CASSANDRA_VERSION=${{ matrix.cassandra-version }} \
--tag k8ssandra/cass-management-api:4.1 \
--tag k8ssandra/cass-management-api:${{ matrix.cassandra-version }} \
--tag k8ssandra/cass-management-api:${{ matrix.cassandra-version }}-$RELEASE_VERSION \
--file Dockerfile-4_1 \
--target oss41 \
--platform linux/amd64,linux/arm64 .
- if: ${{ !matrix.latest }}
name: Publish ${{ matrix.cassandra-version }} to Registry
run: |
RELEASE_VERSION="${GITHUB_REF##*/}"
docker buildx build --push \
--build-arg CASSANDRA_VERSION=${{ matrix.cassandra-version }} \
--tag k8ssandra/cass-management-api:${{ matrix.cassandra-version }} \
--tag k8ssandra/cass-management-api:${{ matrix.cassandra-version }}-$RELEASE_VERSION \
--file Dockerfile-4_1 \
--target oss41 \
--platform linux/amd64,linux/arm64 .
10 changes: 5 additions & 5 deletions .github/workflows/jar-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 13
java-package: jdk
java-version: 8
distribution: 'zulu'
- name: Build with Maven
run: |
cat <<EOF > ~/.m2/settings.xml
Expand All @@ -62,7 +62,7 @@ jobs:
mvn -q -ff package -DskipTests -P dse
- name: zip-up
run: |
zip jars.zip management-api-agent-common/target/datastax-mgmtapi-agent-*.jar management-api-agent-3.x/target/datastax-mgmtapi-agent-*.jar management-api-agent-4.x/target/datastax-mgmtapi-agent-*.jar management-api-agent-dse-6.8/target/datastax-mgmtapi-agent-*.jar management-api-server/target/datastax-mgmtapi-server-*.jar management-api-common/target/datastax-mgmtapi-common-*.jar
zip jars.zip management-api-agent-common/target/datastax-mgmtapi-agent-*.jar management-api-agent-3.x/target/datastax-mgmtapi-agent-*.jar management-api-agent-4.x/target/datastax-mgmtapi-agent-*.jar management-api-agent-4.1.x/target/datastax-mgmtapi-agent-*.jar management-api-agent-dse-6.8/target/datastax-mgmtapi-agent-*.jar management-api-server/target/datastax-mgmtapi-server-*.jar management-api-common/target/datastax-mgmtapi-common-*.jar
- name: Retrieve stashed release URL
uses: actions/download-artifact@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Fossa CLI
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- -b .
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/maven-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: 8
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile-4_0
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG CASSANDRA_VERSION=4.0.6

FROM --platform=$BUILDPLATFORM maven:3.6.3-jdk-8-slim as builder

ARG METRICS_COLLECTOR_VERSION=0.3.0
ARG METRICS_COLLECTOR_VERSION=0.3.3
ARG CDC_AGENT_VERSION=2.0.0
ARG CDC_AGENT_EDITION=agent-c4

Expand All @@ -12,6 +12,7 @@ COPY pom.xml ./
COPY management-api-agent-common/pom.xml ./management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml ./management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml ./management-api-agent-4.x/pom.xml
COPY management-api-agent-4.1.x/pom.xml ./management-api-agent-4.1.x/pom.xml
COPY management-api-common/pom.xml ./management-api-common/pom.xml
COPY management-api-server/pom.xml ./management-api-server/pom.xml
# this duplicates work done in the next steps, but this should provide
Expand All @@ -21,6 +22,7 @@ RUN mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target
COPY management-api-agent-common ./management-api-agent-common
COPY management-api-agent-3.x ./management-api-agent-3.x
COPY management-api-agent-4.x ./management-api-agent-4.x
COPY management-api-agent-4.1.x ./management-api-agent-4.1.x
COPY management-api-common ./management-api-common
COPY management-api-server ./management-api-server
RUN mvn -q -ff package -DskipTests
Expand Down
Loading

0 comments on commit 5001edf

Please sign in to comment.