diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index c5462736..a3710212 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -18,7 +18,16 @@ pipelines: # 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 \ No newline at end of file + 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."