Skip to content

Commit 5922ceb

Browse files
committed
hack/build-go.sh: Compress the openshift-tests-extension
Compress the openshift-tests-extension binary. Use `--force` to overwrite the output file if already present to speed up local development. Use `--keep` to keep the original binary after compressing it so that a developer may use it. Compressing because [1]: > Statically linked binaries are prohibited in FIPS and will > cause failures if detected by product pipeline scans. To > avoid this, extension binaries should be gzipped before > being committed to container images. Such a compressed binary can be then extracted as per [1]: > After discovering a test extension binary, the origin test framework will > extract the binary from the container image which carries it and store it > in /tmp storage of the pod in which it is running. > > If the binary-path ends in .gz, the binary will be decompressed. [1]: https://github.com/openshift/enhancements/blob/c2c0d43e3cd70cf79bc2b101ceb6a03c5e0114a8/enhancements/testing/openshift-tests-extension.md
1 parent eba844b commit 5922ceb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hack/build-go.sh

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ ${GOFLAGS} \
3737
-o "${BIN_PATH}/openshift-tests-extension" \
3838
"${REPO}/cmd/openshift-tests-extension/..."
3939

40+
echo "Compressing the openshift-tests-extension binary"
41+
gzip --keep --force "${BIN_PATH}/openshift-tests-extension"
42+
4043
# Build the cluster-version-operator binary
4144
GLDFLAGS+="-X ${REPO}/pkg/version.Raw=${VERSION_OVERRIDE}"
4245
echo "Building ${REPO} cluster-version-operator binary (${VERSION_OVERRIDE})"

0 commit comments

Comments
 (0)