diff --git a/.github/workflows/build-oci.yaml b/.github/workflows/build-oci.yaml index 16c3fcd..6b0a036 100644 --- a/.github/workflows/build-oci.yaml +++ b/.github/workflows/build-oci.yaml @@ -9,8 +9,8 @@ on: branches: [ main ] jobs: - build-oci: - name: build-oci + snc-runner-oci: + name: snc-runner-oci runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -20,10 +20,10 @@ jobs: if: ${{ github.event_name == 'pull_request' }} shell: bash run: | - SNC_RUNNER=ghcr.io/crc-org/ci-definitions SNC_RUNNER_V=pr-${{ github.event.number }} make oci-build + SNC_RUNNER=ghcr.io/crc-org/ci-definitions SNC_RUNNER_V=pr-${{ github.event.number }} make build-snc-runner-oci - build-multiarch-oci: - name: build-multiarch-oci + build-crc-builder-oci: + name: build-crc-builder-oci runs-on: ubuntu-24.04 steps: - name: Checkout code diff --git a/Makefile b/Makefile index b9c4c15..4095c59 100644 --- a/Makefile +++ b/Makefile @@ -7,43 +7,47 @@ include tools/tools.mk # Registries and versions SNC_RUNNER ?= $(shell sed -n 1p snc-runner/release-info) SNC_RUNNER_V ?= $(shell sed -n 2p snc-runner/release-info) -# CRC_BUILDER ?= $(shell sed -n 1p crc-builder/release-info) -# CRC_BUILDER_V ?= $(shell sed -n 2p crc-builder/release-info) +CRC_BUILDER ?= $(shell sed -n 1p crc-builder/release-info) +CRC_BUILDER_V ?= $(shell sed -n 2p crc-builder/release-info) -.PHONY: oci-build build-crc-builder-oci oci-push tkn-create tkn-push +.PHONY: build-snc-runner-oci build-crc-builder-oci ## Functions -define oci_builder - ${CONTAINER_MANAGER} build -t $(1):$(2) -f $(3)/oci/$(4) $(3)/oci -endef -oci_pusher = ${CONTAINER_MANAGER} push $(1):$(2) +# define oci_builder +# ${CONTAINER_MANAGER} build -t $(1):$(2) -f $(3)/oci/$(4) $(3)/oci +# endef +# oci_pusher = ${CONTAINER_MANAGER} push $(1):$(2) tkn_creator = sed -e 's%cimage%$(1)%g' -e 's%cversion%$(2)%g' $(3)/tkn/tpl/task.tpl.yaml > $(3)/tkn/task.yaml tkn_pusher = $(TOOLS_BINDIR)/tkn bundle push $(1):$(2)-tkn -f $(3)/tkn/task.yaml -oci-build: -# snc-runner - $(call oci_builder,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner,Containerfile) +build-snc-runner-oci: +CONTEXT=snc-runner/oci +MANIFEST=$(SNC_RUNNER):$(SNC_RUNNER_V) +build-snc-runner-oci: + ${CONTAINER_MANAGER} build -t $(MANIFEST) -f $(CONTEXT)/Containerfile $(CONTEXT) build-crc-builder-oci: +# ifndef CRC_BUILDER +# CRC_BUILDER=$(shell sed -n 1p crc-builder/release-info) +# endif +# ifndef CRC_BUILDER_V +# CRC_BUILDER_V=v$(shell sed -n 2p crc-builder/release-info) +# endif CONTEXT=crc-builder/oci MANIFEST=$(CRC_BUILDER):$(CRC_BUILDER_V) -ifndef CRC_BUILDER -CRC_BUILDER=$(shell sed -n 1p crc-builder/release-info) -endif -ifndef CRC_BUILDER_V -CRC_BUILDER_V=v$(shell sed -n 2p crc-builder/release-info) -endif build-crc-builder-oci: ${CONTAINER_MANAGER} manifest create $(MANIFEST)-linux ${CONTAINER_MANAGER} build --platform linux/arm64 --build-arg=TARGETARCH=arm64 --manifest $(MANIFEST)-linux -f $(CONTEXT)/Containerfile.linux $(CONTEXT) ${CONTAINER_MANAGER} build --platform linux/amd64 --build-arg=TARGETARCH=amd64 --manifest $(MANIFEST)-linux -f $(CONTEXT)/Containerfile.linux $(CONTEXT) + ${CONTAINER_MANAGER} build -t $(MANIFEST)-windows -f $(CONTEXT)/Containerfile.non-linux --build-arg=OS=windows $(CONTEXT) + ${CONTAINER_MANAGER} build -t $(MANIFEST)-darwin -f $(CONTEXT)/Containerfile.non-linux --build-arg=OS=darwin $(CONTEXT) -oci-push: - $(call oci_pusher,$(SNC_RUNNER),$(SNC_RUNNER_V)) - $(call oci_pusher,$(CRC_BUILDER),$(CRC_BUILDER_V)-linux) +# oci-push: +# $(call oci_pusher,$(SNC_RUNNER),$(SNC_RUNNER_V)) +# $(call oci_pusher,$(CRC_BUILDER),$(CRC_BUILDER_V)-linux) -tkn-create: - $(call tkn_creator,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner) +# tkn-create: +# $(call tkn_creator,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner) -tkn-push: install-out-of-tree-tools - $(call tkn_pusher,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner) +# tkn-push: install-out-of-tree-tools +# $(call tkn_pusher,$(SNC_RUNNER),$(SNC_RUNNER_V),snc-runner)