Skip to content

Commit

Permalink
Fix Artifact release to also publish HCD 1.2 Agent
Browse files Browse the repository at this point in the history
* Combine release jobs into single workflow file
* Refactor Integration tests into its own submodule.
  Refactor Dockerfiles so building an image does not
  have to rebuild the artifacts within the Docker
  image build process
* Update Docker release to use release version artifacts
  • Loading branch information
emerkle826 committed Jan 17, 2025
1 parent 97a3b4b commit 8748e0a
Show file tree
Hide file tree
Showing 39 changed files with 538 additions and 928 deletions.
454 changes: 120 additions & 334 deletions .github/workflows/ci.yaml

Large diffs are not rendered by default.

66 changes: 0 additions & 66 deletions .github/workflows/jar-release.yaml

This file was deleted.

221 changes: 140 additions & 81 deletions .github/workflows/docker-release.yaml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
name: Docker Release
name: Create Release and publish artifacts and Docker images

on:
push:
tags:
- 'v*.*.*'

jobs:
build-dse-68-ubuntu:
strategy:
fail-fast: false
max-parallel: 4
matrix:
dse-version: [6.8.25, 6.8.26, 6.8.28, 6.8.29, 6.8.30, 6.8.31, 6.8.32, 6.8.33, 6.8.34, 6.8.35, 6.8.36, 6.8.37, 6.8.38, 6.8.39, 6.8.40, 6.8.41, 6.8.42, 6.8.43, 6.8.44, 6.8.46, 6.8.47, 6.8.48, 6.8.49, 6.8.50, 6.8.51, 6.8.52, 6.8.53]
image-base: [jdk8, jdk11]
include:
- dse-version: 6.8.53
latest: true
build-and-release:
name: Build Release with Artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Maven Settings File

- name: Checkout source code
uses: actions/checkout@v4
- name: Setup JDK 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Setup release version
run: |
RELEASE_VERSION="${GITHUB_REF##*/}"
RELEASE_VERSION="${RELEASE_VERSION:1}"
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
- name: Update pom with release version
run: |
mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }}
mvn versions:update-child-modules -Pdse,hcd
- name: Build with Maven
run: |
mkdir -p ~/.m2
cat <<EOF > ~/.m2/settings.xml
<settings>
<servers>
Expand All @@ -35,10 +47,59 @@ jobs:
<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 -q -ff clean package -Dskip.surefire.tests -DskipTests -DskipOpenApi -P dse,hcd
- name: Save Maven cache
uses: actions/cache/save@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Save Maven build artifacts
uses: actions/cache/save@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: zip-up
run: zip jars.zip */target/datastax-mgmtapi-*.jar
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: jars.zip
build-dse-68-ubuntu:
needs: build-and-release
strategy:
fail-fast: false
max-parallel: 4
matrix:
dse-version: [6.8.25, 6.8.26, 6.8.28, 6.8.29, 6.8.30, 6.8.31, 6.8.32, 6.8.33, 6.8.34, 6.8.35, 6.8.36, 6.8.37, 6.8.38, 6.8.39, 6.8.40, 6.8.41, 6.8.42, 6.8.43, 6.8.44, 6.8.46, 6.8.47, 6.8.48, 6.8.49, 6.8.50, 6.8.51, 6.8.52, 6.8.53]
image-base: [jdk8, jdk11]
include:
- dse-version: 6.8.53
latest: true
runs-on: ubuntu-latest
steps:
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down Expand Up @@ -115,27 +176,16 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down Expand Up @@ -255,6 +305,7 @@ jobs:
# --platform linux/amd64,linux/arm64 .

build-oss-4-0x:
needs: build-and-release
strategy:
fail-fast: false
max-parallel: 4
Expand All @@ -265,7 +316,16 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down Expand Up @@ -331,6 +391,7 @@ jobs:
--platform linux/amd64,linux/arm64 .
build-oss-4-1x:
needs: build-and-release
strategy:
fail-fast: false
max-parallel: 4
Expand All @@ -341,7 +402,16 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down Expand Up @@ -407,6 +477,7 @@ jobs:
--platform linux/amd64,linux/arm64 .
build-oss-5-0x:
needs: build-and-release
strategy:
fail-fast: false
max-parallel: 4
Expand All @@ -417,7 +488,16 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down Expand Up @@ -460,6 +540,7 @@ jobs:
--platform linux/amd64,linux/arm64 .
build-dse-69-ubuntu:
needs: build-and-release
strategy:
fail-fast: false
max-parallel: 4
Expand All @@ -471,27 +552,16 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down Expand Up @@ -542,27 +612,16 @@ jobs:
latest: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- name: Restore build workspace
uses: actions/cache/restore@v4
with:
path: /home/runner/work/management-api-for-apache-cassandra/management-api-for-apache-cassandra
key: ${{ runner.os }}-workspace-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ github.sha }}-${{ hashFiles('**/pom.xml') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog for Management API, new PRs should update the `main / unreleased` sect
```

## unreleased
* [BUGFIX] [#590](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/590) Fix Artifact release to also publish HCD 1.2 Agent

## v0.1.91 (2025-01-10)
* [FEATURE] [#573](https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/573) Add support for HCD 1.2
Expand Down
Loading

0 comments on commit 8748e0a

Please sign in to comment.