Skip to content

Commit

Permalink
Rollout action
Browse files Browse the repository at this point in the history
  • Loading branch information
mkelly committed Oct 19, 2023
1 parent e8a2c16 commit 06ef820
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/rollout_all.yml
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
16 changes: 16 additions & 0 deletions gitops_workflow_standard/rollout_bindplane_configs.sh
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."

0 comments on commit 06ef820

Please sign in to comment.