forked from jsirianni/bindplane-gitflow-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Rollout Changes | ||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - main | ||
# - dev | ||
|
||
jobs: | ||
bindplane: | ||
runs-on: "ubuntu-22.04" | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- run: mkdir download | ||
|
||
- name: Install BindPlane CLI | ||
run: | | ||
curl -o bindplane.zip https://storage.googleapis.com/bindplane-op-releases/bindplane/latest/bindplane-ee-linux-amd64.zip | ||
unzip bindplane.zip | ||
sudo chmod +x bindplane | ||
sudo mv bindplane /usr/local/bin/bindplane | ||
working-directory: download | ||
|
||
- name: Create Profile | ||
run: | | ||
bindplane profile set gitflow \ | ||
--remote-url https://app.bindplane.com \ | ||
--api-key ${{ secrets.BINDPLANE_API_KEY }} | ||
bindplane profile use gitflow | ||
- name: Test CLI | ||
run: bindplane version | ||
|
||
- name: Rollout Changes | ||
run: | | ||
cd gitops_workflow_standard | ||
bash ./rollout_bindplane_configs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Directory to start the search; default is the current directory | ||
start_directory="./bindplane/configuration" | ||
|
||
mkdir -p "${start_directory}" | ||
|
||
bindplane_output=$(bindplane get configs") | ||
# Parse the NAME field from the output and loop through each one | ||
echo "$bindplane_output" | awk 'NR>1 {print $1}' | while read -r name; do | ||
bindplane rollout start "$name" | ||
done | ||
echo "Configuration rollout started." | ||