Skip to content

Commit

Permalink
Add task to check whether kubo release and kubo-deployment version ma…
Browse files Browse the repository at this point in the history
…tches (#60)
  • Loading branch information
lubronzhan committed May 7, 2019
1 parent 0fde2b6 commit faf1dc3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/check-version-match.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -exu -o pipefail

main() {
kubo_release_version=$(cat kubo-release/version)
kubo_deployment_version=$(cat kubo-deployment/version)
if [ "$kubo_release_version" != "$kubo_deployment_version" ]; then
echo "kubo-release version: $kubo_release_version doesn't match kubo-deployment version: $kubo_deployment_version"
exit 1
fi
}

main @
13 changes: 13 additions & 0 deletions tasks/check-version-match.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
platform: linux
image_resource:
type: docker-image
source:
repository: pcfkubo/kubo-ci
tag: stable
run:
path: git-kubo-ci/scripts/check-version-match.sh

inputs:
- name: git-kubo-ci
- name: kubo-release
- name: kubo-deployment
3 changes: 3 additions & 0 deletions templates/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ jobs:
- get: kubo-deployment
trigger: true
- get: kubo-release
- get: git-kubo-ci
- task: check-version-match
file: git-kubo-ci/tasks/check-version-match.yml
- put: kubo-lock
params: { acquire: true }

Expand Down

0 comments on commit faf1dc3

Please sign in to comment.