-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Steven Sheehy <[email protected]>
- Loading branch information
1 parent
c148816
commit 5a16fdb
Showing
2 changed files
with
84 additions
and
75 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,86 +3,87 @@ name: Release Production | |
on: | ||
push: | ||
tags: [ v* ] | ||
branches: [ "6961-marketplace-fails" ] | ||
|
||
jobs: | ||
image: | ||
strategy: | ||
matrix: | ||
module: [ graphql, grpc, importer, monitor, rest, rest-java, rest-monitor, rosetta, test, web3 ] | ||
env: | ||
CONTEXT: hedera-mirror-${{ matrix.module }} | ||
IMAGE: gcr.io/mirrornode/hedera-mirror-${{ matrix.module }} | ||
name: Publish images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get tag | ||
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | ||
|
||
- name: Custom monitor path | ||
if: matrix.module == 'rest-monitor' | ||
run: echo "CONTEXT=hedera-mirror-rest/monitoring" >> $GITHUB_ENV | ||
|
||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: '${{ secrets.GCR_KEY }}' | ||
|
||
- name: Setup gcloud | ||
uses: google-github-actions/setup-gcloud@v1 | ||
|
||
- name: Configure Docker | ||
run: gcloud auth configure-docker gcr.io,marketplace.gcr.io | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
if: matrix.module != 'rest' && matrix.module != 'rest-monitor' && matrix.module != 'rosetta' | ||
with: | ||
arguments: build -x test | ||
|
||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build and push images | ||
uses: docker/build-push-action@v5 | ||
with: | ||
build-args: VERSION=${{env.TAG}} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
context: ${{env.CONTEXT}} | ||
platforms: linux/amd64, linux/arm64 | ||
provenance: false | ||
push: true | ||
tags: ${{env.IMAGE}}:${{env.TAG}},${{env.IMAGE}}:latest | ||
|
||
chart: | ||
name: Publish charts | ||
needs: image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Publish helm chart | ||
uses: stefanprodan/[email protected] | ||
with: | ||
target_dir: charts | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# image: | ||
# strategy: | ||
# matrix: | ||
# module: [ graphql, grpc, importer, monitor, rest, rest-java, rest-monitor, rosetta, test, web3 ] | ||
# env: | ||
# CONTEXT: hedera-mirror-${{ matrix.module }} | ||
# IMAGE: gcr.io/mirrornode/hedera-mirror-${{ matrix.module }} | ||
# name: Publish images | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Get tag | ||
# run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | ||
# | ||
# - name: Custom monitor path | ||
# if: matrix.module == 'rest-monitor' | ||
# run: echo "CONTEXT=hedera-mirror-rest/monitoring" >> $GITHUB_ENV | ||
# | ||
# - name: Install JDK | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# distribution: 'temurin' | ||
# java-version: 17 | ||
# | ||
# - name: Authenticate to Google Cloud | ||
# uses: google-github-actions/auth@v1 | ||
# with: | ||
# credentials_json: '${{ secrets.GCR_KEY }}' | ||
# | ||
# - name: Setup gcloud | ||
# uses: google-github-actions/setup-gcloud@v1 | ||
# | ||
# - name: Configure Docker | ||
# run: gcloud auth configure-docker gcr.io,marketplace.gcr.io | ||
# | ||
# - name: Build | ||
# uses: gradle/gradle-build-action@v2 | ||
# if: matrix.module != 'rest' && matrix.module != 'rest-monitor' && matrix.module != 'rosetta' | ||
# with: | ||
# arguments: build -x test | ||
# | ||
# - name: Setup QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
# | ||
# - name: Setup Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
# | ||
# - name: Build and push images | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# build-args: VERSION=${{env.TAG}} | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
# context: ${{env.CONTEXT}} | ||
# platforms: linux/amd64, linux/arm64 | ||
# provenance: false | ||
# push: true | ||
# tags: ${{env.IMAGE}}:${{env.TAG}},${{env.IMAGE}}:latest | ||
# | ||
# chart: | ||
# name: Publish charts | ||
# needs: image | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Publish helm chart | ||
# uses: stefanprodan/[email protected] | ||
# with: | ||
# target_dir: charts | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
marketplace: | ||
name: GCP Marketplace release | ||
needs: chart | ||
if: "!contains(github.ref, '-')" | ||
#if: "!contains(github.ref, '-')" | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
@@ -92,7 +93,9 @@ jobs: | |
MPDEV: "/home/runner/mpdev" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@ | ||
with: | ||
ref: tags/v0.89.0 | ||
|
||
- name: Authenticate to Google Cloud | ||
id: google-auth | ||
|
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