Skip to content

Commit 3cdf417

Browse files
committed
DEVOPS-194 update tsdb version
1 parent 691ed0a commit 3cdf417

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Jenkinsfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ podTemplate(label: "prometheus-${label}", inheritFrom: 'kube-slave-dood') {
1414
]) {
1515
stage('release') {
1616
def TAG_VERSION = sh(
17-
script: "echo ${TAG_NAME} | tr -d '\\n' | egrep '^v[\\.0-9]*.*-v[\\.0-9]*\$'",
17+
script: "echo ${TAG_NAME} | tr -d '\\n' | egrep '^v[\\.0-9]*.*-v[\\.0-9]*\$' | sed 's/v//'",
1818
returnStdout: true
1919
).trim()
2020
if ( TAG_VERSION ) {
2121
def V3IO_TSDB_VERSION = sh(
22-
script: "echo ${TAG_VERSION} | awk -F '-v' '{print \"v\"\$2}'",
22+
script: "echo ${TAG_VERSION} | awk -F '-v' '{print \$2}'",
2323
returnStdout: true
2424
).trim()
2525
// stage('get release') {
@@ -37,7 +37,7 @@ podTemplate(label: "prometheus-${label}", inheritFrom: 'kube-slave-dood') {
3737
rm -rf vendor/github.com/v3io/v3io-tsdb/
3838
git clone https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/${github_user}/v3io-tsdb.git vendor/github.com/v3io/v3io-tsdb
3939
cd vendor/github.com/v3io/v3io-tsdb
40-
git checkout ${V3IO_TSDB_VERSION}
40+
git checkout "v${V3IO_TSDB_VERSION}"
4141
rm -rf .git vendor/github.com/prometheus
4242
"""
4343
}
@@ -51,10 +51,10 @@ podTemplate(label: "prometheus-${label}", inheritFrom: 'kube-slave-dood') {
5151
container('docker-cmd') {
5252
sh """
5353
cd ${BUILD_FOLDER}/src/github.com/prometheus/prometheus
54-
docker build . -t ${docker_user}/v3io-prom:${TAG_VERSION/v/} -f Dockerfile.multi
54+
docker build . -t ${docker_user}/v3io-prom:${TAG_VERSION} -f Dockerfile.multi
5555
"""
5656
withDockerRegistry([credentialsId: "472293cc-61bc-4e9f-aecb-1d8a73827fae", url: ""]) {
57-
sh "docker push ${docker_user}/v3io-prom:${TAG_VERSION/v/}"
57+
sh "docker push ${docker_user}/v3io-prom:${TAG_VERSION}"
5858
}
5959
}
6060
}
@@ -66,7 +66,7 @@ podTemplate(label: "prometheus-${label}", inheritFrom: 'kube-slave-dood') {
6666
git config --global user.name '${GIT_USERNAME}'
6767
cd ${BUILD_FOLDER}/src/github.com/prometheus/prometheus;
6868
git add vendor/github.com/v3io/v3io-tsdb;
69-
git commit -am 'Updated TSDB to ${V3IO_TSDB_VERSION}';
69+
git commit -am 'Updated TSDB to v${V3IO_TSDB_VERSION}';
7070
git push origin master
7171
"""
7272
} catch (err) {

0 commit comments

Comments
 (0)