Skip to content

Commit 2135c54

Browse files
jlebonruncom
authored andcommitted
redhat-ci: build and test in a fedora container
The upstream tests are being run on Debian rather than distro-specific containers because there is no golang compiler on AH to compile gen_dockerfile.go. We should consider porting it to e.g. python in the future, but for now, we can work around this by building the Dockerfile in a container.
1 parent 44dbc0d commit 2135c54

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.redhat-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ host:
44
ram: 4096
55

66
tests:
7-
- make test
7+
- docker run --rm --privileged -v $PWD:/code --workdir /code fedora:25
8+
sh -c 'dnf install -y golang && (go run ./distros/gen_dockerfile.go > f)'
9+
- make test DOCKERFILE=$(cat f)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell d
55

66
# get OS/Arch of docker engine
77
DOCKER_OSARCH := $(shell bash -c 'source hack/make/.detect-daemon-osarch && echo $${DOCKER_ENGINE_OSARCH:-$$DOCKER_CLIENT_OSARCH}')
8-
DOCKERFILE := $(shell go run ./distros/gen_dockerfile.go)
8+
DOCKERFILE ?= $(shell go run ./distros/gen_dockerfile.go)
99

1010
# env vars passed through directly to Docker's build scripts
1111
# to allow things like `make KEEPBUNDLE=1 binary` easily

0 commit comments

Comments
 (0)