Skip to content

Commit

Permalink
CI Pipeline Fixes (#304)
Browse files Browse the repository at this point in the history
- Update build-data.yaml to fail if the subshell's fail
- Move to use the docker/fabric-nodeenv image's package.json.
  Inline with the version used for the docker image

Signed-off-by: Matthew B White <[email protected]>
  • Loading branch information
mbwhite authored Nov 29, 2021
1 parent 5a4d075 commit 8acc32a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/templates/build-data.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
steps:
- script: |
#!/bin/bash
set -ex -o pipefail
env | sort
# handle full version number
VERSION=$(jq '.version' $(Build.SourcesDirectory)/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]).*/\1/")
VERSION=$(jq '.version' $(Build.SourcesDirectory)/docker/fabric-nodeenv/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]).*/\1/")
echo Current version in code is :${VERSION}:
echo "##vso[task.setvariable variable=PACKAGE_VERSION;isOutput=true]${VERSION}"
# handle minor version
MINOR_VERSION=$(jq '.version' $(Build.SourcesDirectory)/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9])\.[0-9]?[0-9].*/\1/")
MINOR_VERSION=$(jq '.version' $(Build.SourcesDirectory)/docker/fabric-nodeenv/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9])\.[0-9]?[0-9].*/\1/")
echo Current minor version in code is :${MINOR_VERSION}:
echo "##vso[task.setvariable variable=MINOR_PACKAGE_VERSION;isOutput=true]${MINOR_VERSION}"
Expand Down

0 comments on commit 8acc32a

Please sign in to comment.