Merge pull request 'Updated 'feature_cicd_fix'' (#16) from feature_cicd_fix into develop
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: https://git.pbiernat.dev/docker/nginx-php/pulls/16
This commit is contained in:
Piotr Biernat 2021-11-23 21:34:51 +00:00
commit f254ef8eba
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ source_branch=$DRONE_SOURCE_BRANCH
if { contains "$branch" "feature_" && [ "$event" = push ]; } ; then if { contains "$branch" "feature_" && [ "$event" = push ]; } ; then
echo "BUILD FEATURE: $branch" echo "BUILD FEATURE: $branch"
docker build -t docker.pbiernat.dev/nginx-php:${branch} . docker build -t docker.pbiernat.dev/nginx-php:$branch .
return 0 return 0
fi fi
@ -31,7 +31,7 @@ if { [ "$branch" = develop ] && [ "$event" = pull_request ]; } ; then
return 0 return 0
fi fi
if { [ "$branch" = develop ] && [ "$event" = push ]; } ; then if { [ "$branch" = develop ] && [ "$event" = push ] && [ "$step_name" != build_feature ]; } ; then
echo "BUILD DEV" echo "BUILD DEV"
docker build -t docker.pbiernat.dev/nginx-php:dev . docker build -t docker.pbiernat.dev/nginx-php:dev .
return 0 return 0

View File

@ -20,7 +20,7 @@ source_branch=$DRONE_SOURCE_BRANCH
docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
if { [ "$branch" = develop ] && [ "$event" = pull_request ]; } ; then if { [ "$branch" = develop ] && [ "$event" = pull_request ]; } ; then
echo "PUSH FEATURE: ${source_branch}" echo "PUSH FEATURE: $source_branch"
docker push docker.pbiernat.dev/nginx-php:$source_branch docker push docker.pbiernat.dev/nginx-php:$source_branch
return 0 return 0
fi fi