Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions .ci/bump-opbeans-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ sources:
transformers:
- trimprefix: "v"

conditions:
checkIfVersionDiffers:
name: Check if installed version differs
kind: shell
sourceid: elastic-apm-agent-ruby
spec:
command: .ci/scripts/test-version.sh

targets:
dockerfile-label-schema:
name: Set org.label-schema.version in Dockerfile
Expand Down
13 changes: 13 additions & 0 deletions .ci/scripts/test-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# This script checks the difference of the input and the version of elastic-apm in Gemfile.lock
# If the input and the version in the Gemfile.lock file are equal the script returns a non zero exit code.
# If the input and the version in the Gemfile.lock file differ the script return a 0 exit code.
#
# This is used for an updatecli condition to determine if the pipeline should continue or not.

set -euo pipefail

version=$(grep elastic-apm Gemfile.lock | head -1 | awk -F'[()]' '{ print $2 }')

test "$version" != "$1"