I’m trying to configure a pipeline that’s is supposed to achieve the following steps:
- Fetch repo tags,
- Install dependencies,
- Perform internal checks (unit tests, lint, and type-checks)
- Tag the repository with the next available tag (this tag will be used in further steps)
- Build using the previously generated tag
- Upload the assets from the build to Google Cloud Storage on a new folder as the previously generated tag. (This is what is causing me issues)
In the step where I tag the repository, I’m writing the new tag value in the “.tags” file so that I can use it later in the pipeline.
In order to upload the assets to Google Cloud Storage, I’m using the “plugins/gcs” image.
Considering the scenario described, is it possible to dynamically set the “target” parameter in the plugin’s settings with the content of the “.tags” file?
Something like this, for example:
- name: upload-gcs image: plugins/gcs settings: source: build target: "my-bucket/$(cat .tags)/" token: from_secret: drone-gcr-access