-
Notifications
You must be signed in to change notification settings - Fork 250
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
ci: enable CD for commits to main #640
Conversation
# for use in Docker image tags. | ||
|
||
TAG=$(sh ./tools/image-tag) | ||
echo ${TAG//+/-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was being done in a few different places, but also it got complicated to do in the Drone config so I extracted it out to a new script to reduce how many times we have to copy the same sanitization replacement.
@@ -1,4 +1,4 @@ | |||
#!/usr/bin/env bash | |||
#!/usr/bin/env sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The automation for CD uses alpine
which doesn't have Bash installed, and it has always used sh. To make sure we continue to support sh I'm explicitly setting it here.
{ | ||
"git_committer_name": "updater-for-ci[bot]", | ||
"git_author_name": "updater-for-ci[bot]", | ||
"git_committer_email": "119986603+updater-for-ci[bot]@users.noreply.github.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any danger in exposing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it, you still need the private key to be able to do anything and other teams have been using the same workflow with the same settings AFAIK (including grafana/agent).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
`sh` (as executed by Alpine) understands `set -o pipefail`, but other installations of sh do not. This commit partially reverts the change from #640 so that the scripts expect bash, and that our usage of alpine installs bash before executing the tools/image-tag-docker script.
`sh` (as executed by Alpine) understands `set -o pipefail`, but other installations of sh do not. This commit partially reverts the change from #640 so that the scripts expect bash, and that our usage of alpine installs bash before executing the tools/image-tag-docker script.
… versions PR grafana#640 neglected to notice that using Docker-compatible tag names overwrote the behavior for the version baked into the binary, causing binaries to start reporting invalid semantic version strings.
`sh` (as executed by Alpine) understands `set -o pipefail`, but other installations of sh do not. This commit partially reverts the change from grafana#640 so that the scripts expect bash, and that our usage of alpine installs bash before executing the tools/image-tag-docker script.
… versions (grafana#653) PR grafana#640 neglected to notice that using Docker-compatible tag names overwrote the behavior for the version baked into the binary, causing binaries to start reporting invalid semantic version strings.
Re-enables continuous delivery for main commits for internal testing.