From 3f9c9a4ca59f7af2922c90d0e054088c0957341e Mon Sep 17 00:00:00 2001 From: tasso94 <3015690+tasso94@users.noreply.github.com> Date: Tue, 25 Jul 2023 17:21:21 +0200 Subject: [PATCH] fix(ci): trigger maintenance snapshot version (#275) related to camunda/camunda-bpm-platform#3515 --- .github/workflows/build-and-test-ee.yml | 15 ++++++++++++++- pipeline.sh | 17 ++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-ee.yml b/.github/workflows/build-and-test-ee.yml index f9146947..f868ce25 100644 --- a/.github/workflows/build-and-test-ee.yml +++ b/.github/workflows/build-and-test-ee.yml @@ -1,5 +1,14 @@ name: Build and Test EE -on: [pull_request, workflow_dispatch] + +on: + workflow_dispatch: + inputs: + version: + description: 'Camunda enterprise version to be tested' + snapshot: + description: 'Whether the version is a snapshot' + pull_request: + jobs: build-and-test-ee: if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' @@ -26,6 +35,8 @@ jobs: PLATFORM: ${{ matrix.PLATFORM }} NEXUS_PASS: ${{ secrets.NEXUS_PASS }} NEXUS_USER: ${{ secrets.NEXUS_USER }} + VERSION: ${{ github.event.inputs.version }} + SNAPSHOT: ${{ github.event.inputs.snapshot }} - name: Test run: ./test.sh working-directory: test @@ -33,3 +44,5 @@ jobs: DISTRO: ${{ matrix.DISTRO }} EE: true PLATFORM: ${{ matrix.PLATFORM }} + VERSION: ${{ github.event.inputs.version }} + SNAPSHOT: ${{ github.event.inputs.snapshot }} diff --git a/pipeline.sh b/pipeline.sh index 3c628612..23bcad77 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -1,6 +1,19 @@ -#!/bin/bash +#!/bin/bash -ex EE=${EE:-false} + +if [ -z "$SNAPSHOT" ]; then + SNAPSHOT_ARGUMENT="" +else + SNAPSHOT_ARGUMENT="--build-arg SNAPSHOT=${SNAPSHOT}" +fi + +if [ -z "$VERSION" ]; then + VERSION_ARGUMENT="" +else + VERSION_ARGUMENT="--build-arg VERSION=${VERSION}" +fi + IMAGE_NAME=camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} docker buildx build . \ @@ -10,6 +23,8 @@ docker buildx build . \ --build-arg EE=${EE} \ --build-arg USER=${NEXUS_USER} \ --build-arg PASSWORD=${NEXUS_PASS} \ + ${VERSION_ARGUMENT} \ + ${SNAPSHOT_ARGUMENT} \ --cache-to type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ --cache-from type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ --load