mirror of
https://github.com/valitydev/registrator.git
synced 2024-11-06 02:45:17 +00:00
Add the repo to Jenkins
This commit is contained in:
parent
1c1042911f
commit
9edc7ac8ea
31
Jenkinsfile
vendored
Normal file
31
Jenkinsfile
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
#!groovy
|
||||
|
||||
build('registrator', 'docker-host') {
|
||||
checkoutRepo()
|
||||
|
||||
runStage('build') {
|
||||
env.IMG_TAG = sh(script: "cat VERSION", returnStdout: true).trim()
|
||||
sh "make build"
|
||||
}
|
||||
|
||||
try {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
runStage('push image') {
|
||||
getCommitId()
|
||||
sh 'docker tag registrator:$IMG_TAG dr.rbkmoney.com/registrator:$COMMIT_ID'
|
||||
|
||||
try {
|
||||
docker.withRegistry('https://dr.rbkmoney.com/v2/', 'dockerhub-rbkmoneycibot') {
|
||||
sh 'docker push dr.rbkmoney.com/registrator:$COMMIT_ID'
|
||||
}
|
||||
} finally {
|
||||
sh 'docker rmi -f dr.rbkmoney.com/registrator:$COMMIT_ID'
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
runStage('rm local image') {
|
||||
sh 'docker rmi -f registrator:$IMG_TAG'
|
||||
}
|
||||
}
|
||||
}
|
2
Makefile
2
Makefile
@ -10,7 +10,7 @@ dev:
|
||||
|
||||
build:
|
||||
mkdir -p build
|
||||
docker build -t $(NAME):$(VERSION) .
|
||||
docker build --force-rm -t $(NAME):$(VERSION) .
|
||||
docker save $(NAME):$(VERSION) | gzip -9 > build/$(NAME)_$(VERSION).tgz
|
||||
|
||||
release:
|
||||
|
@ -5,6 +5,7 @@ Service registry bridge for Docker.
|
||||
[![Circle CI](https://circleci.com/gh/gliderlabs/registrator.png?style=shield)](https://circleci.com/gh/gliderlabs/registrator)
|
||||
[![Docker pulls](https://img.shields.io/docker/pulls/gliderlabs/registrator.svg)](https://hub.docker.com/r/gliderlabs/registrator/)
|
||||
[![IRC Channel](https://img.shields.io/badge/irc-%23gliderlabs-blue.svg)](https://kiwiirc.com/client/irc.freenode.net/#gliderlabs)
|
||||
[![Build Status](http://ci.rbkmoney.com/buildStatus/icon?job=rbkmoney_private/registrator/master)](http://ci.rbkmoney.com/job/rbkmoney_private/job/registrator/job/master/)
|
||||
<br /><br />
|
||||
|
||||
Registrator automatically registers and deregisters services for any Docker
|
||||
|
Loading…
Reference in New Issue
Block a user