Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass deploy parameter into vars #97

Closed
arkadiuszmigalaperform opened this issue Aug 2, 2019 · 2 comments
Closed

Unable to pass deploy parameter into vars #97

arkadiuszmigalaperform opened this issue Aug 2, 2019 · 2 comments

Comments

@arkadiuszmigalaperform
Copy link

arkadiuszmigalaperform commented Aug 2, 2019

I'm using Drone 0.8

While invoking drone deploy I want to pass custom parameter e.g. VERSION_TAG to tell which TAG should be used for deployment.

So I invoke it by dronecli:

drone deploy -p VERSION_TAG=0.0.2 myrepo 10 dev

But I'm unable to access it in standard way in plugin:

terraform_dev_ecs_deploy:
  image: jmccann/drone-terraform:6
  ...
  root_dir: deployment
  vars:
    docker_image_tag: ${VERSION_TAG}
  when:
    event: deployment
    environment: dev

was trying also:
$VERSION_TAG
$$VERSION_TAG
$${VERSION_TAG}

even:

my-step:
  image: jmccann/drone-terraform:6
  environment:
    - TAG=${VERSION_TAG}
  vars:
    docker_image_tag: ${TAG}

with same results any idea how it can be pass there, is it even possible?

@arkadiuszmigalaperform arkadiuszmigalaperform changed the title Unable to pass deploy parameter Unable to pass deploy parameter into vars Aug 2, 2019
@caioquirino
Copy link
Contributor

Hi @arkadiuszmigalaperform, what you are receiving on terraform side? An empty string? Does the variable exists? Can you check if it is working for example using the following:

  test:
    image: alpine
    commands:
      - echo "VERSION_TAG=${VERSION_TAG}"

@arkadiuszmigalaperform
Copy link
Author

Above example is not working and it's impossible with Drone 0.8 which I'm using. Brad answers here: https://discourse.drone.io/t/accessing-deploy-params-in-pipeline/5253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants