Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,25 @@ jobs:
run: |
GITLEAKS_VERSION=$(curl -sf https://api.github.com/repos/gitleaks/gitleaks/releases/latest \
| grep '"tag_name"' | cut -d'"' -f4)
curl -sfL "https://github.com/gitleaks/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION#v}_linux_x64.tar.gz" \
| tar -xz -C /usr/local/bin gitleaks
if [[ -z "$GITLEAKS_VERSION" ]]; then
echo "ERROR: failed to resolve gitleaks version" >&2
exit 1
fi

archive="$(mktemp)"
trap 'rm -f "$archive"' EXIT
url="https://github.com/gitleaks/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION#v}_linux_x64.tar.gz"
for attempt in 1 2 3; do
if curl -sfL "$url" -o "$archive" && tar -tzf "$archive" >/dev/null 2>&1; then
tar -xzf "$archive" -C /usr/local/bin gitleaks
exit 0
fi
echo "Gitleaks archive download was incomplete (attempt ${attempt}/3)" >&2
rm -f "$archive"
sleep "$attempt"
done
echo "ERROR: failed to download a valid gitleaks archive" >&2
exit 1
- name: Detect secrets
run: gitleaks detect --config .gitleaks.toml --source . --redact

Expand Down
4 changes: 2 additions & 2 deletions clusters/oci-lab/apps/harbor-backup/manifests/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ spec:
image: postgres:16-alpine
env:
- name: PGHOST
value: harbor-database
value: oci-lab-harbor-database
- name: PGUSER
value: postgres
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: harbor-database
name: oci-lab-harbor-database
key: POSTGRES_PASSWORD
command: [sh, -ceu]
args:
Expand Down
4 changes: 2 additions & 2 deletions values/clusters/oci-lab/harbor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ core:
imagePullPolicy: IfNotPresent
env:
- name: PGHOST
value: harbor-database
value: oci-lab-harbor-database
- name: PGUSER
value: postgres
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: harbor-database
name: oci-lab-harbor-database
key: POSTGRES_PASSWORD
- name: AWS_ACCESS_KEY_ID
valueFrom:
Expand Down
Loading