Skip to content

Commit

Permalink
Consolidate multiple make targets used in Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
orpiske committed May 4, 2021
1 parent f528207 commit 2526328
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 75 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/knative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/openshift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2526328

Please sign in to comment.