You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2022/10/14 00:07:00 UTC
[camel-karavan] branch main updated: Build and push operator image
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 22fc322 Build and push operator image
22fc322 is described below
commit 22fc32211413b71691158c2a449472fc0dcb0ba3
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Thu Oct 13 20:06:50 2022 -0400
Build and push operator image
---
.github/workflows/operator.yml | 55 ++++++++++++++++++++++
.../src/main/resources/application.properties | 2 +-
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/operator.yml b/.github/workflows/operator.yml
new file mode 100644
index 0000000..e3aa7a9
--- /dev/null
+++ b/.github/workflows/operator.yml
@@ -0,0 +1,55 @@
+name: cloud-native app
+
+on:
+ push:
+ branches: [ main ]
+ workflow_dispatch:
+ pull_request:
+ branches: [ main ]
+
+env:
+ TAG: 3.18.5
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ # Generate Karavan UI model and API, Kamelets and Components
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository
+ !~/.m2/repository/org/apache/camel/karavan
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-maven-
+
+ # Build Karavan operator
+ - name: Build operator
+ run: |
+ mvn package -f karavan-operator -DskipTest \
+ -Dquarkus.container-image.build=true \
+ -Dquarkus.container-image.push=true \
+ -Dquarkus.container-image.image=ghcr.io/${GITHUB_REPOSITORY}-operator:${{ env.TAG }} \
+ -Dquarkus.container-image.username=${{ github.actor }} \
+ -Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }}
+ if: ${{ github.ref == 'refs/heads/main' }}
+
+ # Build the Operator Bundle image
+ - name: Build operator Bundle image
+ run: |
+ MY_BUNDLE_IMAGE=ghcr.io/${GITHUB_REPOSITORY}-bundle:${{ env.TAG }}
+ docker login -u=${{ github.actor }} -p=${{ secrets.GITHUB_TOKEN }}
+ docker build -t $MY_BUNDLE_IMAGE -f target/bundle/bundle.Dockerfile target/bundle
+ docker push $MY_BUNDLE_IMAGE
+ if: ${{ github.ref == 'refs/heads/main' }}
\ No newline at end of file
diff --git a/karavan-operator/src/main/resources/application.properties b/karavan-operator/src/main/resources/application.properties
index cf95614..879fffa 100644
--- a/karavan-operator/src/main/resources/application.properties
+++ b/karavan-operator/src/main/resources/application.properties
@@ -14,7 +14,7 @@ quarkus.kubernetes.add-version-to-label-selectors=false
quarkus.container-image.build=true
quarkus.container-image.builder=jib
-quarkus.container-image.group=apache
+quarkus.container-image.group=ghcr.io/apache
quarkus.container-image.name=camel-karavan-operator
quarkus.container-image.tag=3.18.5