Echo docker image with tag in pipeline
This commit is contained in:
@@ -42,9 +42,11 @@ steps:
|
|||||||
- name: docker build and push
|
- name: docker build and push
|
||||||
image: docker:24.0.7
|
image: docker:24.0.7
|
||||||
commands:
|
commands:
|
||||||
- docker build . -t $docker_registry$docker_repo:$DRONE_BRANCH
|
- $dockerImageWithTag = "$docker_registry$docker_repo:$DRONE_BRANCH"
|
||||||
|
- docker build . -t $dockerImageWithTag
|
||||||
- echo $docker_password | docker login --username $docker_username --password-stdin $docker_registry
|
- echo $docker_password | docker login --username $docker_username --password-stdin $docker_registry
|
||||||
- docker push $docker_registry$docker_repo:$DRONE_BRANCH
|
- docker push $dockerImageWithTag
|
||||||
|
- echo "Built and pushed $dockerImageWithTag"
|
||||||
environment:
|
environment:
|
||||||
docker_username:
|
docker_username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
|||||||
Reference in New Issue
Block a user