Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): trigger maintenance snapshot version #275

Merged
merged 2 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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