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

Revert to old tacos unlock #197

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
83fe509
reverting back to old version of tacos unlock
kneeyo1 Mar 22, 2024
c0f3df7
auto-commit: GHA deps, for test
Mar 22, 2024
14e7b62
add back terragrunt-slices
kneeyo1 Mar 22, 2024
cb5ef3a
this might look cleaner
kneeyo1 Mar 22, 2024
0342f31
revert a bit more, no more fan in summary
kneeyo1 Mar 22, 2024
fc71f09
chmod
kneeyo1 Mar 22, 2024
c2b327f
triyng this script
kneeyo1 Mar 25, 2024
f8c4f63
correctly run tf-lock-release
kneeyo1 Mar 25, 2024
6437617
this gets all slices and not just changed files
kneeyo1 Mar 25, 2024
30c2058
fully remove the matrix workflow and do ALL slices
kneeyo1 Mar 25, 2024
9df1217
remove unused var
kneeyo1 Mar 25, 2024
a97bdc7
needs the matrix for setup
kneeyo1 Mar 25, 2024
300934c
lets get this bread
kneeyo1 Mar 26, 2024
5f12a1e
remove the matrix stuff, add conditional for set-workload-identity-pr…
kneeyo1 Mar 26, 2024
978a602
clean code is happy code
kneeyo1 Mar 26, 2024
6fd1fef
add some checks for tf root module
kneeyo1 Mar 26, 2024
0a7d974
bash tricks
kneeyo1 Mar 26, 2024
d4e8925
workload-identity-provider gets passed quite a bit of stuff
kneeyo1 Mar 26, 2024
0b92ac5
trying this one more time, it should work
kneeyo1 Mar 26, 2024
2420197
new setup
kneeyo1 Mar 27, 2024
b4a2c39
update pr comment
kneeyo1 Mar 27, 2024
dca9a10
chmod
kneeyo1 Mar 28, 2024
8e8411f
more chmod
kneeyo1 Mar 28, 2024
9b9ca00
i think this is supposed to be a pipe
kneeyo1 Mar 28, 2024
3884c3e
added terragrunt and terraform setup
kneeyo1 Mar 28, 2024
86b0919
clean up ocid_provider call
kneeyo1 Mar 28, 2024
2b46ef7
json dumps needs list
kneeyo1 Mar 28, 2024
d3194b1
trying this out to make json happy
kneeyo1 Mar 29, 2024
877789e
properly set the output
kneeyo1 Mar 29, 2024
bde3cf1
this should unlock all slices, matrix style
kneeyo1 Mar 29, 2024
2951c83
if statement might be broken. fixed
kneeyo1 Mar 29, 2024
a80ae1a
add debugging step
kneeyo1 Mar 29, 2024
d07cc00
im missing a pipe
kneeyo1 Mar 29, 2024
d9b64d2
this might be why
kneeyo1 Mar 29, 2024
c613126
stealing all the setup tasks
kneeyo1 Mar 29, 2024
0d790b3
custom setup probably..
kneeyo1 Mar 29, 2024
cf9ba9c
# This is a combination of 7 commits.
kneeyo1 Mar 29, 2024
e7debd9
direct add in the editted files using slices.py
kneeyo1 Apr 2, 2024
a7b3100
simplified tf_lock_release
kneeyo1 Apr 4, 2024
5769d78
correct details for failure
kneeyo1 Apr 4, 2024
48a5276
refactored to create basic setup derived from setup
kneeyo1 Apr 4, 2024
c24d29d
removing one more step
kneeyo1 Apr 4, 2024
4901cbc
add gcp auth
kneeyo1 Apr 4, 2024
bffda88
add the inputs
kneeyo1 Apr 4, 2024
3e27545
give it the SA as input
kneeyo1 Apr 4, 2024
8344b9e
need to pass in the ssh-private-key
kneeyo1 Apr 4, 2024
182cd52
trying this first
kneeyo1 Apr 4, 2024
337b475
write out debug msg for UserError
kneeyo1 Apr 5, 2024
11d45bd
tf lock acquire exit is not consistent, tthis fixes it
kneeyo1 Apr 5, 2024
ae17c2d
make tf-lock use terragrunt-noninteractive
bukzor Apr 5, 2024
de52de6
fixed working dir
kneeyo1 Apr 5, 2024
4d981d1
Merge branch 'main' into fix/unlock-all-on-release
kneeyo1 Apr 11, 2024
4cf8660
Merge branch 'main' into fix/unlock-all-on-release
kneeyo1 Apr 30, 2024
5cc2569
Update TODO.md
kneeyo1 May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 4 additions & 30 deletions .github/workflows/tacos_unlock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,47 +116,21 @@ jobs:
- name: Unlock
id: main
run: |
tf-step-summary "TACOS Unlock" "$TACOS_GHA_HOME/"lib/tacos/unlock
# release all tfstate locsk currently held
kneeyo1 marked this conversation as resolved.
Show resolved Hide resolved
terragrunt-slices | ./tacos-gha/lib/ci/unlock

- name: Save matrix result
# we need to show any errors to end-users
if: always()
uses: ./tacos-gha/.github/actions/matrix-fan-out

kneeyo1 marked this conversation as resolved.
Show resolved Hide resolved
summary:
needs: tacos_unlock
# we need to report failures, too
if: always() && needs.tacos_unlock.result != 'skipped'

runs-on: ubuntu-latest

steps:
- name: Checkout tacos-gha
uses: actions/checkout@v4
with:
repository: ${{inputs.tacos_gha_repo}}
ref: ${{inputs.tacos_gha_ref}}
path: tacos-gha

- name: Setup
uses: ./tacos-gha/.github/actions/just-the-basics
- name: Run matrix-fan-in
uses: ./tacos-gha/.github/actions/matrix-fan-in
- name: Summarize
id: summary
run: |
./tacos-gha/lib/ci/tacos-unlock-summary |
gha-step-summary

- name: Update PR
# we want to report failures, too
if: always()

uses: thollander/actions-comment-pull-request@v2.4.3
with:
message: ${{ fromJSON(steps.summary.outputs.summary) }}
comment_tag: unlock
mode: recreate
message: ${{ fromJSON(steps.main.outputs.summary) }}
comment_tag: unlock(${{env.TF_ROOT_MODULE}})

reset-label:
name: Reset Label
Expand Down
1 change: 1 addition & 0 deletions bin/terragrunt-slices
10 changes: 10 additions & 0 deletions lib/ci/unlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -euo pipefail
exec 1>&2 # stdout is reserved for tf plan/apply results

(
echo "### TACOS Unlock: $TF_ROOT_MODULE"
cat # pass deeper explanation via stdin
echo
xargs -r -P10 -n10 tf-lock-release
) | gha-step-summary;