Skip to content

Create Release and Publish to Community Operators #87

Create Release and Publish to Community Operators

Create Release and Publish to Community Operators #87

name: Create Release and Publish to Community Operators
on:
workflow_dispatch:
inputs:
version:
description: 'The semantic version of the release (e.g. v1.2.3)'
required: true
previous_version:
description: 'The semantic version of the previous release (e.g. v1.2.2)'
required: false
type: string
branch:
description: 'The branch to create the release from (defaults to main)'
required: false
default: 'main'
operator_channel:
description: 'Channel to publish the new operator to'
required: true
type: string
github_name:
description: 'Your full name'
required: true
type: string
github_email:
description: 'Your e-mail address'
required: true
type: string
jobs:
# TODO(djzager): This is where we would want to do some integration testing
# test:
# ...
# might consider creating "rc" releases, building and testing those before
# publishing a release.
release-bases:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
steps:
- uses: konveyor/release-tools/create-release@main
with:
version: ${{ inputs.version }}
prev_version: ${{ inputs.previous_version }}
repository: konveyor/java-analyzer-bundle
ref: ${{ inputs.branch }}
github_token: ${{ secrets.GH_TOKEN }}
- run: |
#!/bin/bash
while ! docker pull quay.io/konveyor/jdtls-server-base:${{ inputs.version }} &> /dev/null; do
sleep 3m
done
docker image inspect quay.io/konveyor/jdtls-server-base:${{ inputs.version }}
- uses: konveyor/release-tools/create-release@main
with:
version: ${{ inputs.version }}
prev_version: ${{ inputs.previous_version }}
repository: konveyor/analyzer-lsp
ref: ${{ inputs.branch }}
github_token: ${{ secrets.GH_TOKEN }}
- run: |
#!/bin/bash
while ! docker pull quay.io/konveyor/analyzer-lsp:${{ inputs.version }} &> /dev/null; do
sleep 3m
done
docker image inspect quay.io/konveyor/analyzer-lsp:${{ inputs.version }}
- uses: konveyor/release-tools/create-release@main
with:
version: ${{ inputs.version }}
prev_version: ${{ inputs.previous_version }}
repository: konveyor/windup-shim
ref: ${{ inputs.branch }}
github_token: ${{ secrets.GH_TOKEN }}
- run: |
#!/bin/bash
while ! docker pull quay.io/konveyor/windup-shim:${{ inputs.version }} &> /dev/null; do
sleep 3m
done
docker image inspect quay.io/konveyor/windup-shim:${{ inputs.version }}
- uses: konveyor/release-tools/create-release@main
with:
version: ${{ inputs.version }}
prev_version: ${{ inputs.previous_version }}
repository: konveyor/tackle2-addon-analyzer
ref: ${{ inputs.branch }}
github_token: ${{ secrets.GH_TOKEN }}
- run: |
#!/bin/bash
while ! docker pull quay.io/konveyor/tackle2-addon-analyzer:${{ inputs.version }} &> /dev/null; do
sleep 3m
done
docker image inspect quay.io/konveyor/tackle2-addon-analyzer:${{ inputs.version }}
release-components:
runs-on: ubuntu-20.04
needs: release-bases
strategy:
matrix:
projects:
- repo: konveyor/tackle2-hub
image: konveyor/tackle2-hub
- repo: konveyor/tackle2-ui
image: konveyor/tackle2-ui
- repo: konveyor/tackle2-addon
image: konveyor/tackle2-addon
- repo: konveyor/operator
image: konveyor/tackle2-operator
- repo: konveyor/tackle-pathfinder
image: konveyor/tackle-pathfinder
- repo: konveyor/tackle-keycloak-theme
image: konveyor/tackle-keycloak-init
fail-fast: true
steps:
- uses: konveyor/release-tools/create-release@main
with:
version: ${{ inputs.version }}
prev_version: ${{ inputs.previous_version }}
repository: ${{ matrix.projects.repo }}
ref: ${{ inputs.branch }}
github_token: ${{ secrets.GH_TOKEN }}
- run: |
#!/bin/bash
while ! docker pull quay.io/${{ matrix.projects.image }}:${{ inputs.version }} &> /dev/null; do
sleep 3m
done
docker image inspect quay.io/${{ matrix.projects.image }}:${{ inputs.version }}
publish:
name: Build and Push Manifest
needs: release-components
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Checkout Push to Registry action
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- name: Run migrations
run: bash ./tools/konveyor-operator-publish-commands.sh
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_USER: ${{ secrets.GH_USER }}
QUAY_ROBOT: ${{ secrets.QUAY_PUBLISH_ROBOT }}
QUAY_TOKEN: ${{ secrets.QUAY_PUBLISH_TOKEN }}
OPERATOR_SEMVER: ${{ inputs.version }}
OPERATOR_CHANNEL: ${{ inputs.operator_channel }}
PREV_OPERATOR_SEMVER: ${{ inputs.previous_version }}
GITHUB_NAME: ${{ inputs.github_name }}
GITHUB_EMAIL: ${{ inputs.github_email }}