bitbucket-pipelines.yml edited online with Bitbucket

This commit is contained in:
Greg Gauthier 2021-02-25 17:02:21 +00:00
parent 70087af153
commit 137dbe7c83

View File

@ -15,7 +15,7 @@ pipelines:
name: Build and Test name: Build and Test
script: script:
- IMAGE_NAME=$BITBUCKET_REPO_SLUG - IMAGE_NAME=$BITBUCKET_REPO_SLUG
- docker build . --file Dockerfile --tag ${IMAGE_NAME} - docker build . --file Dockerfile --tag ${DOCKERHUB_NAMESPACE}/${IMAGE_NAME}
services: services:
- docker - docker
caches: caches:
@ -31,7 +31,7 @@ pipelines:
name: Build and Test name: Build and Test
script: script:
- IMAGE_NAME=$BITBUCKET_REPO_SLUG - IMAGE_NAME=$BITBUCKET_REPO_SLUG
- docker build . --file Dockerfile --tag ${IMAGE_NAME} - docker build . --file Dockerfile --tag ${DOCKERHUB_NAMESPACE}/${IMAGE_NAME}
- docker save ${IMAGE_NAME} --output "${IMAGE_NAME}.tar" - docker save ${IMAGE_NAME} --output "${IMAGE_NAME}.tar"
services: services:
- docker - docker
@ -45,8 +45,6 @@ pipelines:
script: script:
- echo ${DOCKERHUB_PASSWORD} | docker login --username "$DOCKERHUB_USERNAME" --password-stdin - echo ${DOCKERHUB_PASSWORD} | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- IMAGE_NAME=$BITBUCKET_REPO_SLUG - IMAGE_NAME=$BITBUCKET_REPO_SLUG
- IMAGE=${DOCKERHUB_NAMESPACE}/${IMAGE_NAME} - docker push "${DOCKERHUB_NAMESPACE}/${IMAGE_NAME}:latest"
- docker tag "${IMAGE_NAME}" "${IMAGE}:latest"
- docker push "${IMAGE}:latest"
services: services:
- docker - docker