This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new cc8ffa7  Consolidate multiple make targets used in Github actions
cc8ffa7 is described below

commit cc8ffa7594278af372c812e7d65982306b14ccef
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue May 4 13:35:02 2021 +0200

    Consolidate multiple make targets used in Github actions
---
 .github/workflows/builder.yml    | 15 +++------------
 .github/workflows/knative.yml    | 30 ++++++------------------------
 .github/workflows/kubernetes.yml | 15 +++------------
 .github/workflows/openshift.yml  | 16 ++--------------
 .github/workflows/upgrade.yml    | 16 +++-------------
 5 files changed, 17 insertions(+), 75 deletions(-)

diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml
index 18b30ac..5cbd42b 100644
--- a/.github/workflows/builder.yml
+++ b/.github/workflows/builder.yml
@@ -84,18 +84,9 @@ jobs:
     - name: Build Operator
       run: |
         echo "Build project"
-        make build-kamel bundle-kamelets
-        echo "Preparing the maven overlay"
-        make maven-overlay
-        echo "Adding maven artifacts to the image context"
-        make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
-        echo "Copying binary file to docker dir"
-        mkdir -p ./build/_output/bin
-        cp ./kamel ./build/_output/bin/
-        echo "Building the images"
-        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
-        docker build -t "${LOCAL_IMAGE}" -f build/Dockerfile .
-        docker push ${LOCAL_IMAGE}
+        export LOCAL_IMAGE=${KIND_REGISTRY}/apache/camel-k
+        echo "LOCAL_IMAGE=${LOCAL_IMAGE}:$(make get-version)" >> $GITHUB_ENV
+        make IMAGE_NAME=${LOCAL_IMAGE} PACKAGE_ARTIFACTS_STRATEGY=download 
build package-artifacts images images-push
 
         sudo mv ./kamel /usr/local/bin
     - name: Run IT
diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml
index b4e17ca..0112e19 100644
--- a/.github/workflows/knative.yml
+++ b/.github/workflows/knative.yml
@@ -129,18 +129,9 @@ jobs:
     - name: Build Operator
       run: |
         echo "Build project"
-        make build-kamel bundle-kamelets
-        echo "Preparing the maven overlay"
-        make maven-overlay
-        echo "Adding maven artifacts to the image context"
-        make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
-        echo "Copying binary file to docker dir"
-        mkdir -p ./build/_output/bin
-        cp ./kamel ./build/_output/bin/
-        echo "Building the images"
-        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
-        docker build -t "${LOCAL_IMAGE}" -f build/Dockerfile .
-        docker push ${LOCAL_IMAGE}
+        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k
+        echo "LOCAL_IMAGE=${LOCAL_IMAGE}:$(make get-version)" >> $GITHUB_ENV
+        make IMAGE_NAME=${LOCAL_IMAGE} PACKAGE_ARTIFACTS_STRATEGY=download 
build package-artifacts images images-push
 
         sudo mv ./kamel /usr/local/bin
     - name: Run IT
@@ -260,18 +251,9 @@ jobs:
       - name: Build Operator
         run: |
           echo "Build project"
-          make build-kamel bundle-kamelets
-          echo "Preparing the maven overlay"
-          make maven-overlay
-          echo "Adding maven artifacts to the image context"
-          make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
-          echo "Copying binary file to docker dir"
-          mkdir -p ./build/_output/bin
-          cp ./kamel ./build/_output/bin/
-          echo "Building the images"
-          export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
-          docker build -t "${LOCAL_IMAGE}" -f build/Dockerfile .
-          docker push ${LOCAL_IMAGE}
+          export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k
+          echo "LOCAL_IMAGE=${LOCAL_IMAGE}:$(make get-version)" >> $GITHUB_ENV
+          make IMAGE_NAME=${LOCAL_IMAGE} PACKAGE_ARTIFACTS_STRATEGY=download 
build package-artifacts images images-push
 
           sudo mv ./kamel /usr/local/bin
       - name: Run IT
diff --git a/.github/workflows/kubernetes.yml b/.github/workflows/kubernetes.yml
index a9933cd..53e9c47 100644
--- a/.github/workflows/kubernetes.yml
+++ b/.github/workflows/kubernetes.yml
@@ -84,18 +84,9 @@ jobs:
     - name: Build Operator
       run: |
         echo "Build project"
-        make build-kamel bundle-kamelets
-        echo "Preparing the maven overlay"
-        make maven-overlay
-        echo "Adding maven artifacts to the image context"
-        make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
-        echo "Copying binary file to docker dir"
-        mkdir -p ./build/_output/bin
-        cp ./kamel ./build/_output/bin/
-        echo "Building the images"
-        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
-        docker build -t "${LOCAL_IMAGE}" -f build/Dockerfile .
-        docker push ${LOCAL_IMAGE}
+        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k
+        echo "LOCAL_IMAGE=${LOCAL_IMAGE}:$(make get-version)" >> $GITHUB_ENV
+        make IMAGE_NAME=${LOCAL_IMAGE} PACKAGE_ARTIFACTS_STRATEGY=download 
build package-artifacts images images-push
 
         sudo mv ./kamel /usr/local/bin
     - name: Run IT
diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml
index 4c09daf..4a7b1df 100644
--- a/.github/workflows/openshift.yml
+++ b/.github/workflows/openshift.yml
@@ -146,21 +146,9 @@ jobs:
       run: |
         # Compute registry parameters
         echo "Build project"
-        make build-kamel bundle-kamelets
 
-        echo "Preparing the maven overlay"
-        make maven-overlay
-
-        echo "Adding maven artifacts to the image context"
-        make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
-
-        echo "Copying binary file to docker dir"
-        mkdir -p ./build/_output/bin
-        cp ./kamel ./build/_output/bin/
-
-        echo "Building the images"
-        export IMAGE=docker.io/apache/camel-k:$(make get-version)
-        docker build -t "${IMAGE}" -f build/Dockerfile .
+        export IMAGE_NAME=docker.io/apache/camel-k:$(make get-version)
+        make PACKAGE_ARTIFACTS_STRATEGY=download build package-artifacts images
 
         # Make the Apache Snapshots or Apache Staging repository enabled by 
default
         export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml
index a88c847..c6364c4 100644
--- a/.github/workflows/upgrade.yml
+++ b/.github/workflows/upgrade.yml
@@ -102,19 +102,9 @@ jobs:
     - name: Build Operator
       run: |
         echo "Build project"
-        make build-kamel bundle-kamelets
-        echo "Preparing the maven overlay"
-        make maven-overlay
-        echo "Adding maven artifacts to the image context"
-        make PACKAGE_ARTIFACTS_STRATEGY=download package-artifacts
-        echo "Copying binary file to docker dir"
-        mkdir -p ./build/_output/bin
-        cp ./kamel ./build/_output/bin/
-        echo "Building the images"
-        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k:$(make get-version)
-        echo "LOCAL_IMAGE=${LOCAL_IMAGE}" >> $GITHUB_ENV
-        docker build -t "${LOCAL_IMAGE}" -f build/Dockerfile .
-        docker push ${LOCAL_IMAGE}
+        export LOCAL_IMAGE=$KIND_REGISTRY/apache/camel-k
+        echo "LOCAL_IMAGE=${LOCAL_IMAGE}:$(make get-version)" >> $GITHUB_ENV
+        make IMAGE_NAME=${LOCAL_IMAGE} PACKAGE_ARTIFACTS_STRATEGY=download 
build package-artifacts images images-push
     - name: Build Operator bundle
       run: |
         echo "Build Operator bundle"

Reply via email to