From 62fddcb283cc313347dad1cc9925b680f2146c3f Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:00:38 -0500 Subject: [PATCH 01/14] Updated ci-flow --- .github/workflows/ci.yaml | 198 +++++++++++++++++++++++++++++++++++--- 1 file changed, 182 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 952c2543..457aa67f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - windsor-up-test pull_request: branches: - main @@ -34,31 +35,196 @@ jobs: run: mkdir -p .docker-cache - name: Cache .docker-cache - uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: .docker-cache key: docker-cache-${{ runner.os }}-${{ github.sha }} restore-keys: docker-cache-${{ runner.os }}- - - name: Install Aqua + # Install Aqua + - name: Install Aqua on Linux/macOS + if: runner.os == 'Linux' || runner.os == 'macOS' uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1 with: - aqua_version: v2.44.1 + aqua_version: v2.28.0 + - name: Set aqua path + if: runner.os == 'Linux' || runner.os == 'macOS' + run: | + echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH + + # Install tools - name: Install tools - run: aqua install + run: | + aqua install + + # Install Windsor CLI + - name: Install Windsor CLI + uses: windsorcli/action/.github/actions/windsorcli@078842a08b468bd2278563bbc929e9d968095988 # v0.2.0 + with: + version: ${{ env.WINDSOR_VERSION }} + install_folder: ${{ github.workspace }}/bin + context: local + + # Windsor Up + - name: Windsor Up on Linux/macOS + if: runner.os == 'Linux' || runner.os == 'macOS' + run: | + # Set WINDSOR_PROJECT_ROOT + export WINDSOR_PROJECT_ROOT="${{ github.workspace }}" + + # Windsor Init + windsor init local + + # Windsor Up + windsor context get + windsor up --install --verbose + + - name: Windsor Up on Windows + if: runner.os == 'Windows' + run: | + # Set WINDSOR_PROJECT_ROOT + $env:WINDSOR_PROJECT_ROOT="${{ github.workspace }}" + + # Windsor Init + windsor init local + + # Windsor Up + windsor context get + windsor up --install --verbose + + shell: powershell + + # Windsor Down + - name: Windsor Down on Linux/macOS + if: always() && (runner.os == 'Linux' || runner.os == 'macOS') + run: | + # Set WINDSOR_PROJECT_ROOT + export WINDSOR_PROJECT_ROOT="${{ github.workspace }}" + + # Windsor Down + windsor down --clean + + - name: Windsor Down on Windows + if: always() && (runner.os == 'Windows') + run: | + # Set WINDSOR_PROJECT_ROOT + $env:WINDSOR_PROJECT_ROOT="${{ github.workspace }}" + + # Windsor Down + windsor down --clean + shell: powershell + + # Docker Clean + - name: Docker Clean on Linux/macOS + if: always() && (runner.os == 'Linux' || runner.os == 'macOS') + run: | + # Check for running containers and remove them + containers=$(docker ps -aq) + if [ -n "$containers" ]; then + echo "Removing containers..." + docker rm -f "$containers" + else + echo "No containers to remove." + fi + + # Prune system, volumes, and networks + echo "Pruning Docker system, volumes, and networks..." + docker system prune -a -f + docker volume prune -f + docker network prune -f + docker system prune -a -f + + + - name: Docker Clean on Windows + if: always() && runner.os == 'Windows' + run: | + # Check for running containers and remove them + $containers = docker ps -aq + if ($containers) { + Write-Output "Removing containers..." + docker rm -f $containers + } else { + Write-Output "No containers to remove." + } + + # Prune system, volumes, and networks + Write-Output "Pruning Docker system, volumes, and networks..." + docker system prune -a -f + docker volume prune -f + docker network prune -f + docker system prune -a -f + + shell: powershell + + # Windsor Clean + - name: Windsor Clean on Linux/macOS + if: always() && (runner.os == 'Linux' || runner.os == 'macOS') + run: | + if [ "$GITHUB_WORKSPACE" == "/" ]; then + echo "Error: GITHUB_WORKSPACE is the root folder. Aborting cleanup." + exit 1 + fi + + if [ ! -d "$GITHUB_WORKSPACE" ]; then + echo "Error: GITHUB_WORKSPACE is not a directory. Aborting cleanup." + exit 1 + fi + sudo rm -rf $GITHUB_WORKSPACE/.windsor + sudo rm -rf $GITHUB_WORKSPACE/*.* + sudo rm -rf $GITHUB_WORKSPACE/terraform + sudo rm -rf $GITHUB_WORKSPACE/kustomize + rm -rf ./.yamllint + rm -rf ./.gitignore + rm -rf ./.editorconfig + + - name: Windsor Clean on Windows + if: always() && runner.os == 'Windows' + run: | + if ($env:GITHUB_WORKSPACE -eq "C:\") { + Write-Error "Error: GITHUB_WORKSPACE is the root folder. Aborting cleanup." + exit 1 + } + + if (-Not (Test-Path -Path $env:GITHUB_WORKSPACE -PathType Container)) { + Write-Error "Error: GITHUB_WORKSPACE is not a directory. Aborting cleanup." + exit 1 + } + + Get-ChildItem -Path "$env:GITHUB_WORKSPACE" -Recurse | ForEach-Object { + try { + Remove-Item -Recurse -Force $_.FullName + } catch { + Write-Warning "Warning: Could not delete $_.FullName because it is in use." + } + } + shell: powershell + + # Remove Tools + - name: Remove tools + if: always() && (runner.os == 'Linux' || runner.os == 'macOS') + run: | + aqua rm --all 2>&1 - - name: Install Windsor CLI from Main Branch + # Check if any files still exist in the workspace and report them if found (Linux/macOS) + - name: Check for remaining files on Linux/macOS + if: always() && (runner.os == 'Linux' || runner.os == 'macOS') run: | - git clone https://github.com/windsorcli/cli.git - cd cli/cmd/windsor - go build -o windsor - chmod +x windsor - mkdir -p $HOME/.local/bin - mv windsor $HOME/.local/bin - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Print Windsor Version + remainingFiles=$(find . -maxdepth 1 -type f) + if [ -n "$remainingFiles" ]; then + echo "Error: Found files in the workspace that should be removed:" + echo "$remainingFiles" + exit 1 + fi + + # Check if any files still exist in the workspace and report them if found (Windows) + - name: Check for remaining files on Windows + if: always() && runner.os == 'Windows' run: | - windsor version - \ No newline at end of file + $remainingFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse + if ($remainingFiles) { + Write-Output "Error: Found files in the workspace that should be removed:" + $remainingFiles | ForEach-Object { Write-Output $_.FullName } + exit 1 + } + shell: powershell From 9f227bf936c7aa302251268a03dea9d1b860ef67 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:04:21 -0500 Subject: [PATCH 02/14] Updated ci-flow --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 457aa67f..8b53d5c1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: TALOSCONFIG: ${{ github.workspace }}/contexts/local/.talos/config PRIVATE_DOMAIN_NAME: private.test DNS_SERVER_IP: "10.5.255.200" - WINDSOR_VERSION: "v0.2.0" + WINDSOR_VERSION: "v0.5.1" steps: - name: Checkout code From ce02ef8aea2c5f89736efac5f1b67a44bfea3be5 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:10:39 -0500 Subject: [PATCH 03/14] Updated ci-flow --- .github/renovate.json | 25 +++++++++++++++++++++++++ .github/workflows/ci.yaml | 5 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index 2f0f049b..3badb144 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -50,6 +50,31 @@ } ], "customManagers": [ + { + "customType": "regex", + "fileMatch": [ + "^\\.github/workflows/ci\\.yaml$" + ], + "datasourceTemplate": "github-commits", + "packageNameTemplate": "windsorcli/cli", + "versioningTemplate": "semver", + "matchStrings": [ + "ref:\\s*(?main)" + ] + }, + { + "customType": "regex", + "fileMatch": [ + "^\\.github/workflows/ci\\.yaml$" + ], + "matchStrings": [ + "(^|\\s)windsorcli_version:\\s*(?v[\\d\\.]+)" + ], + "depNameTemplate": "version", + "datasourceTemplate": "github-tags", + "packageNameTemplate": "windsorcli/cli", + "versioningTemplate": "semver" + }, { "customType": "regex", "fileMatch": ["^\\.github/workflows/ci\\.yaml$"], diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8b53d5c1..087cffff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: TALOSCONFIG: ${{ github.workspace }}/contexts/local/.talos/config PRIVATE_DOMAIN_NAME: private.test DNS_SERVER_IP: "10.5.255.200" - WINDSOR_VERSION: "v0.5.1" + windsorcli_version: "v0.5.1" steps: - name: Checkout code @@ -62,7 +62,7 @@ jobs: - name: Install Windsor CLI uses: windsorcli/action/.github/actions/windsorcli@078842a08b468bd2278563bbc929e9d968095988 # v0.2.0 with: - version: ${{ env.WINDSOR_VERSION }} + version: ${{ env.windsorcli_version }} install_folder: ${{ github.workspace }}/bin context: local @@ -177,6 +177,7 @@ jobs: rm -rf ./.yamllint rm -rf ./.gitignore rm -rf ./.editorconfig + rm -rf ./LICENSE - name: Windsor Clean on Windows if: always() && runner.os == 'Windows' From 997bfc7df0a938b2d3579c78b230cd5ed6b67a5b Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:15:11 -0500 Subject: [PATCH 04/14] Updated ci-flow --- .github/workflows/ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 087cffff..031ee61e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,10 @@ jobs: uses: windsorcli/blueprint/.github/workflows/checkov.yaml@37a5386198caa29f87531d09003512adc5407702 # v0.1.0 ci: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} env: KUBECONFIG: ${{ github.workspace }}/contexts/local/.kube/config From 074c474ba4be69cce923e49074a9927d8ab081fa Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:19:56 -0500 Subject: [PATCH 05/14] Updated ci-flow --- .github/workflows/ci.yaml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 031ee61e..cf55b3f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,8 @@ jobs: ci: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, macos-latest] + # os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} env: @@ -44,18 +45,39 @@ jobs: key: docker-cache-${{ runner.os }}-${{ github.sha }} restore-keys: docker-cache-${{ runner.os }}- + - name: Install Docker on macOS + if: runner.os == 'macOS' + run: | + brew install --cask docker + # Install Aqua - name: Install Aqua on Linux/macOS if: runner.os == 'Linux' || runner.os == 'macOS' uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1 with: aqua_version: v2.28.0 + + - name: Install Aqua on Windows + if: runner.os == 'Windows' + run: | + Invoke-WebRequest -Uri "https://github.com/aquaproj/aqua/releases/download/v2.28.0/aqua_windows_amd64.zip" -OutFile "aqua.zip" + Expand-Archive -Path "aqua.zip" -DestinationPath "$env:GITHUB_WORKSPACE/bin" + Remove-Item -Path "aqua.zip" + $env:Path += ";$env:GITHUB_WORKSPACE/bin" + shell: powershell - - name: Set aqua path + - name: Set aqua path on Linux/macOS if: runner.os == 'Linux' || runner.os == 'macOS' run: | echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH - + + - name: Set aqua path on Windows + if: runner.os == 'Windows' + run: | + $aquaPath = "${env:GITHUB_WORKSPACE}\bin" + [System.Environment]::SetEnvironmentVariable('Path', $env:Path + ';' + $aquaPath, [System.EnvironmentVariableTarget]::Process) + shell: powershell + # Install tools - name: Install tools run: | From ecc4ed476375c99989bbbc0d2c7a76b17afab0bc Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:22:34 -0500 Subject: [PATCH 06/14] Updated ci-flow --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cf55b3f4..412b2acc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,8 @@ jobs: ci: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] + # os: [ubuntu-latest, macos-latest] # os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -49,7 +50,7 @@ jobs: if: runner.os == 'macOS' run: | brew install --cask docker - + # Install Aqua - name: Install Aqua on Linux/macOS if: runner.os == 'Linux' || runner.os == 'macOS' From 5bdc77966197ef3090683aafcd48e71ca9dee416 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:27:58 -0500 Subject: [PATCH 07/14] Updated ci-flow --- .github/workflows/ci.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 412b2acc..2c8c841e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,8 +20,8 @@ jobs: ci: strategy: matrix: - os: [ubuntu-latest] - # os: [ubuntu-latest, macos-latest] + # os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] # os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -46,11 +46,10 @@ jobs: key: docker-cache-${{ runner.os }}-${{ github.sha }} restore-keys: docker-cache-${{ runner.os }}- - - name: Install Docker on macOS + - name: Set up Docker if: runner.os == 'macOS' - run: | - brew install --cask docker - + uses: docker/setup-buildx-action@v2 + # Install Aqua - name: Install Aqua on Linux/macOS if: runner.os == 'Linux' || runner.os == 'macOS' From 0b79ced424493f557cc66217e487cafa3144d324 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:31:28 -0500 Subject: [PATCH 08/14] Updated ci-flow --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c8c841e..a3c51c09 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,11 @@ jobs: ci: strategy: + fail-fast: false matrix: # os: [ubuntu-latest] - os: [ubuntu-latest, macos-latest] - # os: [ubuntu-latest, windows-latest, macos-latest] + # os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} env: @@ -47,7 +48,6 @@ jobs: restore-keys: docker-cache-${{ runner.os }}- - name: Set up Docker - if: runner.os == 'macOS' uses: docker/setup-buildx-action@v2 # Install Aqua From 13f20b04757b17d843e76c34faeb66c7982796c8 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:35:43 -0500 Subject: [PATCH 09/14] ubuntu-only --- .github/workflows/ci.yaml | 115 +------------------------------------- 1 file changed, 1 insertion(+), 114 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a3c51c09..b8292d3d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,13 +18,7 @@ jobs: uses: windsorcli/blueprint/.github/workflows/checkov.yaml@37a5386198caa29f87531d09003512adc5407702 # v0.1.0 ci: - strategy: - fail-fast: false - matrix: - # os: [ubuntu-latest] - # os: [ubuntu-latest, macos-latest] - os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest env: KUBECONFIG: ${{ github.workspace }}/contexts/local/.kube/config @@ -47,37 +41,16 @@ jobs: key: docker-cache-${{ runner.os }}-${{ github.sha }} restore-keys: docker-cache-${{ runner.os }}- - - name: Set up Docker - uses: docker/setup-buildx-action@v2 - # Install Aqua - name: Install Aqua on Linux/macOS - if: runner.os == 'Linux' || runner.os == 'macOS' uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1 with: aqua_version: v2.28.0 - - name: Install Aqua on Windows - if: runner.os == 'Windows' - run: | - Invoke-WebRequest -Uri "https://github.com/aquaproj/aqua/releases/download/v2.28.0/aqua_windows_amd64.zip" -OutFile "aqua.zip" - Expand-Archive -Path "aqua.zip" -DestinationPath "$env:GITHUB_WORKSPACE/bin" - Remove-Item -Path "aqua.zip" - $env:Path += ";$env:GITHUB_WORKSPACE/bin" - shell: powershell - - name: Set aqua path on Linux/macOS - if: runner.os == 'Linux' || runner.os == 'macOS' run: | echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH - - name: Set aqua path on Windows - if: runner.os == 'Windows' - run: | - $aquaPath = "${env:GITHUB_WORKSPACE}\bin" - [System.Environment]::SetEnvironmentVariable('Path', $env:Path + ';' + $aquaPath, [System.EnvironmentVariableTarget]::Process) - shell: powershell - # Install tools - name: Install tools run: | @@ -93,7 +66,6 @@ jobs: # Windsor Up - name: Windsor Up on Linux/macOS - if: runner.os == 'Linux' || runner.os == 'macOS' run: | # Set WINDSOR_PROJECT_ROOT export WINDSOR_PROJECT_ROOT="${{ github.workspace }}" @@ -105,24 +77,8 @@ jobs: windsor context get windsor up --install --verbose - - name: Windsor Up on Windows - if: runner.os == 'Windows' - run: | - # Set WINDSOR_PROJECT_ROOT - $env:WINDSOR_PROJECT_ROOT="${{ github.workspace }}" - - # Windsor Init - windsor init local - - # Windsor Up - windsor context get - windsor up --install --verbose - - shell: powershell - # Windsor Down - name: Windsor Down on Linux/macOS - if: always() && (runner.os == 'Linux' || runner.os == 'macOS') run: | # Set WINDSOR_PROJECT_ROOT export WINDSOR_PROJECT_ROOT="${{ github.workspace }}" @@ -130,19 +86,8 @@ jobs: # Windsor Down windsor down --clean - - name: Windsor Down on Windows - if: always() && (runner.os == 'Windows') - run: | - # Set WINDSOR_PROJECT_ROOT - $env:WINDSOR_PROJECT_ROOT="${{ github.workspace }}" - - # Windsor Down - windsor down --clean - shell: powershell - # Docker Clean - name: Docker Clean on Linux/macOS - if: always() && (runner.os == 'Linux' || runner.os == 'macOS') run: | # Check for running containers and remove them containers=$(docker ps -aq) @@ -161,30 +106,8 @@ jobs: docker system prune -a -f - - name: Docker Clean on Windows - if: always() && runner.os == 'Windows' - run: | - # Check for running containers and remove them - $containers = docker ps -aq - if ($containers) { - Write-Output "Removing containers..." - docker rm -f $containers - } else { - Write-Output "No containers to remove." - } - - # Prune system, volumes, and networks - Write-Output "Pruning Docker system, volumes, and networks..." - docker system prune -a -f - docker volume prune -f - docker network prune -f - docker system prune -a -f - - shell: powershell - # Windsor Clean - name: Windsor Clean on Linux/macOS - if: always() && (runner.os == 'Linux' || runner.os == 'macOS') run: | if [ "$GITHUB_WORKSPACE" == "/" ]; then echo "Error: GITHUB_WORKSPACE is the root folder. Aborting cleanup." @@ -204,37 +127,13 @@ jobs: rm -rf ./.editorconfig rm -rf ./LICENSE - - name: Windsor Clean on Windows - if: always() && runner.os == 'Windows' - run: | - if ($env:GITHUB_WORKSPACE -eq "C:\") { - Write-Error "Error: GITHUB_WORKSPACE is the root folder. Aborting cleanup." - exit 1 - } - - if (-Not (Test-Path -Path $env:GITHUB_WORKSPACE -PathType Container)) { - Write-Error "Error: GITHUB_WORKSPACE is not a directory. Aborting cleanup." - exit 1 - } - - Get-ChildItem -Path "$env:GITHUB_WORKSPACE" -Recurse | ForEach-Object { - try { - Remove-Item -Recurse -Force $_.FullName - } catch { - Write-Warning "Warning: Could not delete $_.FullName because it is in use." - } - } - shell: powershell - # Remove Tools - name: Remove tools - if: always() && (runner.os == 'Linux' || runner.os == 'macOS') run: | aqua rm --all 2>&1 # Check if any files still exist in the workspace and report them if found (Linux/macOS) - name: Check for remaining files on Linux/macOS - if: always() && (runner.os == 'Linux' || runner.os == 'macOS') run: | remainingFiles=$(find . -maxdepth 1 -type f) if [ -n "$remainingFiles" ]; then @@ -242,15 +141,3 @@ jobs: echo "$remainingFiles" exit 1 fi - - # Check if any files still exist in the workspace and report them if found (Windows) - - name: Check for remaining files on Windows - if: always() && runner.os == 'Windows' - run: | - $remainingFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse - if ($remainingFiles) { - Write-Output "Error: Found files in the workspace that should be removed:" - $remainingFiles | ForEach-Object { Write-Output $_.FullName } - exit 1 - } - shell: powershell From 6ba6293293b84a2acb2745339f4c37ec63d3d6d6 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:39:22 -0500 Subject: [PATCH 10/14] readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 577df64d..b9680fd1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # core Core configurations used as the basis for most blueprints + +![CI Workflow](https://github.com/your-repo/core/actions/workflows/ci.yaml/badge.svg) From c08d4edc45dcdf22016c2cd1717d870ddb5bbb35 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:39:47 -0500 Subject: [PATCH 11/14] readme --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b8292d3d..df9c15b2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - windsor-up-test pull_request: branches: - main From f0da767375b26691e0370b2c8b41263240a84cca Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 15:44:44 -0500 Subject: [PATCH 12/14] readme --- .github/workflows/ci.yaml | 60 ++------------------------------------- 1 file changed, 2 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index df9c15b2..80c375c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,7 +34,7 @@ jobs: run: mkdir -p .docker-cache - name: Cache .docker-cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1 with: path: .docker-cache key: docker-cache-${{ runner.os }}-${{ github.sha }} @@ -44,7 +44,7 @@ jobs: - name: Install Aqua on Linux/macOS uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1 with: - aqua_version: v2.28.0 + aqua_version: v2.44.1 - name: Set aqua path on Linux/macOS run: | @@ -84,59 +84,3 @@ jobs: # Windsor Down windsor down --clean - - # Docker Clean - - name: Docker Clean on Linux/macOS - run: | - # Check for running containers and remove them - containers=$(docker ps -aq) - if [ -n "$containers" ]; then - echo "Removing containers..." - docker rm -f "$containers" - else - echo "No containers to remove." - fi - - # Prune system, volumes, and networks - echo "Pruning Docker system, volumes, and networks..." - docker system prune -a -f - docker volume prune -f - docker network prune -f - docker system prune -a -f - - - # Windsor Clean - - name: Windsor Clean on Linux/macOS - run: | - if [ "$GITHUB_WORKSPACE" == "/" ]; then - echo "Error: GITHUB_WORKSPACE is the root folder. Aborting cleanup." - exit 1 - fi - - if [ ! -d "$GITHUB_WORKSPACE" ]; then - echo "Error: GITHUB_WORKSPACE is not a directory. Aborting cleanup." - exit 1 - fi - sudo rm -rf $GITHUB_WORKSPACE/.windsor - sudo rm -rf $GITHUB_WORKSPACE/*.* - sudo rm -rf $GITHUB_WORKSPACE/terraform - sudo rm -rf $GITHUB_WORKSPACE/kustomize - rm -rf ./.yamllint - rm -rf ./.gitignore - rm -rf ./.editorconfig - rm -rf ./LICENSE - - # Remove Tools - - name: Remove tools - run: | - aqua rm --all 2>&1 - - # Check if any files still exist in the workspace and report them if found (Linux/macOS) - - name: Check for remaining files on Linux/macOS - run: | - remainingFiles=$(find . -maxdepth 1 -type f) - if [ -n "$remainingFiles" ]; then - echo "Error: Found files in the workspace that should be removed:" - echo "$remainingFiles" - exit 1 - fi From a1c4a5b42d9707bcb649a37084c9814cfd75b525 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 17:07:50 -0500 Subject: [PATCH 13/14] readme --- .github/workflows/ci.yaml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 80c375c2..e0b557a6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,9 @@ on: branches: - main +env: + WINDSOR_PROJECT_ROOT: ${{ github.workspace }} + jobs: # Blueprint Checks checks: @@ -24,7 +27,7 @@ jobs: TALOSCONFIG: ${{ github.workspace }}/contexts/local/.talos/config PRIVATE_DOMAIN_NAME: private.test DNS_SERVER_IP: "10.5.255.200" - windsorcli_version: "v0.5.1" + WINDSORCLI_VERSION: "v0.5.1" steps: - name: Checkout code @@ -59,28 +62,18 @@ jobs: - name: Install Windsor CLI uses: windsorcli/action/.github/actions/windsorcli@078842a08b468bd2278563bbc929e9d968095988 # v0.2.0 with: - version: ${{ env.windsorcli_version }} + version: ${{ env.WINDSORCLI_VERSION }} install_folder: ${{ github.workspace }}/bin context: local # Windsor Up - name: Windsor Up on Linux/macOS run: | - # Set WINDSOR_PROJECT_ROOT - export WINDSOR_PROJECT_ROOT="${{ github.workspace }}" - - # Windsor Init windsor init local - # Windsor Up - windsor context get windsor up --install --verbose # Windsor Down - name: Windsor Down on Linux/macOS run: | - # Set WINDSOR_PROJECT_ROOT - export WINDSOR_PROJECT_ROOT="${{ github.workspace }}" - - # Windsor Down windsor down --clean From 005422814415953de35c7f504132a554b8377dd0 Mon Sep 17 00:00:00 2001 From: Todd VanGundy Date: Sun, 23 Feb 2025 17:17:44 -0500 Subject: [PATCH 14/14] update renovate --- .github/renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json b/.github/renovate.json index 3badb144..2d6a1a17 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -68,7 +68,7 @@ "^\\.github/workflows/ci\\.yaml$" ], "matchStrings": [ - "(^|\\s)windsorcli_version:\\s*(?v[\\d\\.]+)" + "(^|\\s)WINDSORCLI_VERSION:\\s*(?v[\\d\\.]+)" ], "depNameTemplate": "version", "datasourceTemplate": "github-tags",