Skip to content

Commit

Permalink
wip: auto rollout
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirianni committed Jan 24, 2024
1 parent 2c3e0c5 commit 20bcf09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
description: 'Path to the directory which will contain the rendered OTEL format of the configuration resources'
token:
description: 'The GitHub token used to authenticate to GitHub when writing OTEL configs back to the repo'
enable_auto_rollout:
description: 'When enabled, the action will trigger a rollout for all configurations that have been updated'
default: false

runs:
using: 'docker'
Expand All @@ -42,3 +45,4 @@ runs:
- ${{ inputs.enable_otel_config_write_back }}
- ${{ inputs.configuration_output_dir }}
- ${{ inputs.token }}
- ${{ inputs.enable_auto_rollout }}
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ configuration_path=${7}
enable_otel_config_write_back=${8}
configuration_output_dir=${9}
token=${10}
enable_auto_rollout=${11}

# This branch name will be compared to target_branch to determine if the action
# should apply or write back configurations.
Expand Down Expand Up @@ -157,7 +158,13 @@ main() {
bindplane apply "$destination_path"

echo "Applying configuration path: $configuration_path"
bindplane apply "$configuration_path"
bindplane apply "$configuration_path" > configuration.out

# When auto rollout is enabled
if [ "$enable_auto_rollout" = true ]; then
echo "Auto rollout enabled."
cat configuration.out
fi

# When write back is enabled, write the raw otel configs
# back to the repository.
Expand Down

0 comments on commit 20bcf09

Please sign in to comment.