You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/03/25 11:33:20 UTC

[camel-k] branch master updated (5b338dc -> 9690512)

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

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


    from 5b338dc  chore(build): fix package_artifact.sh script call
     new 52652fb  Fix #1365: Initial support for nightly builds
     new d8e001f  Fix #1365: Update release script
     new 454c6a7  Fix #1365: Use semantic versioning
     new 9690512  Fix #1365: Use cron schedule

The 4 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/workflows/release.yml | 137 ++++++++++++++++++++++++++++++++++++++++++
 script/Makefile               |  12 +++-
 script/package_examples.sh    |   4 +-
 script/set_version.sh         |   2 +-
 4 files changed, 151 insertions(+), 4 deletions(-)
 create mode 100644 .github/workflows/release.yml


[camel-k] 02/04: Fix #1365: Update release script

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d8e001fcf617d3f9996dcc6c79822da6787f4900
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Tue Mar 24 17:48:26 2020 +0100

    Fix #1365: Update release script
---
 .github/workflows/release.yml | 10 ++++++++++
 script/Makefile               |  7 +++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fd0d539..1ac49d1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -58,6 +58,10 @@ jobs:
         echo "Using IMAGE_NAME=$IMAGE_NAME"
         echo "::set-env name=IMAGE_NAME::$IMAGE_NAME"
 
+        MAVEN_REPOSITORY=$(make get-staging-repo)
+        echo "Using MAVEN_REPOSITORY=$MAVEN_REPOSITORY"
+        echo "::set-env name=MAVEN_REPOSITORY::$MAVEN_REPOSITORY"
+
         docker login -u $TEST_DOCKER_HUB_USERNAME -p $TEST_DOCKER_HUB_PASSWORD
 
     - name: Codegen
@@ -87,6 +91,12 @@ jobs:
         body: |
           Apache Camel K nightly build for testing (unstable).
 
+          To test it, download the client for your OS and run:
+
+          ```
+          kamel install --olm=false --maven-repository=${{ env.MAVEN_REPOSITORY }}
+          ```
+
         draft: false
         prerelease: true
     - name: Upload Client Linux
diff --git a/script/Makefile b/script/Makefile
index 6f4feb1..3f07d62 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -30,7 +30,7 @@ LINT_DEADLINE := 10m
 # Used to push pre-release artifacts
 STAGING_IMAGE_NAME := docker.io/camelk/camel-k
 
-STAGING_RUNTIME_REPO := https://repository.apache.org/content/repositories/orgapachecamel-1189
+STAGING_RUNTIME_REPO :=
 
 # When packaging artifacts into the docker image, you can "copy" them from local maven
 # or "download" them from Apache Snapshots and Maven Central
@@ -238,4 +238,7 @@ install-minikube:
 release-notes:
 	./script/gen_release_notes.sh $(LAST_RELEASED_VERSION) $(VERSION)
 
-.PHONY: build build-kamel build-resources build-olm unsnapshot-olm dep codegen images images-dev images-push images-push-staging test check test-integration clean release cross-compile package-examples set-version git-tag release-notes check-licenses generate-deepcopy generate-client generate-doc build-resources release-helm release-staging release-nightly
+get-staging-repo:
+	@echo $(or ${STAGING_RUNTIME_REPO},https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots)
+
+.PHONY: build build-kamel build-resources build-olm unsnapshot-olm dep codegen images images-dev images-push images-push-staging test check test-integration clean release cross-compile package-examples set-version git-tag release-notes check-licenses generate-deepcopy generate-client generate-doc build-resources release-helm release-staging release-nightly get-staging-repo


[camel-k] 04/04: Fix #1365: Use cron schedule

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9690512676f9b08e90e1d0bdd28af4973b1d0dc6
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Tue Mar 24 18:51:13 2020 +0100

    Fix #1365: Use cron schedule
---
 .github/workflows/release.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 957f0e7..86f259e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -18,9 +18,9 @@
 name: release
 
 on:
-  push:
-    branches:
-      - master
+  schedule:
+  - cron:  '0 0 * * *'
+
 jobs:
   release:
     runs-on: ubuntu-latest


[camel-k] 01/04: Fix #1365: Initial support for nightly builds

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 52652fbe3cf3971f02c037e1c8592649537cf881
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Tue Mar 24 10:39:55 2020 +0100

    Fix #1365: Initial support for nightly builds
---
 .github/workflows/release.yml | 127 ++++++++++++++++++++++++++++++++++++++++++
 script/Makefile               |   4 +-
 script/package_examples.sh    |   4 +-
 script/set_version.sh         |   2 +-
 4 files changed, 134 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..fd0d539
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,127 @@
+# ---------------------------------------------------------------------------
+# 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:
+  push:
+    branches:
+      - master
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Install Go
+      uses: actions/setup-go@v1
+      with:
+        go-version: 1.13.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: Prerequisites
+      run: |
+        export OPERATOR_SDK_VERSION=v0.15.2
+        curl -L https://github.com/operator-framework/operator-sdk/releases/download/v0.15.2/operator-sdk-${OPERATOR_SDK_VERSION}-x86_64-linux-gnu -o operator-sdk
+        chmod a+x operator-sdk
+        sudo mv operator-sdk /usr/local/bin
+
+    - name: Global Env
+      env:
+        TEST_DOCKER_HUB_USERNAME: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
+        TEST_DOCKER_HUB_PASSWORD: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
+      run: |
+        VERSION=nightly-$(date +%Y%m%d%H%M)
+        echo "Using VERSION=$VERSION"
+        echo "::set-env name=VERSION::$VERSION"
+
+        IMAGE_NAME=docker.io/${TEST_DOCKER_HUB_USERNAME:-testcamelk}/camel-k
+        echo "Using IMAGE_NAME=$IMAGE_NAME"
+        echo "::set-env name=IMAGE_NAME::$IMAGE_NAME"
+
+        docker login -u $TEST_DOCKER_HUB_USERNAME -p $TEST_DOCKER_HUB_PASSWORD
+
+    - name: Codegen
+      run: |
+        make VERSION=$VERSION IMAGE_NAME=$IMAGE_NAME codegen set-version build-resources
+
+    - name: Tag version
+      uses: anothrNick/github-tag-action@1.17.2
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        CUSTOM_TAG: ${{ env.VERSION }}
+    - name: Build
+      run: |
+        make VERSION=$VERSION IMAGE_NAME=$IMAGE_NAME release-nightly
+
+    - name: Check
+      run: ls -l
+
+    - name: Create Release
+      id: create_release
+      uses: actions/create-release@latest
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      with:
+        tag_name: ${{ env.VERSION }}
+        release_name: Release ${{ env.VERSION }}
+        body: |
+          Apache Camel K nightly build for testing (unstable).
+
+        draft: false
+        prerelease: true
+    - name: Upload Client Linux
+      uses: actions/upload-release-asset@v1
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      with:
+        upload_url: ${{ steps.create_release.outputs.upload_url }}
+        asset_path: ./camel-k-client-${{ env.VERSION }}-linux-64bit.tar.gz
+        asset_name: camel-k-client-${{ env.VERSION }}-linux-64bit.tar.gz
+        asset_content_type: application/tar+gzip
+    - name: Upload Client Mac
+      uses: actions/upload-release-asset@v1
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      with:
+        upload_url: ${{ steps.create_release.outputs.upload_url }}
+        asset_path: ./camel-k-client-${{ env.VERSION }}-mac-64bit.tar.gz
+        asset_name: camel-k-client-${{ env.VERSION }}-mac-64bit.tar.gz
+        asset_content_type: application/tar+gzip
+    - name: Upload Client Windows
+      uses: actions/upload-release-asset@v1
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      with:
+        upload_url: ${{ steps.create_release.outputs.upload_url }}
+        asset_path: ./camel-k-client-${{ env.VERSION }}-windows-64bit.tar.gz
+        asset_name: camel-k-client-${{ env.VERSION }}-windows-64bit.tar.gz
+        asset_content_type: application/tar+gzip
+    - name: Upload Examples
+      uses: actions/upload-release-asset@v1
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      with:
+        upload_url: ${{ steps.create_release.outputs.upload_url }}
+        asset_path: ./camel-k-examples-${{ env.VERSION }}.tar.gz
+        asset_name: camel-k-examples-${{ env.VERSION }}.tar.gz
+        asset_content_type: application/tar+gzip
diff --git a/script/Makefile b/script/Makefile
index a029314..6f4feb1 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -225,6 +225,8 @@ release: clean codegen set-version build-resources check-licenses unsnapshot-olm
 
 release-staging: clean codegen set-version build-resources check-licenses unsnapshot-olm build images images-push-staging cross-compile package-examples git-tag
 
+release-nightly: clean codegen set-version build-resources build images images-push cross-compile package-examples
+
 release-helm:
 	./script/release_helm.sh
 
@@ -236,4 +238,4 @@ install-minikube:
 release-notes:
 	./script/gen_release_notes.sh $(LAST_RELEASED_VERSION) $(VERSION)
 
-.PHONY: build build-kamel build-resources build-olm unsnapshot-olm dep codegen images images-dev images-push images-push-staging test check test-integration clean release cross-compile package-examples set-version git-tag release-notes check-licenses generate-deepcopy generate-client generate-doc build-resources release-helm
+.PHONY: build build-kamel build-resources build-olm unsnapshot-olm dep codegen images images-dev images-push images-push-staging test check test-integration clean release cross-compile package-examples set-version git-tag release-notes check-licenses generate-deepcopy generate-client generate-doc build-resources release-helm release-staging release-nightly
diff --git a/script/package_examples.sh b/script/package_examples.sh
index d518505..d4b4dd1 100755
--- a/script/package_examples.sh
+++ b/script/package_examples.sh
@@ -25,4 +25,6 @@ fi
 
 version=$1
 
-pushd $rootdir/examples && tar --exclude=".*" -zcvf ../camel-k-examples-$version.tar.gz * && popd
+cd $rootdir/examples
+
+tar --exclude=".*" -zcvf ../camel-k-examples-$version.tar.gz *
diff --git a/script/set_version.sh b/script/set_version.sh
index 3250153..43575f6 100755
--- a/script/set_version.sh
+++ b/script/set_version.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with


[camel-k] 03/04: Fix #1365: Use semantic versioning

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 454c6a7ee394e8b7382626e7d8fadec27e9d30f5
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Tue Mar 24 18:19:55 2020 +0100

    Fix #1365: Use semantic versioning
---
 .github/workflows/release.yml | 2 +-
 script/Makefile               | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1ac49d1..957f0e7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -50,7 +50,7 @@ jobs:
         TEST_DOCKER_HUB_USERNAME: ${{ secrets.TEST_DOCKER_HUB_USERNAME }}
         TEST_DOCKER_HUB_PASSWORD: ${{ secrets.TEST_DOCKER_HUB_PASSWORD }}
       run: |
-        VERSION=nightly-$(date +%Y%m%d%H%M)
+        VERSION=$(make get-version | sed s/-SNAPSHOT/-nightly.$(date +%Y%m%d%H%M)/)
         echo "Using VERSION=$VERSION"
         echo "::set-env name=VERSION::$VERSION"
 
diff --git a/script/Makefile b/script/Makefile
index 3f07d62..34b0979 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -241,4 +241,7 @@ release-notes:
 get-staging-repo:
 	@echo $(or ${STAGING_RUNTIME_REPO},https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots)
 
-.PHONY: build build-kamel build-resources build-olm unsnapshot-olm dep codegen images images-dev images-push images-push-staging test check test-integration clean release cross-compile package-examples set-version git-tag release-notes check-licenses generate-deepcopy generate-client generate-doc build-resources release-helm release-staging release-nightly get-staging-repo
+get-version:
+	@echo $(VERSION)
+
+.PHONY: build build-kamel build-resources build-olm unsnapshot-olm dep codegen images images-dev images-push images-push-staging test check test-integration clean release cross-compile package-examples set-version git-tag release-notes check-licenses generate-deepcopy generate-client generate-doc build-resources release-helm release-staging release-nightly get-staging-repo get-version