Skip to content

Joe/gh-actions #76

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

Draft
wants to merge 98 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
4148d8c
start gh actions workflows
adamancini May 27, 2025
67f184f
start gh actions workflows
adamancini May 28, 2025
5cd8494
helm-repo-add
adamancini Jun 3, 2025
fdfdd1e
set fail-fast: true
adamancini Jun 4, 2025
7963be9
install helmfile
adamancini Jun 4, 2025
90ddbac
use helmfile/helmfile-action
adamancini Jun 4, 2025
a33b999
kubectl action needs v before version number
adamancini Jun 4, 2025
a2fbe95
install replicated cli
adamancini Jun 4, 2025
9c4a72b
install replicated cli
adamancini Jun 4, 2025
f5602a7
install replicated cli
adamancini Jun 4, 2025
c4717e2
set up repo secrets
adamancini Jun 4, 2025
2239f7c
ignore helm-preflight during validation
adamancini Jun 4, 2025
3611d18
replicated-release job
adamancini Jun 10, 2025
1e5a141
release-create
adamancini Jun 10, 2025
5a49887
create customer and cluster and cleanup
adamancini Jun 10, 2025
71cb017
use git branch for channel names
adamancini Jun 10, 2025
67335eb
create a channel before releasing
adamancini Jun 16, 2025
3d97c8a
use taskfile tasks for customer and cluster creation
adamancini Jun 16, 2025
39173bd
remove cleanup job to preserve clusters and customers
adamancini Jun 16, 2025
355b908
fix variable names to match taskfile expectations
adamancini Jun 16, 2025
03f7c83
add channel-create and channel-delete tasks
adamancini Jun 16, 2025
7768782
add helm install test job to validate customer deployment
adamancini Jun 16, 2025
d3b3ffd
release-prepare before pushing
adamancini Jun 16, 2025
6f6689d
add utils task to retrieve customer license ID
adamancini Jun 16, 2025
65475bd
optimize workflow with composite actions and best practices
adamancini Jun 16, 2025
81e3d73
make customer deployment test optional when secret missing
adamancini Jun 16, 2025
9e50265
ensure helm-install always runs regardless of customer secret
adamancini Jun 16, 2025
732a37e
add helmfile binary installation to setup-tools action
adamancini Jun 16, 2025
7820a86
add dependency update step to helm-install-test job
adamancini Jun 16, 2025
ea5c172
derive customer email from customer-create task instead of repo secret
adamancini Jun 16, 2025
2fe8f8f
fix helm registry login authentication method
adamancini Jun 17, 2025
5f05cb1
fix get-customer-license task to use correct field
adamancini Jun 17, 2025
b20f12b
fix github actions secret masking of license output
adamancini Jun 18, 2025
a24277c
Optimize workflow by collapsing serial jobs and enabling parallel exe…
adamancini Jun 18, 2025
70c50c6
Pass cluster name from create-customer-and-cluster to helm-install task
adamancini Jun 18, 2025
6b525e6
Align variable usage for branch and channel names consistently
adamancini Jun 18, 2025
58b7f14
Use channel-name consistently for all resource naming
adamancini Jun 18, 2025
df90117
Update container image tagging to use branch name prefixes
adamancini Jun 18, 2025
8e3f7c7
Remove pr- prefix from pull request image tags
adamancini Jun 18, 2025
82fe439
Simplify container image tagging strategy
adamancini Jun 18, 2025
af460fd
Add semantic version tagging for git tag releases
adamancini Jun 18, 2025
7b38cbe
Fix channel name normalization to handle forward slashes
adamancini Jun 18, 2025
ed33ffa
Reorganize workflow to fix job dependency order
adamancini Jun 18, 2025
796e8ca
Add Google Artifact Registry support for container images
adamancini Jun 18, 2025
523b19f
Add triple-registry container image publishing
adamancini Jun 19, 2025
520bbd5
Use Taskfile task for Replicated CLI installation
adamancini Jun 19, 2025
10f2665
Trigger new workflow runs to test triple-registry setup
adamancini Jun 19, 2025
bdc0c33
Split registry push actions into parallel jobs
adamancini Jun 20, 2025
2bc4524
fix: use OCI exporter for multi-arch image builds
adamancini Jun 20, 2025
cb25c09
refactor: simplify multi-registry push by building directly
adamancini Jun 20, 2025
e4f0d50
fix: use consistent image name across all registries
adamancini Jun 20, 2025
07aaf34
feat: add Replicated Registry proxy support to helmfile
adamancini Jun 23, 2025
855129d
fix: add cert-manager startupapicheck proxy configuration and improve…
adamancini Jun 23, 2025
5f40c1f
fix: pass REPLICATED_LICENSE_ID to helmfile sync for registry authent…
adamancini Jun 23, 2025
515bc0d
feat: add imagePullSecrets for Replicated registry proxy authentication
adamancini Jun 23, 2025
4999af9
fix: update imagepullsecret template to use dig function with Values.…
adamancini Jun 24, 2025
cc3533c
feat: make setup-kubeconfig accept cluster name argument and return d…
adamancini Jun 24, 2025
2d297c2
fix: correct imagePullSecrets configuration for all components in rep…
adamancini Jun 24, 2025
d00628d
claude project-specific settings
adamancini Jun 24, 2025
3fce54d
feat: update replicated chart version and improve YAML formatting
adamancini Jun 24, 2025
30e9966
docs: add helm testing guidance for timeout detection and debugging
adamancini Jun 25, 2025
3089633
feat: customer-helm-install task
adamancini Jun 25, 2025
ddf12cd
Merge branch 'main' into adamancini/gh-actions
adamancini Jun 25, 2025
dcfdb9e
chore: update helm chart dependencies and fix imagepullsecret template
adamancini Jun 25, 2025
169527f
feat: enhance customer workflow with full test cycle and improved tas…
adamancini Jun 26, 2025
bf74074
feat: add automatic git branch name normalization to tasks
adamancini Jun 27, 2025
719c1a1
docs: update CLAUDE.md with current project status and simplified wor…
adamancini Jun 27, 2025
39a22b2
chore: minor configuration updates
adamancini Jun 27, 2025
22c10b6
docs: explain name normalization rationale and add Vendor Portal context
adamancini Jun 27, 2025
0f8bce0
feat: enhance Replicated Registry proxy configuration
adamancini Jun 27, 2025
9faf578
feat: optimize GitHub Actions workflows with Task-based operations
adamancini Jun 27, 2025
bb442f1
fix: resolve Task YAML syntax error with echo statements
adamancini Jun 27, 2025
84a253a
docs: add Future Considerations section for replicated-actions integr…
adamancini Jun 30, 2025
a542851
feat: separate PR cleanup workflow to only run on merge to main
adamancini Jun 30, 2025
e327eeb
Revert "feat: separate PR cleanup workflow to only run on merge to main"
adamancini Jun 30, 2025
7e0c045
have claude generate a task dependency graph
adamancini Jul 2, 2025
69ee34d
remove dependency-update from install task
adamancini Jul 2, 2025
1f74672
Add test deployment action configuration
adamancini Jul 7, 2025
9a40955
fix: improve Replicated CLI download URL extraction in utils.yml
adamancini Jul 7, 2025
d16d4c8
feat: enhance channel management with unique ID support
adamancini Jul 7, 2025
9ae3f61
fix: update release-create task to use channel ID when available
adamancini Jul 7, 2025
cbfff80
fix: customer-create task to use channel ID directly with --channel flag
adamancini Jul 7, 2025
e540458
fix: improve jq error handling for replicated CLI responses
0xJMart Jul 7, 2025
21ae568
debug: add debugging and fix environment variable passing
0xJMart Jul 7, 2025
3d2aaf3
fix: resolve Task YAML syntax errors with shell variables
0xJMart Jul 7, 2025
4237ba0
cleanup: remove debugging code after confirming environment variable fix
0xJMart Jul 7, 2025
f59388f
fix: bypass GitHub Actions secret masking by using APP_SLUG in helmfile
0xJMart Jul 7, 2025
ab11d36
fix: correct Replicated CLI download URL pattern
0xJMart Jul 7, 2025
8ff7266
debug: add debug output to helm-install task to trace secret masking …
0xJMart Jul 7, 2025
4e39166
test: add debug task to test app ID passing methods
0xJMart Jul 7, 2025
42a226a
debug: add debug output to install-replicated-cli task
0xJMart Jul 7, 2025
cce84f7
fix: use environment variable instead of direct secrets reference
0xJMart Jul 7, 2025
43700fa
trigger: small change to trigger workflow
0xJMart Jul 7, 2025
a34dfc7
test: implement proper test for app ID passing methods
0xJMart Jul 7, 2025
9f58091
fix: add fallback URL for Replicated CLI download
0xJMart Jul 7, 2025
8e448f7
cleanup: remove debug code and test functions
0xJMart Jul 7, 2025
6d15910
refactor: consolidate NORMALIZED_ variable tr commands into reusable …
0xJMart Jul 7, 2025
90b3681
fix: handle empty NAME parameter in normalize-name utility
0xJMart Jul 7, 2025
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
51 changes: 51 additions & 0 deletions .github/actions/chart-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'Package Helm Charts'
description: 'Package all Helm charts and prepare release artifacts'
inputs:
app-dir:
description: 'Application directory containing charts'
default: 'applications/wg-easy'
helm-version:
description: 'Helm version to use'
default: '3.17.3'
use-cache:
description: 'Whether to use dependency cache'
default: 'true'
outputs:
release-path:
description: 'Path to release artifacts'
value: ${{ inputs.app-dir }}/release

runs:
using: 'composite'
steps:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
helm-version: ${{ inputs.helm-version }}

- name: Cache Helm dependencies
if: inputs.use-cache == 'true'
uses: actions/cache@v4
with:
path: |
${{ inputs.app-dir }}/charts/*/charts
${{ inputs.app-dir }}/Chart.lock
key: helm-deps-${{ hashFiles(format('{0}/charts/*/Chart.yaml', inputs.app-dir)) }}

- name: Package charts
shell: bash
working-directory: ${{ inputs.app-dir }}
run: task chart-package-all

- name: Verify release contents
shell: bash
working-directory: ${{ inputs.app-dir }}
run: |
echo "Verifying release directory contents:"
ls -la release/
echo "Checking required files:"
test -f release/application.yaml
test -f release/config.yaml
test -f release/cluster.yaml
echo "Chart packages:"
find release/ -name "*.tgz" | wc -l | grep -v "^0$"
35 changes: 35 additions & 0 deletions .github/actions/chart-validate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Validate Helm Charts'
description: 'Validate all Helm charts using Task-based operations'
inputs:
app-dir:
description: 'Application directory containing charts'
default: 'applications/wg-easy'
helm-version:
description: 'Helm version to use'
default: '3.17.3'
use-cache:
description: 'Whether to use dependency cache'
default: 'true'

runs:
using: 'composite'
steps:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
helm-version: ${{ inputs.helm-version }}
install-helmfile: 'true'

- name: Cache Helm dependencies
if: inputs.use-cache == 'true'
uses: actions/cache@v4
with:
path: |
${{ inputs.app-dir }}/charts/*/charts
${{ inputs.app-dir }}/Chart.lock
key: helm-deps-${{ hashFiles(format('{0}/charts/*/Chart.yaml', inputs.app-dir)) }}

- name: Validate charts
shell: bash
working-directory: ${{ inputs.app-dir }}
run: task chart-validate
48 changes: 48 additions & 0 deletions .github/actions/replicated-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'Create Replicated Release'
description: 'Create channel and release using Task-based operations'
inputs:
app-dir:
description: 'Application directory containing charts'
default: 'applications/wg-easy'
channel-name:
description: 'Release channel name'
required: true
channel-id:
description: 'Release channel ID (optional, takes precedence over channel-name)'
required: false
release-version:
description: 'Release version'
default: '0.0.1'
release-notes:
description: 'Release notes'
default: 'Release created via GitHub Actions'

outputs:
channel-id:
description: 'Channel ID created or found'
value: ${{ steps.channel.outputs.channel-id }}

runs:
using: 'composite'
steps:
- name: Setup tools
uses: ./.github/actions/setup-tools

- name: Create channel
id: channel
shell: bash
working-directory: ${{ inputs.app-dir }}
run: |
CHANNEL_ID=$(task channel-create RELEASE_CHANNEL="${{ inputs.channel-name }}" --silent | tail -1)
echo "channel-id=$CHANNEL_ID" >> $GITHUB_OUTPUT
echo "Created/found channel with ID: $CHANNEL_ID"

- name: Create release
shell: bash
working-directory: ${{ inputs.app-dir }}
run: |
task release-create \
RELEASE_CHANNEL_ID="${{ steps.channel.outputs.channel-id }}" \
RELEASE_CHANNEL="${{ inputs.channel-name }}" \
RELEASE_VERSION="${{ inputs.release-version }}" \
RELEASE_NOTES="${{ inputs.release-notes }}"
94 changes: 94 additions & 0 deletions .github/actions/setup-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: 'Setup Common Tools'
description: 'Setup Helm, Task, yq, kubectl, preflight, helmfile, and Replicated CLI'
inputs:
helm-version:
description: 'Helm version'
default: '3.17.3'
kubectl-version:
description: 'kubectl version'
default: 'v1.30.0'
app-dir:
description: 'Application directory'
default: 'applications/wg-easy'
install-kubectl:
description: 'Whether to install kubectl'
default: 'false'
install-preflight:
description: 'Whether to install preflight'
default: 'false'
install-helmfile:
description: 'Whether to install helmfile'
default: 'false'

runs:
using: 'composite'
steps:
- name: Setup Helm
uses: azure/setup-helm@v4
with:
version: ${{ inputs.helm-version }}

- name: Setup Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ github.token }}

- name: Setup kubectl
if: inputs.install-kubectl == 'true'
uses: azure/setup-kubectl@v4
with:
version: ${{ inputs.kubectl-version }}

- name: Cache tools
uses: actions/cache@v4
with:
path: |
/usr/local/bin/yq
/usr/local/bin/preflight
/usr/local/bin/helmfile
~/.replicated
key: tools-${{ runner.os }}-yq-v4.44.3-preflight-v0.95.0-helmfile-v0.170.0-replicated-latest
restore-keys: |
tools-${{ runner.os }}-yq-v4.44.3-preflight-v0.95.0-helmfile-v0.170.0-

- name: Install yq
shell: bash
run: |
if [ ! -f /usr/local/bin/yq ]; then
echo "Installing yq v4.44.3..."
sudo wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 -O /usr/local/bin/yq
sudo chmod +x /usr/local/bin/yq
else
echo "yq already installed (cached)"
fi

- name: Install preflight CLI
if: inputs.install-preflight == 'true'
shell: bash
run: |
if [ ! -f /usr/local/bin/preflight ]; then
echo "Installing preflight v0.95.0..."
curl -L https://github.com/replicatedhq/troubleshoot/releases/download/v0.95.0/preflight_linux_amd64.tar.gz | tar xz
sudo mv preflight /usr/local/bin/
else
echo "preflight already installed (cached)"
fi

- name: Install helmfile
if: inputs.install-helmfile == 'true'
shell: bash
run: |
if [ ! -f /usr/local/bin/helmfile ]; then
echo "Installing helmfile v0.170.0..."
curl -L https://github.com/helmfile/helmfile/releases/download/v0.170.0/helmfile_0.170.0_linux_amd64.tar.gz | tar xz
sudo mv helmfile /usr/local/bin/
sudo chmod +x /usr/local/bin/helmfile
else
echo "helmfile already installed (cached)"
fi

- name: Install Replicated CLI
shell: bash
working-directory: ${{ inputs.app-dir }}
run: task utils:install-replicated-cli
125 changes: 125 additions & 0 deletions .github/actions/test-deployment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: 'Test Deployment'
description: 'Test deployment using customer workflow'
inputs:
app-dir:
description: 'Application directory containing charts'
default: 'applications/wg-easy'
customer-name:
description: 'Customer name for testing'
required: true
cluster-name:
description: 'Cluster name for testing'
required: true
channel-name:
description: 'Channel name for testing'
required: false
channel-id:
description: 'Channel ID for testing (optional, takes precedence over channel-name)'
required: false
helm-version:
description: 'Helm version to use'
default: '3.17.3'
cleanup:
description: 'Whether to cleanup resources after testing'
default: 'false'

outputs:
customer-license:
description: 'Customer license ID used for testing'
value: ${{ steps.license.outputs.license-id }}

runs:
using: 'composite'
steps:
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
helm-version: ${{ inputs.helm-version }}
install-helmfile: 'true'

- name: Create customer
shell: bash
working-directory: ${{ inputs.app-dir }}
env:
REPLICATED_APP: ${{ env.REPLICATED_APP }}
REPLICATED_API_TOKEN: ${{ env.REPLICATED_API_TOKEN }}
run: |
if [ -n "${{ inputs.channel-id }}" ]; then
task customer-create \
CUSTOMER_NAME="${{ inputs.customer-name }}" \
RELEASE_CHANNEL_ID="${{ inputs.channel-id }}"
else
task customer-create \
CUSTOMER_NAME="${{ inputs.customer-name }}" \
RELEASE_CHANNEL="${{ inputs.channel-name }}"
fi

- name: Get customer license
id: license
shell: bash
working-directory: ${{ inputs.app-dir }}
env:
REPLICATED_APP: ${{ env.REPLICATED_APP }}
REPLICATED_API_TOKEN: ${{ env.REPLICATED_API_TOKEN }}
run: |
LICENSE_ID=$(task utils:get-customer-license CUSTOMER_NAME="${{ inputs.customer-name }}" --silent | tail -1)
echo "license-id=$LICENSE_ID" >> $GITHUB_OUTPUT
echo "::add-mask::$LICENSE_ID"

- name: Create cluster with retry
uses: nick-fields/[email protected]
with:
timeout_minutes: 20
retry_wait_seconds: 30
max_attempts: 3
command: |
cd ${{ inputs.app-dir }}
export REPLICATED_APP="${{ env.REPLICATED_APP }}"
export REPLICATED_API_TOKEN="${{ env.REPLICATED_API_TOKEN }}"
task cluster-create CLUSTER_NAME="${{ inputs.cluster-name }}"

- name: Setup cluster
shell: bash
working-directory: ${{ inputs.app-dir }}
env:
REPLICATED_APP: ${{ env.REPLICATED_APP }}
REPLICATED_API_TOKEN: ${{ env.REPLICATED_API_TOKEN }}
run: |
task setup-kubeconfig CLUSTER_NAME="${{ inputs.cluster-name }}"
task cluster-ports-expose CLUSTER_NAME="${{ inputs.cluster-name }}"

- name: Deploy application
shell: bash
working-directory: ${{ inputs.app-dir }}
env:
REPLICATED_APP: ${{ env.REPLICATED_APP }}
REPLICATED_API_TOKEN: ${{ env.REPLICATED_API_TOKEN }}
run: |
if [ -n "${{ inputs.channel-id }}" ]; then
task customer-helm-install \
CUSTOMER_NAME="${{ inputs.customer-name }}" \
CLUSTER_NAME="${{ inputs.cluster-name }}" \
CHANNEL_ID="${{ inputs.channel-id }}" \
REPLICATED_LICENSE_ID="${{ steps.license.outputs.license-id }}"
else
task customer-helm-install \
CUSTOMER_NAME="${{ inputs.customer-name }}" \
CLUSTER_NAME="${{ inputs.cluster-name }}" \
CHANNEL_SLUG="${{ inputs.channel-name }}" \
REPLICATED_LICENSE_ID="${{ steps.license.outputs.license-id }}"
fi

- name: Run tests
shell: bash
working-directory: ${{ inputs.app-dir }}
env:
REPLICATED_APP: ${{ env.REPLICATED_APP }}
REPLICATED_API_TOKEN: ${{ env.REPLICATED_API_TOKEN }}
run: task test

# - name: Cleanup resources
# if: inputs.cleanup == 'true'
# shell: bash
# working-directory: ${{ inputs.app-dir }}
# run: |
# task cleanup-pr-resources BRANCH_NAME="${{ inputs.customer-name }}"
Loading
Loading