-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e67ff05
commit a4fd1a0
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
language: minimal | ||
|
||
services: | ||
- docker | ||
|
||
env: | ||
global: | ||
- DOCKER_ORG_NAME=jesusvasquez333 | ||
- DOCKER_REPO=epics-web-client | ||
|
||
stages: | ||
- name: deploy_docker | ||
if: tag IS present | ||
|
||
jobs: | ||
include: | ||
- stage: deploy_docker | ||
name: "Deploy Docker Image" | ||
before_script: | ||
# Use the git tag to tag tag docker image | ||
- export DOCKER_TAG=`git describe --tags --always` | ||
# Login to docker | ||
- echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_ORG_NAME}" --password-stdin; | ||
|
||
script: | ||
# Build the docker image | ||
- docker build -t ${DOCKER_ORG_NAME}/${DOCKER_REPO} . | ||
|
||
after_success: | ||
# Upload docker image (as tagged and latest version) | ||
- docker push ${DOCKER_ORG_NAME}/${DOCKER_REPO}; | ||
- docker tag ${DOCKER_ORG_NAME}/${DOCKER_REPO} ${DOCKER_ORG_NAME}/${DOCKER_REPO}:${DOCKER_TAG}; | ||
- docker push ${DOCKER_ORG_NAME}/${DOCKER_REPO}:${DOCKER_TAG}; | ||
- echo "Docker image '${DOCKER_ORG_NAME}/${DOCKER_REPO}:${DOCKER_TAG}' pushed" |