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

feat: Auto rollout #4

Merged
merged 13 commits into from
Jan 29, 2024
Merged

feat: Auto rollout #4

merged 13 commits into from
Jan 29, 2024

Conversation

jsirianni
Copy link
Member

No description provided.

Comment on lines +161 to +162
bindplane apply "$configuration_path" > configuration.out
cat configuration.out
Copy link
Member Author

Choose a reason for hiding this comment

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

Capture the output in configuration.out to be used later. Cat it out so it is still visable in the action output.

# When auto rollout is enabled
if [ "$enable_auto_rollout" = true ]; then
echo "Auto rollout enabled."
awk '{print $2}' < configuration.out | while IFS= read -r config
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 loops through each line in the file. The file looks like this:

Configuration k8s-cluster:1 created
Configuration k8s-gateway:1 created
Configuration k8s-node:1 created

Awk is used to grab the second column, which would be the config name with the version suffix. This allows us to do a bindplane rollout status $config for each configuration that was applied. This is better than checking all configs that might exist in bindplane, we only want to check on configs managed by the action.

@jsirianni jsirianni marked this pull request as ready for review January 29, 2024 14:07
@jsirianni jsirianni requested a review from cpheps January 29, 2024 14:07
@jsirianni jsirianni merged commit 39340e7 into dev Jan 29, 2024
3 checks passed
@jsirianni jsirianni deleted the auto-rollout branch January 29, 2024 14:09
jsirianni added a commit that referenced this pull request Jan 29, 2024
* wip

* fix matrix

* install cli

* pull image

* run bindplane in background

* arg syntax

* fix action name and uses field

* switch to docker

* cURL

* put bindplane binary in path

* fix args and add shellcheck to ci

* remove missing function call

* Add debug resource get

* fix paths

* remove dir support

* fix resources for tests

* wait for bindplane to become ready

* try setting bindplane host

* detect runner ip

* detect internal ip

* debug

* use first addr

* exec into container

* test additional version

* try write back without commit

* test write back

* ci

* test write back

* test write back

* test write back

* try write back

* add github auth

* BindPlane OP Action: Update OTEL Configs

* clone repo

* try again

* latest

* BindPlane OP Action: Update OTEL Configs

* shellcheck

* prevent out of order commits

* BindPlane OP Action: Update OTEL Configs

* shellcheck

* return early if nothing to commit

* fix out path

* clone repo outside of orig context

* BindPlane OP Action: Update OTEL Configs

* BindPlane OP Action: Update OTEL Configs

* comment

* always run

* fix workflow example

* fix rm

* skip apply if not on target branch

* update org

* rename params

* fix bad rename

* enable bool for write back. Move branch check outside of write back because it always matters

* some cleanup

* readme

* badge

* readme job name

* grab pending version

* add logging useful for debugging running action

* remove unused files

* use latest instead of pending

* cleanup zip output

* feat: Auto rollout (#4)

* wip: auto rollout

* test against this branch

* add auto rollout to workflow

* print config apply output

* check rollout status

* check for pending rollout

* shellcheck: Fix loop logic

* install jq

* add enable_auto_rollout to readme

* revert this change, use external repo for testing this pr

* check for stable configs as well

* remove branch from ci, we will test using an external repo

* use case

---------

Co-authored-by: bindplane-op-action <bindplane-op-action>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants