mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
Merge pull request #620 from splattael/gitlab-ci
Allow building and pushing image via GitLab CI
This commit is contained in:
commit
219352c0ff
5
.gitlab-ci.yml
Normal file
5
.gitlab-ci.yml
Normal file
@ -0,0 +1,5 @@
|
||||
image: gitlab/dind
|
||||
|
||||
deploy:
|
||||
script:
|
||||
- ci/gitlab
|
||||
15
ci/gitlab
Executable file
15
ci/gitlab
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
VERSION=$(cat VERSION)
|
||||
DOCKER_REGISTRY_HOST=${DOCKER_REGISTRY_HOST:-hub.docker.com}
|
||||
DOCKER_IMAGE=${DOCKER_IMAGE:-sameersbn/gitlab}
|
||||
|
||||
docker build -t $DOCKER_IMAGE .
|
||||
|
||||
docker tag $DOCKER_IMAGE $DOCKER_REGISTRY_HOST/$DOCKER_IMAGE:latest
|
||||
docker tag $DOCKER_IMAGE $DOCKER_REGISTRY_HOST/$DOCKER_IMAGE:$VERSION
|
||||
|
||||
docker push $DOCKER_REGISTRY_HOST/$DOCKER_IMAGE:latest
|
||||
docker push $DOCKER_REGISTRY_HOST/$DOCKER_IMAGE:$VERSION
|
||||
Loading…
x
Reference in New Issue
Block a user