Skip to content

Instantly share code, notes, and snippets.

@pbabbott
Last active August 8, 2018 23:04
Show Gist options
  • Save pbabbott/23b5b9d4375bd4a544c4c351dc80b744 to your computer and use it in GitHub Desktop.
Save pbabbott/23b5b9d4375bd4a544c4c351dc80b744 to your computer and use it in GitHub Desktop.
image: atlassian/default-image:2
pipelines:
branches:
qa:
- step:
name: Deploy to quality assurance
deployment: staging # can be test, staging or production
services:
- docker
caches:
- docker
script: # Modify the commands below to build your repository.
# Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings
- export IMAGE_NAME=hellohighseas/my-node-app:qa
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment