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-runtime.git
commit 149525a37bd10134185dbc00101499d60c1180db Author: Pasquale Congiusti <[email protected]> AuthorDate: Mon Jul 3 10:30:34 2023 +0200 chore: join nightly tasks --- .github/actions/automatic-updates/action.yml | 36 ++++++++++- .github/workflows/automatic-changelog-update.yml | 59 ----------------- .github/workflows/ci-build-camel-main.yaml | 81 ------------------------ .github/workflows/generate-sbom-main.yml | 55 ---------------- .github/workflows/nightly-automatic-updates.yml | 34 +++++++++- 5 files changed, 67 insertions(+), 198 deletions(-) diff --git a/.github/actions/automatic-updates/action.yml b/.github/actions/automatic-updates/action.yml index b73edda0..fc6139ad 100644 --- a/.github/actions/automatic-updates/action.yml +++ b/.github/actions/automatic-updates/action.yml @@ -33,10 +33,42 @@ runs: CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" run: | ./scripts/sync_cq.sh - git add -A && git commit -m 'feat: new Camel Quarkus version' && echo "refresh=1" >> $GITHUB_ENV || echo "No changes in the release" + git add -A && git commit -m 'feat: new Camel Quarkus version' && echo "sync=1" >> $GITHUB_ENV || echo "No changes in the release" + + - name: Generate changelog + uses: ../.github/actions/changelog + with: + token: ${{ secrets.GITHUB_TOKEN }} + release_branch: ${{ inputs.branch-ref }} + - name: Commit changelog files + env: + CI_USER: "github-actions[bot]" + CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" + run: | + git config --local user.email "$CI_EMAIL" + git config --local user.name "$CI_USER" + git add CHANGELOG.md && git commit -m 'chore: update changelog' && echo "changelog=1" >> $GITHUB_ENV || echo "No changes to CHANGELOG.md" + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 11 + cache: 'maven' + - name: Build Camel-k-runtime Project for generating SBOM + run: ./mvnw -V --no-transfer-progress clean install -DskipTests -Psbom + - name: Commit sbom files + env: + CI_USER: "github-actions[bot]" + CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" + run: | + git config --local user.email "$CI_EMAIL" + git config --local user.name "$CI_USER" + git add camel-k-runtime-sbom && git commit -m 'chore: update SBOM' && echo "sbom=1" >> $GITHUB_ENV || echo "No changes to SBOM" + - name: Push changes shell: bash - if: env.refresh == 1 + if: env.sync == 1 || env.changelog == 1 || env.sbom == 1 env: CI_USER: "github-actions[bot]" CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" diff --git a/.github/workflows/automatic-changelog-update.yml b/.github/workflows/automatic-changelog-update.yml deleted file mode 100644 index 8a6526ec..00000000 --- a/.github/workflows/automatic-changelog-update.yml +++ /dev/null @@ -1,59 +0,0 @@ -# -# 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: Changelog - -on: - schedule: - # Run at 3 during the night - - cron: '0 3 * * *' - workflow_dispatch: - -jobs: - generate_changelog: - runs-on: ubuntu-latest - name: Generate changelog for main branch - if: github.ref == 'refs/heads/main' && github.repository == 'apache/camel-k-runtime' - steps: - - name: "Checkout camel-k-runtime" - uses: actions/checkout@v3 - with: - persist-credentials: false - submodules: recursive - - - name: Generate changelog - uses: ./.github/actions/changelog - with: - token: ${{ secrets.GITHUB_TOKEN }} - release_branch: "main" - - name: Commit files - env: - CI_USER: "github-actions[bot]" - CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" - run: | - git config --local user.email "$CI_EMAIL" - git config --local user.name "$CI_USER" - git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo "push=1" >> $GITHUB_ENV || echo "No changes to CHANGELOG.md" - - - name: Push changes - if: env.push == 1 - env: - CI_USER: "github-actions[bot]" - CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" - CI_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git push "https://$CI_USER:[email protected]/$GITHUB_REPOSITORY.git" HEAD:main diff --git a/.github/workflows/ci-build-camel-main.yaml b/.github/workflows/ci-build-camel-main.yaml deleted file mode 100644 index f1744f73..00000000 --- a/.github/workflows/ci-build-camel-main.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# -# 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: Build (Camel Main) - -env: - MAVEN_OPTS: -Xmx3000m - MAVEN_ARGS: -V -ntp -nsu -Dhttp.keepAlive=false -e -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -on: - push: - branches: - - camel-main - paths-ignore: - - '**.adoc' - - 'KEYS' - - 'LICENSE' - - 'NOTICE' - - 'Jenkinsfile' - pull_request: - branches: - - camel-main - paths-ignore: - - '**.adoc' - - 'KEYS' - - 'LICENSE' - - 'NOTICE' - - 'Jenkinsfile' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 -# For the time being (Camel 3.10 + Camel Quarkus 2.0) we remain aligned to Camel 3.10 -# because that's what Camel Quarkus depends on. After that, we can re-enable this. -# See: https://github.com/apache/camel-k-runtime/issues/669 -# - name: Build camel (main) -# run: | -# git clone --depth 1 --branch main https://github.com/apache/camel.git \ -# && cd camel \ -# && echo "Current Camel commit:" $(git rev-parse HEAD) \ -# && ./mvnw ${MAVEN_ARGS} clean install -Pfastinstall -# We are currently building with Quarkus Snapshots from Apache repos, which is why this -# this temporarily disabled -# - name: Build camel-quarkus (main) -# run: | -# git clone --depth 1 --branch main https://github.com/apache/camel-quarkus.git \ -# && cd camel-quarkus \ -# && echo "Current Camel Quarkus commit:" $(git rev-parse HEAD) \ -# && ./mvnw ${MAVEN_ARGS} clean install -Dquickly - - name: Build camel-k-runtime - run: ./mvnw ${MAVEN_ARGS} -Dcheckstyle.failOnViolation=true -Psourcecheck clean verify diff --git a/.github/workflows/generate-sbom-main.yml b/.github/workflows/generate-sbom-main.yml deleted file mode 100644 index 37abfa00..00000000 --- a/.github/workflows/generate-sbom-main.yml +++ /dev/null @@ -1,55 +0,0 @@ -# -# 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: Generate Camel K Runtime SBOM - -on: - schedule: - # Every 24 hours - - cron: '30 17 * * 0' - workflow_dispatch: - -jobs: - build: - name: Camel K Runtime SBOM Generation - if: github.repository == 'apache/camel-k-runtime' - runs-on: ubuntu-latest - steps: - - name: Checkout Camel-k-runtime project - uses: actions/checkout@v3 - with: - ref: main - persist-credentials: false - fetch-depth: 0 - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 11 - cache: 'maven' - - name: Build Camel-k-runtime Project for generating SBOM - run: ./mvnw -V --no-transfer-progress clean install -DskipTests -Psbom - - name: Create Pull Request - uses: peter-evans/[email protected] - with: - base: main - token: ${{ secrets.GITHUB_TOKEN }} - branch: regen_bot_sbom - title: '[Github Actions] Periodic Sync Camel K Runtime SBOM' - body: | - Camel-K-runtime for SBOM Generation. - see https://github.com/apache/camel-k-runtime/blob/main/.github/workflows/generate-sbom-main.yml diff --git a/.github/workflows/nightly-automatic-updates.yml b/.github/workflows/nightly-automatic-updates.yml index 1798ea0e..f3f116c6 100644 --- a/.github/workflows/nightly-automatic-updates.yml +++ b/.github/workflows/nightly-automatic-updates.yml @@ -40,4 +40,36 @@ jobs: branch-ref: "main" secretGithubToken: ${{ secrets.GITHUB_TOKEN }} -# TODO: enable the process on the release branches as soon as version 2 is released + release-1.17.x: + if: github.repository == 'apache/camel-k-runtime' + runs-on: ubuntu-20.04 + name: Automatic updates on release-1.17.x branch + steps: + - name: "Checkout code" + uses: actions/checkout@v3 + with: + ref: release-1.17.x + persist-credentials: false + submodules: recursive + - name: Automatic updates on release-1.17.x + uses: ./.github/actions/automatic-updates + with: + branch-ref: "release-1.17.x" + secretGithubToken: ${{ secrets.GITHUB_TOKEN }} + + release-1.15.x: + if: github.repository == 'apache/camel-k-runtime' + runs-on: ubuntu-20.04 + name: Automatic updates on release-1.15.x branch + steps: + - name: "Checkout code" + uses: actions/checkout@v3 + with: + ref: release-1.15.x + persist-credentials: false + submodules: recursive + - name: Automatic updates on release-1.15.x + uses: ./.github/actions/automatic-updates + with: + branch-ref: "release-1.15.x" + secretGithubToken: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file
