You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2022/08/10 13:56:47 UTC
[camel-k] branch main updated: feat: also build 1.9.x and 1.8.x as part of nightly builds
This is an automated email from the ASF dual-hosted git repository.
pcongiusti 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 43cd81965 feat: also build 1.9.x and 1.8.x as part of nightly builds
43cd81965 is described below
commit 43cd819651e5383f83c17a493aafb89958d946b9
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Mon Aug 8 09:37:27 2022 +0200
feat: also build 1.9.x and 1.8.x as part of nightly builds
---
.github/workflows/release-workflow.yml | 114 +++++++++++++++++++++++++++++++++
.github/workflows/release.yml | 111 +++++++++-----------------------
2 files changed, 146 insertions(+), 79 deletions(-)
diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml
new file mode 100644
index 000000000..6e6ce104c
--- /dev/null
+++ b/.github/workflows/release-workflow.yml
@@ -0,0 +1,114 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+name: release
+
+on:
+ workflow_call:
+ inputs:
+ ref:
+ required: true
+ type: string
+ goVersion:
+ required: true
+ type: string
+ javaVersion:
+ required: true
+ type: string
+ secrets:
+ registryUsername:
+ required: true
+ registryPassword:
+ required: true
+
+jobs:
+ release:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Set up JDK ${{ inputs.javaVersion }}
+ uses: actions/setup-java@v2
+ with:
+ version: ${{ inputs.javaVersion }}
+ distribution: "temurin"
+ - name: Install Go ${{ inputs.goVersion }}
+ uses: actions/setup-go@v2
+ with:
+ go-version: ${{ inputs.goVersion }}
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ ref: ${{ inputs.ref }}
+ - name: Cache modules
+ uses: actions/cache@v1
+ with:
+ path: ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+ - name: Get nightly version
+ shell: bash
+ run: |
+ V=$(make get-version | sed s/-SNAPSHOT/-nightly/)
+ echo "VERSION=$V" >> $GITHUB_ENV
+ - name: Global Env
+ run: |
+ echo "Using VERSION=${{ env.VERSION }}"
+
+ IMAGE_NAME=docker.io/${TEST_DOCKER_HUB_USERNAME:-testcamelk}/camel-k
+ echo "Using IMAGE_NAME=$IMAGE_NAME"
+ echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
+
+ MAVEN_REPOSITORY=$(make get-staging-repo)
+ echo "Using MAVEN_REPOSITORY=$MAVEN_REPOSITORY"
+ echo "MAVEN_REPOSITORY=$MAVEN_REPOSITORY" >> $GITHUB_ENV
+
+ - name: Login to Container Registry
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.registryUsername }}
+ password: ${{ secrets.registryPassword }}
+
+ - name: Codegen
+ run: |
+ make VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} codegen set-version build-resources
+
+ - name: Build
+ run: |
+ make VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} release-nightly
+
+ - name: Check
+ run: ls -l
+
+ - name: Create Release
+ id: create_release
+ uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
+ with:
+ artifacts: "./camel-k-client*.tar.gz"
+ body: |
+ Apache Camel K ${{ env.VERSION }} build for testing (unstable). This nightly release is using
+ an **unsupported** operator image published as `${{ env.IMAGE_NAME }}:${{ env.VERSION }}`
+
+ To test it, download the client for your OS and run:
+
+ ```
+ kamel install --olm=false --maven-repository=${{ env.MAVEN_REPOSITORY }}
+ ```
+ token: ${{ secrets.GITHUB_TOKEN }}
+ draft: false
+ prerelease: true
+ allowUpdates: true
+ replacesArtifacts: true
+ tag: ${{ env.VERSION }}
+ commit: main
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 785bc57ed..eb3c9b4d0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,3 +1,5 @@
+--- # ---------------------------------------------------------------------------
+
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -13,88 +15,39 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# ---------------------------------------------------------------------------
-
name: release
on:
schedule:
- - cron: "10 23 * * *"
+ - cron: "10 23 * * *"
jobs:
- release:
- runs-on: ubuntu-20.04
- steps:
- - name: Set up JDK 11
- uses: AdoptOpenJDK/install-jdk@v1
- with:
- version: "11"
- - name: Install Go
- uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
- - name: Checkout code
- uses: actions/checkout@v2
- - name: Cache modules
- uses: actions/cache@v1
- with:
- path: ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
- - name: Get nightly version
- shell: bash
- run: |
- V=$(make get-version | sed s/-SNAPSHOT/-nightly/)
- echo "VERSION=$V" >> $GITHUB_ENV
- - name: Global Env
- env:
- TEST_DOCKER_HUB_USERNAME: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
- TEST_DOCKER_HUB_PASSWORD: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
- run: |
- echo "Using VERSION=${{ env.VERSION }}"
-
- IMAGE_NAME=docker.io/${TEST_DOCKER_HUB_USERNAME:-testcamelk}/camel-k
- echo "Using IMAGE_NAME=$IMAGE_NAME"
- echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
-
- MAVEN_REPOSITORY=$(make get-staging-repo)
- echo "Using MAVEN_REPOSITORY=$MAVEN_REPOSITORY"
- echo "MAVEN_REPOSITORY=$MAVEN_REPOSITORY" >> $GITHUB_ENV
-
- docker login -u $TEST_DOCKER_HUB_USERNAME -p $TEST_DOCKER_HUB_PASSWORD
-
- - name: Codegen
- run: |
- make VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} codegen set-version build-resources
-
- - name: Build
- run: |
- make VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} release-nightly
-
- - name: Check
- run: ls -l
-
- - name: Create Release
- id: create_release
- uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
- with:
- artifacts: "./camel-k-client*.tar.gz"
- body: |
- Apache Camel K ${{ env.VERSION }} build for testing (unstable). This nightly release is using
- an **unsupported** operator image published as `${{ env.IMAGE_NAME }}:${{ env.VERSION }}`
-
- To test it, download the client for your OS and run:
-
- ```
- kamel install --olm=false --maven-repository=${{ env.MAVEN_REPOSITORY }}
- ```
- token: ${{ secrets.GITHUB_TOKEN }}
- draft: false
- prerelease: true
- allowUpdates: true
- replacesArtifacts: true
- tag: ${{ env.VERSION }}
- commit: main
-
-
+ main:
+ uses: ./.github/workflows/release-workflow.yaml
+ with:
+ ref: "main"
+ goVersion: "1.17.x"
+ javaVersion: "11"
+ secrets:
+ registryUsername: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
+ registryPassword: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
+
+ v1_8_x:
+ uses: ./.github/workflows/release-workflow.yaml
+ with:
+ ref: "release-1.8.x"
+ goVersion: "1.17.x"
+ javaVersion: "11"
+ secrets:
+ registryUsername: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
+ registryPassword: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
+
+ v1_9_x:
+ uses: ./.github/workflows/release-workflow.yaml
+ with:
+ ref: "release-1.9.x"
+ goVersion: "1.17.x"
+ javaVersion: "11"
+ secrets:
+ registryUsername: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
+ registryPassword: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}