Skip to content

Commit

Permalink
fix(ci): trigger maintenance snapshot version (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
tasso94 authored Jul 25, 2023
1 parent e974a54 commit 3f9c9a4
Show file tree
Hide file tree
Showing 2 changed files with 30 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 }}
17 changes: 16 additions & 1 deletion pipeline.sh
Original file line number Diff line number Diff line change
@@ -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 . \
Expand All @@ -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
Expand Down

0 comments on commit 3f9c9a4

Please sign in to comment.