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

Desire to use the env-file for release name and other variables #89

Open
driscollAtBitGo opened this issue Jan 27, 2019 · 0 comments
Open

Comments

@driscollAtBitGo
Copy link

Hello! First off amazing job, this plugin is excellent and solves so many problems for me.

I'm trying to use a more customized release name than just the branch or tag or other standard Drone environment variable. I looked in the main.go file and it appears you are loading a "env-file" but I can't figure out how to use it. Where does this file need to be created in the shared volume? This is what I'm basically doing, I attempted using the variables directly when they didn't seem to be implicitly picked up from the file I created, but it may be in the wrong place? Any help is greatly appreciated!

pipeline:
  step-one:
    image: node:10.14.2
    commands:
      - export ticketNumber=$(echo "${CI_COMMIT_BRANCH}" | awk 'match($0, /(^TIX-[0-9]*)/) { print tolower( substr( $0, RSTART, RLENGTH ))}')
      - echo "RELEASE: ${ticketNumber}" > env-file
      - echo "VALUES: valueOne=something,valueTwo=somthing" >> env-file
      - echo "NAMESPACE: my-namespace" >> env-file
      - cat env-file

  deploy:
      image: quay.io/ipedrazas/drone-helm
      skip_tls_verify: "true"
      chart: ./charts/microservices
      release: ${RELEASE}
      values: ${VALUES}
      namespace: ${NAMESPACE}
      secrets: [ api_server, kubernetes_token ]
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

1 participant