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:
default:
- 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
- export IMAGE_NAME=ldooks/dragon-bot:latest
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME .
branches:
master:
- step:
script:
# authenticate with the Docker Hub registry
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
# push the new Docker image to the Docker registry
- docker push $IMAGE_NAME
feature/*:
- step:
image: yourdockerusername/imagename # This step uses its own image
script:
- echo "This script runs only on commit to branches with names that match the feature/* pattern."
branches:
master:
- step:
script:
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME .
# authenticate with the Docker Hub registry
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
# push the new Docker image to the Docker registry
- docker push $IMAGE_NAME
feature/*:
- step:
image: $IMAGE_NAME
script:
# Only build iamges, dont push when we're on a feature branch
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME .