Skip to content

Commit

Permalink
fix(ci): trigger maintenance snapshot version
Browse files Browse the repository at this point in the history
  • Loading branch information
yanavasileva authored and tasso94 committed Jul 21, 2023
1 parent 991e9e1 commit 6498ef1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/build-and-test-ee.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -26,10 +35,14 @@ 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
env:
DISTRO: ${{ matrix.DISTRO }}
EE: true
PLATFORM: ${{ matrix.PLATFORM }}
VERSION: ${{ github.event.inputs.version }}
SNAPSHOT: ${{ github.event.inputs.snapshot }}
18 changes: 17 additions & 1 deletion pipeline.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/bin/bash
#!/bin/bash -ex

EE=${EE:-false}

if [ -z "$SNAPSHOT" ]; then
SNAPSHOT_ARGUMENT=""
else
SNAPSHOT_ARGUMENT="--build-arg SNAPSHOT=${SNAPSHOT}"
fi

# evaluate if the version argument must be passed
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 . \
Expand All @@ -10,6 +24,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
Expand Down

0 comments on commit 6498ef1

Please sign in to comment.