Skip to content

Commit

Permalink
Makefile: Copy the built rpms and binary from container to local file…
Browse files Browse the repository at this point in the history
…system

This PR will create a container from built image of test-rpmbuild
and then copy the RPMS directory and crc linux binary from container
to local filesystem.

This will help us to have those as part of CI artifact.
  • Loading branch information
praveenkumar committed Jan 10, 2023
1 parent eb70a43 commit 57906e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ release/
/release-info.json
*.crcbundle
tmp-embed/
RPMS/
crc
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ GENERATED_RPM_FILES=packaging/rpm/crc.spec images/rpmbuild/Containerfile
spec: $(GENERATED_RPM_FILES)

test-rpmbuild: spec
${CONTAINER_RUNTIME} build -f images/rpmbuild/Containerfile .
${CONTAINER_RUNTIME} build -t test-rpmbuild-img -f images/rpmbuild/Containerfile .
${CONTAINER_RUNTIME} create --name test-rpmbuild test-rpmbuild-img
${CONTAINER_RUNTIME} cp test-rpmbuild:/root/rpmbuild/RPMS/ .
${CONTAINER_RUNTIME} cp test-rpmbuild:/root/rpmbuild/BUILD/crc-$(CRC_VERSION)-$(OPENSHIFT_VERSION)/out/linux-amd64/crc .
${CONTAINER_RUNTIME} rm test-rpmbuild
${CONTAINER_RUNTIME} rmi test-rpmbuild-img

.PHONY: build_docs
build_docs:
Expand Down

0 comments on commit 57906e5

Please sign in to comment.