Skip to content

Commit

Permalink
Merge pull request #84 from dinal/master
Browse files Browse the repository at this point in the history
dev -> master
  • Loading branch information
dinal authored Dec 14, 2020
2 parents b2af85e + 5caa778 commit 9c437c9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 38 deletions.
47 changes: 12 additions & 35 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

@Library('pipelinex@development') _
import com.iguazio.pipelinex.DockerRepo


label = "${UUID.randomUUID().toString()}"
BUILD_FOLDER = "/home/jenkins/go"
git_project = "prometheus"
Expand All @@ -10,52 +15,24 @@ podTemplate(label: "${git_project}-${label}", inheritFrom: "jnlp-docker") {
withCredentials([
string(credentialsId: git_deploy_user_token, variable: 'GIT_TOKEN')
]) {
def TAG_VERSION
def DOCKER_TAG_VERSION
pipelinex = library(identifier: 'pipelinex@development', retriever: modernSCM(
[$class : 'GitSCMSource',
credentialsId: git_deploy_user_private_key,
remote : "[email protected]:iguazio/pipelinex.git"])).com.iguazio.pipelinex
multi_credentials = [pipelinex.DockerRepo.ARTIFACTORY_IGUAZIO, pipelinex.DockerRepo.DOCKER_HUB, pipelinex.DockerRepo.QUAY_IO, pipelinex.DockerRepo.GCR_IO]

common.notify_slack {
stage('get tag data') {
container('jnlp') {
TAG_VERSION = github.get_tag_version(TAG_NAME)
DOCKER_TAG_VERSION = github.get_docker_tag_version(TAG_NAME)

echo "$TAG_VERSION"
echo "$DOCKER_TAG_VERSION"
}
}
multi_credentials = [DockerRepo.ARTIFACTORY_IGUAZIO, DockerRepo.DOCKER_HUB, DockerRepo.QUAY_IO, DockerRepo.GCR_IO]

if (github.check_tag_expiration(git_project, git_project_user, TAG_VERSION, GIT_TOKEN)) {
stage('prepare sources') {
container('jnlp') {
dir("${BUILD_FOLDER}/src/github.com/${git_project}/${git_project}") {
git(changelog: false, credentialsId: git_deploy_user_private_key, poll: false, url: "[email protected]:${git_project_user}/${git_project}.git")
sh("git checkout ${TAG_VERSION}")
}
}
}
def github_client = new Githubc(git_project_user, git_project, GIT_TOKEN, env.TAG_NAME, this)
github_client.releaseCi(true) {

common.notify_slack {
stage("build ${git_project} in dood") {
container('docker-cmd') {
dir("${BUILD_FOLDER}/src/github.com/${git_project}/${git_project}") {
sh("docker build . -f Dockerfile.multi --tag v3io-prom:${DOCKER_TAG_VERSION}")
dir("${BUILD_FOLDER}/src/github.com/${git_project_user}/${git_project}") {
sh("docker build . -f Dockerfile.multi --tag v3io-prom:${github_client.tag.docker}")
}
}
}

stage('push') {
container('docker-cmd') {
dockerx.images_push_multi_registries(["v3io-prom:${DOCKER_TAG_VERSION}"], multi_credentials)
}
}

stage('update release status') {
container('jnlp') {
github.update_release_status(git_project, git_project_user, "${TAG_VERSION}", GIT_TOKEN)
dockerx.images_push_multi_registries(["v3io-prom:${github_client.tag.docker}"], multi_credentials)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ require (
replace (
github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
github.com/v3io/frames => github.com/v3io/frames v0.8.1
github.com/v3io/v3io-tsdb => github.com/v3io/v3io-tsdb v0.11.4
github.com/v3io/v3io-tsdb => github.com/v3io/v3io-tsdb v0.11.6
google.golang.org/grpc => google.golang.org/grpc v1.19.1
k8s.io/klog => github.com/simonpasquier/klog-gokit v0.1.0
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ github.com/v3io/v3io-tsdb v0.11.3 h1:zH2rVNsPy9CIm0/gwJ7NNyjDD7G2w4XhUygeZqexLaE
github.com/v3io/v3io-tsdb v0.11.3/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
github.com/v3io/v3io-tsdb v0.11.4 h1:tDw+EdFNregIy6r4fPqtOybkAj4ngUl4WRQNH24Xe0M=
github.com/v3io/v3io-tsdb v0.11.4/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
github.com/v3io/v3io-tsdb v0.11.5 h1:PMrkb2B7No7Ghe9e+qezen8+3v/L2ZGdkRYCIhL7D0Q=
github.com/v3io/v3io-tsdb v0.11.5/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
github.com/v3io/v3io-tsdb v0.11.6 h1:G8Gn+RNEMS8zFLafoSaMzaCu65vJyJr/wx91a+g+KZ0=
github.com/v3io/v3io-tsdb v0.11.6/go.mod h1:uyk46LJxROChqmlhg5M5Kw7qK1WfJD3hrqNHR6kLjeg=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.2.0 h1:dzZJf2IuMiclVjdw0kkT+f9u4YdrapbNyGAN47E/qnk=
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/v3io/v3io-tsdb/pkg/appender/appender.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ github.com/v3io/v3io-go/pkg/dataplane
github.com/v3io/v3io-go/pkg/dataplane/http
github.com/v3io/v3io-go/pkg/dataplane/schemas/node/common
github.com/v3io/v3io-go/pkg/errors
# github.com/v3io/v3io-tsdb v0.11.2 => github.com/v3io/v3io-tsdb v0.11.4
# github.com/v3io/v3io-tsdb v0.11.2 => github.com/v3io/v3io-tsdb v0.11.6
github.com/v3io/v3io-tsdb/internal/pkg/performance
github.com/v3io/v3io-tsdb/pkg/aggregate
github.com/v3io/v3io-tsdb/pkg/appender
Expand Down

0 comments on commit 9c437c9

Please sign in to comment.