dragon-bot/bitbucket-pipelines.yml
2017-08-04 22:49:50 -07:00

29 lines
1.1 KiB
YAML

# This is a sample build configuration for Docker.
# Check our guides at https://confluence.atlassian.com/x/O1toN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
# image: atlassian/default-image:latest
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
master:
- step:
script:
- 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 .
# 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:
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 .