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/12/15 13:49:53 UTC

[camel-k] branch main updated (d9e7d153b -> 12326acdc)

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

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


    from d9e7d153b Fix typo in README
     new d6d593f26 feat(ci): automatic make generate
     new 12326acdc chore(ci): simplify nightly release task

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/actions/automatic-updates/action.yml       | 60 +++++++++++++++++++++
 .github/actions/release-nightly/action.yml         |  9 ++++
 .github/workflows/automatic-changelog-update.yml   | 60 ---------------------
 .../workflows/{local.yml => automatic-updates.yml} | 63 +++++++++-------------
 .github/workflows/release.yml                      | 31 +++--------
 .gitignore                                         |  1 +
 6 files changed, 103 insertions(+), 121 deletions(-)
 create mode 100644 .github/actions/automatic-updates/action.yml
 delete mode 100644 .github/workflows/automatic-changelog-update.yml
 copy .github/workflows/{local.yml => automatic-updates.yml} (57%)


[camel-k] 01/02: feat(ci): automatic make generate

Posted by pc...@apache.org.
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

commit d6d593f267c419c8f68a7449f00b560e8014a30d
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Dec 15 13:18:01 2022 +0100

    feat(ci): automatic make generate
    
    * run `make generate` every night to refresh automatically the autogenerated resources
    * ignore resource.go
    
    Closes #3868
---
 .github/actions/automatic-updates/action.yml     | 60 ++++++++++++++++++++++++
 .github/workflows/automatic-changelog-update.yml | 60 ------------------------
 .github/workflows/automatic-updates.yml          | 52 ++++++++++++++++++++
 .gitignore                                       |  1 +
 4 files changed, 113 insertions(+), 60 deletions(-)

diff --git a/.github/actions/automatic-updates/action.yml b/.github/actions/automatic-updates/action.yml
new file mode 100644
index 000000000..126a90984
--- /dev/null
+++ b/.github/actions/automatic-updates/action.yml
@@ -0,0 +1,60 @@
+# ---------------------------------------------------------------------------
+# 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: automatic-updates
+description: 'action used to run automation required by the project'
+
+inputs:
+  branch-ref:
+    required: true
+    type: string
+
+runs:
+  using: "composite"
+  steps:
+    - name: "Checkout code"
+      uses: actions/checkout@v2
+      with:
+        ref: ${{ inputs.branch-ref }}
+        persist-credentials: false
+        submodules: recursive
+    - name: Generate changelog
+      uses: ./.github/actions/changelog
+      with:
+        token: ${{ secrets.GITHUB_TOKEN }}
+        release_branch: ${{ inputs.branch-ref }}
+    - 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 'chore: changelog automatic update' && echo "changelog=1" >> $GITHUB_ENV || echo "No changes to CHANGELOG"
+    - name: Make generate and commit
+      env:
+        CI_USER: "github-actions[bot]"
+        CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
+      run: |
+        make generate
+        git add -A && git commit -m 'chore: make generate automatic update' && echo "make_generate=1" >> $GITHUB_ENV || echo "No changes to Make generate"
+    - name: Push changes
+      if: env.changelog == 1 || env.make_generate == 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:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${{ inputs.branch-ref }}
diff --git a/.github/workflows/automatic-changelog-update.yml b/.github/workflows/automatic-changelog-update.yml
deleted file mode 100644
index be6356bb7..000000000
--- a/.github/workflows/automatic-changelog-update.yml
+++ /dev/null
@@ -1,60 +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-20.04
-    name: Generate changelog for main branch
-    if: github.ref == 'refs/heads/main' && github.repository == 'apache/camel-k'
-    steps:
-      - name: "Checkout camel-k"
-        uses: actions/checkout@v2
-        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:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:main
diff --git a/.github/workflows/automatic-updates.yml b/.github/workflows/automatic-updates.yml
new file mode 100644
index 000000000..9b3fe0933
--- /dev/null
+++ b/.github/workflows/automatic-updates.yml
@@ -0,0 +1,52 @@
+# ---------------------------------------------------------------------------
+# 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: Automatic Updates
+
+on:
+  schedule:
+    - cron:  '30 0 * * *'
+  workflow_dispatch:
+
+jobs:
+  main:
+    if: github.repository == 'apache/camel-k'
+    runs-on: ubuntu-20.04
+    name: Generate changelog for main branch
+    steps:
+    - name: Automatic updates on main
+      uses: ./.github/actions/automatic-updates
+      with:
+        branch-ref: "main"
+
+  v1_10_x:
+    if: github.repository == 'apache/camel-k'
+    runs-on: ubuntu-20.04
+    steps:
+    - name: Automatic updates on release-1.10.x
+      uses: ./.github/actions/automatic-updates
+      with:
+        branch-ref: "release-1.10.x"
+
+  v1_8_x_lts:
+    if: github.repository == 'apache/camel-k'
+    runs-on: ubuntu-20.04
+    steps:
+    - name: Automatic updates on release-1.18.x
+      uses: ./.github/actions/automatic-updates
+      with:
+        branch-ref: "release-1.8.x"
diff --git a/.gitignore b/.gitignore
index 3cf2aec9e..4835016a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -168,3 +168,4 @@ config/**/*.gen.yaml
 config/**/*.gen.json
 
 *-installer*
+pkg/resources/resources.go


[camel-k] 02/02: chore(ci): simplify nightly release task

Posted by pc...@apache.org.
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

commit 12326acdc7dfc49dcc93f96c3d3e503c653cd345
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Dec 15 13:21:19 2022 +0100

    chore(ci): simplify nightly release task
---
 .github/actions/release-nightly/action.yml |  9 +++++++++
 .github/workflows/automatic-updates.yml    |  4 ++--
 .github/workflows/release.yml              | 31 ++++++++----------------------
 3 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/.github/actions/release-nightly/action.yml b/.github/actions/release-nightly/action.yml
index f8a7e0026..cf78042ef 100644
--- a/.github/actions/release-nightly/action.yml
+++ b/.github/actions/release-nightly/action.yml
@@ -17,6 +17,9 @@ name: release-nightly
 description: 'action used to release nightly'
 
 inputs:
+  branch-ref:
+    required: true
+    type: string
   goVersion:
     required: true
     type: string
@@ -39,6 +42,12 @@ runs:
   using: "composite"
 
   steps:
+    - name: "Checkout code"
+      uses: actions/checkout@v2
+      with:
+        ref: ${{ inputs.branch-ref }}
+        persist-credentials: false
+        submodules: recursive
     - name: Set up JDK ${{ inputs.javaVersion }}
       uses: actions/setup-java@v2
       with:
diff --git a/.github/workflows/automatic-updates.yml b/.github/workflows/automatic-updates.yml
index 9b3fe0933..98c331b8e 100644
--- a/.github/workflows/automatic-updates.yml
+++ b/.github/workflows/automatic-updates.yml
@@ -42,11 +42,11 @@ jobs:
       with:
         branch-ref: "release-1.10.x"
 
-  v1_8_x_lts:
+  v1_8_x:
     if: github.repository == 'apache/camel-k'
     runs-on: ubuntu-20.04
     steps:
-    - name: Automatic updates on release-1.18.x
+    - name: Automatic updates on release-1.8.x
       uses: ./.github/actions/automatic-updates
       with:
         branch-ref: "release-1.8.x"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f352bf7bd..477349a3a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,15 +29,10 @@ jobs:
     if: github.repository == 'apache/camel-k'
     runs-on: ubuntu-20.04
     steps:
-    - name: Checkout code
-      uses: actions/checkout@v2
-      with:
-        ref: main
-        persist-credentials: false
-        submodules: recursive
     - name: Release main nightly
       uses: ./.github/actions/release-nightly
       with:
+        branch-ref: "main"
         goVersion: "1.17.x"
         javaVersion: "11"
         secretE2ECluster: ${{ secrets.E2E_CLUSTER_CONFIG }}
@@ -50,41 +45,31 @@ jobs:
     if: github.repository == 'apache/camel-k'
     runs-on: ubuntu-20.04
     steps:
-    - name: Checkout code
-      uses: actions/checkout@v2
-      with:
-        ref: release-1.10.x
-        persist-credentials: false
-        submodules: recursive    
     - name: Release 1.10 nightly
       uses: ./.github/actions/release-nightly
       with:
+        branch-ref: "release-1.10.x"
         goVersion: "1.17.x"
         javaVersion: "11"
         secretE2ECluster: ${{ secrets.E2E_CLUSTER_CONFIG }}
         secretE2EKube: ${{ secrets.E2E_KUBE_CONFIG }}
         secretDockerHubUser: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
         secretDockerHubPassword: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
-        secretGithubToken: ${{ secrets.GITHUB_TOKEN }}        
+        secretGithubToken: ${{ secrets.GITHUB_TOKEN }}
 
-  v1_8_x_lts:
+  v1_8_x:
     if: github.repository == 'apache/camel-k'
     runs-on: ubuntu-20.04
     steps:
-    - name: Checkout code
-      uses: actions/checkout@v2
-      with:
-        ref: release-1.8.x
-        persist-credentials: false
-        submodules: recursive    
-    - name: Release 1.8 (LTS) nightly 
+    - name: Release 1.8 nightly
       uses: ./.github/actions/release-nightly
       with:
+        branch-ref: "release-1.8.x"
         goVersion: "1.16.x"
         javaVersion: "11"
         secretE2ECluster: ${{ secrets.E2E_CLUSTER_CONFIG }}
         secretE2EKube: ${{ secrets.E2E_KUBE_CONFIG }}
         secretDockerHubUser: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
         secretDockerHubPassword: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
-        secretGithubToken: ${{ secrets.GITHUB_TOKEN }}        
-        
+        secretGithubToken: ${{ secrets.GITHUB_TOKEN }}
+