Skip to content
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

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Apr 22, 2024

Re-enables continuous delivery for main commits for internal testing.

# for use in Docker image tags.

TAG=$(sh ./tools/image-tag)
echo ${TAG//+/-}
Copy link
Member Author

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
Copy link
Member Author

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.

@rfratto rfratto added the backport-to-agent:no PR should NOT be backported to the agent repo. label Apr 23, 2024
@rfratto rfratto marked this pull request as ready for review April 23, 2024 15:06
{
"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",
Copy link
Collaborator

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?

Copy link
Member Author

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).

Copy link
Collaborator

@mattdurham mattdurham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rfratto rfratto merged commit 5330b90 into grafana:main Apr 23, 2024
11 checks passed
@rfratto rfratto deleted the enable-cd branch April 23, 2024 15:15
rfratto added a commit that referenced this pull request Apr 23, 2024
`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.
rfratto added a commit that referenced this pull request Apr 23, 2024
`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.
rfratto added a commit to rfratto/alloy that referenced this pull request Apr 23, 2024
… 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.
rfratto added a commit that referenced this pull request Apr 23, 2024
… versions (#653)

PR #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.
hainenber pushed a commit to hainenber/alloy that referenced this pull request May 1, 2024
hainenber pushed a commit to hainenber/alloy that referenced this pull request May 1, 2024
`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.
hainenber pushed a commit to hainenber/alloy that referenced this pull request May 1, 2024
… 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.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-to-agent:no PR should NOT be backported to the agent repo. frozen-due-to-age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants