File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ sources:
4646 transformers :
4747 - trimprefix : " v"
4848
49+ conditions :
50+ checkIfVersionDiffers :
51+ name : Check if installed version differs
52+ kind : shell
53+ sourceid : elastic-apm-agent-ruby
54+ spec :
55+ command : .ci/scripts/test-version.sh
56+
4957targets :
5058 dockerfile-label-schema :
5159 name : Set org.label-schema.version in Dockerfile
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # This script checks the difference of the input and the version of elastic-apm in Gemfile.lock
4+ # If the input and the version in the Gemfile.lock file are equal the script returns a non zero exit code.
5+ # If the input and the version in the Gemfile.lock file differ the script return a 0 exit code.
6+ #
7+ # This is used for an updatecli condition to determine if the pipeline should continue or not.
8+
9+ set -euo pipefail
10+
11+ version=$( grep elastic-apm Gemfile.lock | head -1 | awk -F'[ ()]' ' { print $2 }' )
12+
13+ test "$version" != "$1"
You can’t perform that action at this time.
0 commit comments