Skip to content

Commit

Permalink
Merge branch 'apache:release-2.1.x' into release-2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
hernanDatgDev authored Feb 5, 2024
2 parents f29e088 + 23ef80a commit 34e8505
Show file tree
Hide file tree
Showing 10 changed files with 405 additions and 6,110 deletions.
16 changes: 1 addition & 15 deletions .github/actions/automatic-updates/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ runs:
make generate codegen update-docs
git add -A && git commit -m 'chore: autogenerated project resource update' && echo "autogenerated=1" >> $GITHUB_ENV || echo "No changes to autogenerated project resources"
# SBOM
- name: Generate SBOM
uses: ./.github/actions/gh-go-mod-generate-sbom
with:
version: v1
args: mod -licenses -json -output camel-k-sbom/camel-k-sbom.json
- name: Commit SBOM
shell: bash
env:
CI_USER: "github-actions[bot]"
CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
run: |
git add camel-k-sbom/camel-k-sbom.json && git commit -m 'chore: nightly SBOM update' && echo "sbom=1" >> $GITHUB_ENV || echo "No changes to SBOM"
# Coverage badge
- name: Run Test
shell: bash
Expand Down Expand Up @@ -107,7 +93,7 @@ runs:
# Git push
- name: Push changes
shell: bash
if: env.changelog == 1 || env.autogenerated == 1 || env.sbom == 1 || env.badge == 1
if: env.changelog == 1 || env.autogenerated == 1 || env.badge == 1
env:
CI_USER: "github-actions[bot]"
CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
8 changes: 0 additions & 8 deletions .github/actions/e2e-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ runs:
name: Prepare Test Environment
uses: ./.github/actions/kamel-prepare-env

- name: Cache modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
shell: bash
run: make
31 changes: 20 additions & 11 deletions .github/actions/release-nightly/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ runs:
using: "composite"

steps:

- name: Set up JDK ${{ inputs.javaVersion }}
uses: actions/setup-java@v3
with:
Expand All @@ -56,20 +57,15 @@ runs:
cluster-config-data: ${{ inputs.secretE2ECluster }}
cluster-kube-config-data: ${{ inputs.secretE2EKube }}
smoke-test-only: true
- name: Cache modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Get nightly version and update date
shell: bash
run: |
V="$(make get-version | sed s/-SNAPSHOT//)-nightly"
D=$(date)
echo "VERSION=$V" >> $GITHUB_ENV
echo "UPD_DATE=$D" >> $GITHUB_ENV
- name: Global Env
shell: bash
run: |
Expand All @@ -82,6 +78,7 @@ runs:
MAVEN_REPOSITORY=$(make get-staging-repo)
echo "Using MAVEN_REPOSITORY=$MAVEN_REPOSITORY"
echo "MAVEN_REPOSITORY=$MAVEN_REPOSITORY" >> $GITHUB_ENV
- name: Install newer docker CLI supporting multi platform build
shell: bash
run: |
Expand All @@ -96,24 +93,34 @@ runs:
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- name: Set up QEMU (required by multi platform build)
uses: docker/setup-qemu-action@v2

- name: Login to Container Registry
uses: docker/login-action@v2
with:
username: ${{ inputs.secretDockerHubUser }}
password: ${{ inputs.secretDockerHubPassword }}

- name: Build and release containers
shell: bash
run: |
make VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} images-nightly
make IMAGE_ARCH=arm64 VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} images-nightly
make VERSION=${{ env.VERSION }} IMAGE_NAME=${{ env.IMAGE_NAME }} release-nightly
- name: Generate SBOM
uses: ./.github/actions/gh-go-mod-generate-sbom
with:
version: v1
args: mod -licenses -json -output sbom.json

- name: Create Release
id: create_release
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37
with:
artifacts: "./camel-k-client*.tar.gz"
artifacts: "./camel-k-client*.tar.gz,sbom.json"
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 }}` (default `amd64` architecture,
Expand All @@ -137,9 +144,11 @@ runs:
replacesArtifacts: true
tag: ${{ env.VERSION }}
commit: main
# If release was okey, we can also release the CRD Fabric8 extensions

# If release was okey, we can also release the java extensions
- name: Deploy Camel-K-CRDs to ASF Snapshots Repository
working-directory: java
working-directory: java/crds
shell: bash
run: |
./mvnw clean deploy --settings ../.github/asf-deploy-settings.xml -q
mvn clean deploy --settings ../../.github/asf-deploy-settings.xml -q
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# Released Packages
*.tar.gz
sbom.json

# Release Notes
/release-notes.md
Expand Down
Loading

0 comments on commit 34e8505

Please sign in to comment.