Skip to content

Commit

Permalink
Changes from feedback
Browse files Browse the repository at this point in the history
Signed-off-by: jkalinic <[email protected]>
  • Loading branch information
jankalinic committed Jul 18, 2024
1 parent 5234831 commit 424ce03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
metadata-file-path: '.github/project.yml'

- name: Set Image Tag Env
run: |
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "CURRENT_VERSION=$(echo ${{steps.metadata.outputs.current-version}} | tr '[:upper:]' '[:lower:]' )" >> $GITHUB_ENV
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand All @@ -58,7 +53,6 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_PASSWORD="${{ secrets.IMAGE_REPO_PASSWORD }}"
export QUARKUS_CONTAINER_IMAGE_PUSH="true"
export QUARKUS_CONTAINER_IMAGE_ADDITIONAL_TAGS=latest
export QUARKUS_CONTAINER_IMAGE_TAG="${{ env.PROJECT_VERSION }}"
export GIT_REVISION=$(git rev-parse --short release)
# Build and push the release images using the commit tagged in `release:prepare`
mvn -B -P container-image release:perform --no-transfer-progress '-Drelease.arguments=-Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64'
Expand All @@ -82,7 +76,7 @@ jobs:
push: true
file: target/checkout/operator/target/bundle/console-operator/bundle.Dockerfile
tags: |
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-bundle:${{ env.CURRENT_VERSION }}
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-bundle:${{steps.metadata.outputs.current-version}}
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-bundle:latest
- name: Build Operator Catalog
Expand All @@ -92,7 +86,8 @@ jobs:
chmod +x opm
sudo cp -v opm /usr/bin/
rm -vf opm
operator/bin/generate-catalog.sh ${{ env.PROJECT_VERSION }}
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | tr '[:upper:]' '[:lower:]')
operator/bin/generate-catalog.sh ${VERSION}
- name: Build and Push Operator Catalog Image
uses: docker/build-push-action@v6
Expand All @@ -103,7 +98,7 @@ jobs:
push: true
file: target/checkout/operator/target/catalog.Dockerfile
tags: |
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-catalog:${{ env.CURRENT_VERSION }}
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-catalog:${{steps.metadata.outputs.current-version}}
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-operator-catalog:latest
- name: Build UI
Expand All @@ -125,7 +120,7 @@ jobs:
provenance: false
push: true
tags: |
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:${{ env.CURRENT_VERSION }}
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:${{steps.metadata.outputs.current-version}}
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:latest
- name: Push Release Tag
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
local-file: 'true'

- name: Set Image Tag Env
run: |
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "NEXT_VERSION=$(echo ${{steps.metadata.outputs.next-version}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
run: echo "NEXT_VERSION=$(echo ${{steps.metadata.outputs.next-version}} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Setup JDK
uses: actions/setup-java@v4
Expand Down Expand Up @@ -55,7 +53,7 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_USERNAME="${{ secrets.IMAGE_REPO_USERNAME }}"
export QUARKUS_CONTAINER_IMAGE_PASSWORD="${{ secrets.IMAGE_REPO_PASSWORD }}"
export QUARKUS_CONTAINER_IMAGE_PUSH="true"
export QUARKUS_CONTAINER_IMAGE_TAG="${{ env.PROJECT_VERSION }}"
export QUARKUS_CONTAINER_IMAGE_TAG="${{ env.NEXT_VERSION }}"
export QUARKUS_CONTAINER_IMAGE_ADDITIONAL_TAGS=snapshot-${{github.ref_name}}
export GIT_REVISION=$(git rev-parse --short HEAD)
# Build and push the snapshot images
Expand Down Expand Up @@ -89,7 +87,7 @@ jobs:
chmod +x opm
sudo cp -v opm /usr/bin/
rm -vf opm
operator/bin/generate-catalog.sh ${{ env.PROJECT_VERSION }}
operator/bin/generate-catalog.sh ${{ env.NEXT_VERSION }}
- name: Build and Push Operator Catalog Image
uses: docker/build-push-action@v6
Expand Down

0 comments on commit 424ce03

Please sign in to comment.