Release v5 #8
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
# SPDX-License-Identifier: Apache-2.0 | |
# Copyright Contributors to the ODPi Egeria project. | |
--- | |
name: "Release v5" | |
# Trigger when a Release is created in github | |
# - does not run on modification (may be just text) | |
on: | |
# No checks for branch or repo - assuming release creation is manual, controlled | |
release: | |
types: | |
- created | |
branches: [main, egeria-release-5*] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Release" | |
if: startsWith(github.repository,'odpi/') | |
steps: | |
- uses: actions/checkout@v4.1.0 | |
name: Checkout source | |
- uses: gradle/wrapper-validation-action@v2 | |
# Prep for docker builds | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to container registry (docker.io) | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: build and publish to maven central | |
uses: gradle/gradle-build-action@v3 | |
with: | |
cache-read-only: false | |
arguments: build publish -Dorg.gradle.parallel=false -Dorg.gradle.caching=false | |
# Import secrets needed for code signing and distribution | |
env: | |
OSSRH_GPG_KEYID: ${{ secrets.OSSRH_GPG_KEYID }} | |
OSSRH_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} | |
OSSRH_GPG_PRIVATE_KEY: ${{ secrets.OSSRH_GPG_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_mavenRepoUrl: https://oss.sonatype.org/service/local/staging/deploy/maven2 | |
ORG_GRADLE_PROJECT_mavenRepoPass: ${{ secrets.OSSRH_TOKEN }} | |
ORG_GRADLE_PROJECT_mavenRepoUser: ${{ secrets.OSSRH_USERNAME }} | |
# QEMU is needed for ARM64 build for egeria-configure | |
# egeria-configure needs to install utilities | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set Release version env variable | |
run: | | |
echo "VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep '^version:' | awk '{printf $2}')" >> $GITHUB_ENV | |
# Publish container images(egeria-platform) to docker.io | |
- name: Copy the distribution content to be used in docker copy command | |
run: | | |
cp -f container.application.properties ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/application.properties | |
mkdir -p ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-5.0-distribution.tar.gz/assembly/platform/data/servers | |
cp -r ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/opt/sample-configs/*-* ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz/assembly/platform/data/servers | |
- name: Build and push(egeria-platform) to docker.io | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: odpi/egeria-platform:${{ env.VERSION }}, odpi/egeria-platform:stable, | |
context: ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz | |
platforms: linux/amd64,linux/arm64 | |
# Publish container images(egeria-configure) to docker.io | |
- name: Build and push(egeria-configure) to docker.io | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: odpi/egeria-configure:${{ env.VERSION }}, odpi/egeria-configure:stable | |
context: ./open-metadata-resources/open-metadata-deployment/docker/configure | |
platforms: linux/amd64,linux/arm64 | |
# Mostly for verification - not published to the release itself for now | |
- name: Upload assemblies | |
uses: actions/upload-artifact@v4.3.1 | |
with: | |
name: Assemblies | |
path: open-metadata-distribution/omag-server-platform/build/distributions/*.gz |