updating pipeline script

This commit is contained in:
luke 2017-08-04 22:45:12 -07:00
parent ceb13c5ab6
commit b81fce458d

View File

@ -12,22 +12,23 @@ options:
pipelines: pipelines:
default: default:
- step: - step:
script: # Modify the commands below to build your repository. script:
# Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings # Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings
- export IMAGE_NAME=ldooks/dragon-bot:latest - export IMAGE_NAME=ldooks/dragon-bot:latest
branches:
# build the Docker image (this will use the Dockerfile in the root of the repo) master:
- docker build -t $IMAGE_NAME . - step:
branches: script:
master: # build the Docker image (this will use the Dockerfile in the root of the repo)
- step: - docker build -t $IMAGE_NAME .
script: # authenticate with the Docker Hub registry
# authenticate with the Docker Hub registry - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD # push the new Docker image to the Docker registry
# push the new Docker image to the Docker registry - docker push $IMAGE_NAME
- docker push $IMAGE_NAME feature/*:
feature/*: - step:
- step: image: $IMAGE_NAME
image: yourdockerusername/imagename # This step uses its own image script:
script: # Only build iamges, dont push when we're on a feature branch
- echo "This script runs only on commit to branches with names that match the feature/* pattern." # build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME .