Desire to use the env-file for release name and other variables
driscollAtBitGo opened this issue · 0 comments
driscollAtBitGo commented
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 ]