diff --git a/.github/workflows/components.yaml b/.github/workflows/components.yaml index 7785b5d1b6..fe86ae9578 100644 --- a/.github/workflows/components.yaml +++ b/.github/workflows/components.yaml @@ -23,6 +23,8 @@ jobs: # component: [ocmcli, helminstaller, helmdemo, subchartsdemo, ecrplugin] runs-on: large_runner steps: + - name: Self Hosted Runner Post Job Cleanup Action + uses: TooMuch4U/actions-clean@v2.2 - name: Checkout uses: actions/checkout@v4 - name: Setup Go @@ -54,24 +56,26 @@ jobs: run: | cd components/${{ matrix.component }} PATH=$PATH:$(go env GOPATH)/bin CTF_TYPE=${{ env.CTF_TYPE }} make ctf descriptor describe - - name: Upload CTF on main + - name: Upload CTF uses: actions/upload-artifact@v4 with: compression-level: '0' # we already compress ourselves if-no-files-found: error overwrite: true retention-days: 1 - name: ctf-${{ matrix.component }} + name: ctf-component-${{ matrix.component }} path: gen/${{ matrix.component }}/ctf aggregate: name: "Aggregate Build Artifacts" - runs-on: ubuntu-latest + runs-on: large_runner needs: build env: components: ocmcli # components: ocmcli helminstaller helmdemo subchartsdemo ecrplugin steps: + - name: Self Hosted Runner Post Job Cleanup Action + uses: TooMuch4U/actions-clean@v2.2 - name: Checkout uses: actions/checkout@v4 - name: Setup Go @@ -102,14 +106,15 @@ jobs: - name: Download CTFs uses: actions/download-artifact@v4 with: - pattern: 'ctf-*' + pattern: 'ctf-component-*' path: gen/downloaded-ctfs - name: Move CTFs into correct directory for aggregation run: | IFS=" " read -a COMPONENTS <<< ${{ env.components }} for i in "${COMPONENTS[@]}"; do mkdir -p ${{ github.workspace }}/gen/${i} - mv ${{ github.workspace }}/gen/downloaded-ctfs/ctf-${i} ${{ github.workspace }}/gen/${i}/ctf + unzip ${{ github.workspace }}/gen/downloaded-ctfs/ctf-component-${i} ctf ${{ github.workspace }}/gen/${i} + ls -R ${{ github.workspace }}/gen/${i} done - name: Create aggregated CTF run: | @@ -129,4 +134,4 @@ jobs: uses: geekyeggo/delete-artifact@v5 with: name: | - ctf-* \ No newline at end of file + ctf-component-* \ No newline at end of file diff --git a/Makefile b/Makefile index e33fb4c075..01e3e18afd 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen PLATFORMS = windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 CREDS ?= -OCM := go run $(REPO_ROOT)/cmds/ocm $(CREDS) +OCM := bin/ocm $(CREDS) CTF_TYPE ?= directory GEN := $(REPO_ROOT)/gen @@ -165,7 +165,7 @@ $(GEN)/.comps: $(GEN)/.exists .PHONY: ctf ctf: $(GEN)/ctf -$(GEN)/ctf: $(GEN)/.exists $(GEN)/.comps +$(GEN)/ctf: $(GEN)/.exists $(GEN)/.comps bin/ocm @rm -rf "$(GEN)"/ctf @for i in $(COMPONENTS); do \ echo "transfering component $$i..."; \ @@ -177,16 +177,16 @@ $(GEN)/ctf: $(GEN)/.exists $(GEN)/.comps .PHONY: push push: $(GEN)/ctf $(GEN)/.push.$(NAME) -$(GEN)/.push.$(NAME): $(GEN)/ctf +$(GEN)/.push.$(NAME): $(GEN)/ctf bin/ocm $(OCM) transfer ctf -f $(GEN)/ctf $(OCMREPO) @touch $@ .PHONY: plain-push -plain-push: $(GEN) +plain-push: $(GEN) bin/ocm $(OCM) transfer ctf -f $(GEN)/ctf $(OCMREPO) .PHONY: plain-ctf -plain-ctf: $(GEN) +plain-ctf: $(GEN) bin/ocm @rm -rf "$(GEN)"/ctf @for i in $(COMPONENTS); do \ echo "transfering component $$i..."; \