Menu

Our deploy job got an empty image tag because the runner thought it was a secret
📰

Our deploy job got an empty image tag because the runner thought it was a secret

DEV Community: cicd·Sergey Shinder·13 days ago
#du5RCgtC
#devtocicd#devto#dev#build#empty
Reading 0:00
15s threshold

Our returns API is built and deployed by one GitHub Actions workflow with two jobs. The build job pushes the image to ECR and publishes the full image reference as a job output. The deploy job reads that output, takes the tag from the end of it and runs helm upgrade with --set image.tag. In October it deployed a build from March to production, and for most of a working day customers could not create returns for the two carriers we had added since the spring.

The workflow had not been edited in months. What changed was a tidy-up of repository settings. Our AWS account ID had been a plain repository variable, used to build the role ARN for the credentials step, and someone moved it into secrets on the reasoning that anything with an account number in it should be hidden.

The image reference begins with the registry host, and the registry host contains the account ID. The runner will not pass a job output that contains a secret value to another job.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.