Target not being observed in GCR
Closed this issue · 6 comments
neumachen commented
Looking at the code it seems that we're not getting the PLUGIN_TARGET
env var so even if I set this, that configuration is ignored.
Config:
- name: build-image-web-app
image: plugins/gcr
settings:
registry: us.gcr.io
dockerfile: dockerfiles/web-app.Dockerfile
tags:
- ${DRONE_TAG:-${DRONE_BRANCH}}
repo: us.gcr.io/magicalbanana/web_app
target: production
json_key:
from_secret: gcr-creds-container-builder-private-key
depends_on:
- slack-notification-start-build-images
when:
ref:
- refs/heads/dev
- refs/heads/master
- refs/tags/*
event:
- tag
- deployment
- push
Drone Logs:
+ /usr/local/bin/docker build --rm=true -f dockerfiles/web-app.Dockerfile -t 9ab56e3561ee965121a87b7f44da60f92df9d5a3 . --pull=true --target production --label org.label-schema.schema-version=1.0 --label org.label-schema.build-date=2020-07-09T13:42:39Z --label org.label-schema.vcs-ref=9ab56e3561ee965121a87b7f44da60f92df9d5a3 --label org.label-schema.vcs-url=https://github.com/magicalbanana/web-app-portal.git
ashwilliams1 commented
please provide a working copy of your yaml so that configuration issues can be ruled out, and so that others can try to reproduce the problem.
neumachen commented
@ashwilliams1 updated.
ashwilliams1 commented
ashwilliams1 commented
also please provide a copy of the logs (from the Drone user interface) for this step so we can see what Docker commands the plugin are trying to execute.
neumachen commented
@ashwilliams1 I just looked at it and it actually does set the --target
.
ashwilliams1 commented
ok great! sounds like target is being set, so I will close the issue. If you have any further questions, lets move the discussion to the support forum at discourse.drone.io.