I’m using Drone version 0.8.x for Java Application CI/CD. I want to release ECR image with my app and tag it with my application version (from Maven - java build tool).
So in first step I’m building app and exporting version number into a file (to pass it to next step and container). But next step is ECR plugin where I don’t know how to pass tag computed before and saved into file.
I’m saving file into version.tmp and here’s my ECR plugin usage step:
the reason this does not work is because environment is an array of Go string literal. It is not a bash string and is not run through a bash interpreter. Therefore it literally sets the environment variable value to $(cat version.tmp)
Hi @Ferdezo , I’ve been struggling with the same version tagging myself. @bradrydzewski sugested to try drone-docker because it works with .tags file. But in your reply you say “thanks, it works with drone ECR plugin”. Did you manage to get it working with drone ECR or drone docker plugin? Could you share how you resolved this?
I’ve been thinking of using drone docker, but Drone ECR makes it easy to authenticate with ECR, while with Drone docker I’m finding it harder to do…