Skip to content

Commit c511241

Browse files
mclasmeierMoritz Clasmeier
andauthored
Install roxie in test images (#244)
Co-authored-by: Moritz Clasmeier <mclasmeier@redhat.com>
1 parent b8d3dca commit c511241

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/actions/build-and-push-image/build-and-push-image.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ set -euo pipefail
55
build_and_push_image() {
66
local image_flavor="$1"
77

8-
docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io
8+
# For retrieving private images from quay.io/rhacs-eng (roxie).
9+
docker login -u "$QUAY_RHACS_ENG_RW_USERNAME" --password-stdin <<<"$QUAY_RHACS_ENG_RW_PASSWORD" quay.io
910

1011
TAG="$(scripts/get_tag.sh "${image_flavor}")"
1112
IMAGE="quay.io/stackrox-io/apollo-ci:${TAG}"
1213

1314
make "${image_flavor}-image"
1415

16+
# For pushing to quay.io/stackrox-io/apollo-ci.
17+
docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io
18+
1519
retry 5 true docker push "${IMAGE}"
1620

1721
echo "image-tag=${IMAGE}" >> "${GITHUB_OUTPUT}"

.github/workflows/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
env:
1313
QUAY_STACKROX_IO_RW_USERNAME: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}
1414
QUAY_STACKROX_IO_RW_PASSWORD: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}
15+
QUAY_RHACS_ENG_RW_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}
16+
QUAY_RHACS_ENG_RW_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}
1517

1618
jobs:
1719

images/stackrox-test.Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# binaries and images. Builds upon stackrox-build.Dockerfile.
33

44
ARG BASE_TAG
5+
ARG ROXIE_VERSION=0.1.2
6+
ARG ROXIE_CHECKSUM=sha256:808acf790369f3cb5744c5c03a4f97e2c57e8e752ae2bce952515bed3fdfd00d
7+
FROM quay.io/rhacs-eng/roxie:v${ROXIE_VERSION}@${ROXIE_CHECKSUM} AS roxie-installer
8+
59
FROM quay.io/stackrox-io/apollo-ci:${BASE_TAG} as base
610

711
# This line makes sure that piped commands in RUN instructions exit early.
@@ -45,7 +49,6 @@ RUN dnf update -y \
4549
xz \
4650
zip \
4751
&& dnf remove -y java-1.8.0-openjdk-headless \
48-
&& dnf --disablerepo="*" --enablerepo="pgdg13" install -y postgresql13 postgresql13-server postgresql13-contrib \
4952
&& dnf --disablerepo="*" --enablerepo="pgdg14" install -y postgresql14 postgresql14-server postgresql14-contrib \
5053
&& dnf --disablerepo="*" --enablerepo="pgdg15" install -y postgresql15 postgresql15-server postgresql15-contrib \
5154
&& dnf clean all \
@@ -161,6 +164,9 @@ RUN set -ex \
161164
&& pip3 install pycodestyle=="${PYCODESTYLE_VERSION}" \
162165
pylint=="${PYLINT_VERSION}"
163166

167+
# Install roxie.
168+
COPY --from=roxie-installer /usr/local/bin/roxie /usr/bin/roxie
169+
164170
RUN \
165171
mv /bin/bash /bin/real-bash && \
166172
mv /bin/bash-wrapper /bin/bash

images/stackrox-ui-test.Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Provides the tooling required run UI tests against the StackRox images.
22

3+
ARG ROXIE_VERSION=0.1.2
4+
ARG ROXIE_CHECKSUM=sha256:808acf790369f3cb5744c5c03a4f97e2c57e8e752ae2bce952515bed3fdfd00d
5+
FROM quay.io/rhacs-eng/roxie:v${ROXIE_VERSION}@${ROXIE_CHECKSUM} AS roxie-installer
6+
37
FROM quay.io/centos/centos:stream9
48

59
# This line makes sure that piped commands in RUN instructions exit early.
@@ -212,6 +216,9 @@ RUN set -ex \
212216
&& pip3 install pycodestyle=="${PYCODESTYLE_VERSION}" \
213217
pylint=="${PYLINT_VERSION}"
214218

219+
# Install roxie.
220+
COPY --from=roxie-installer /usr/local/bin/roxie /usr/bin/roxie
221+
215222
RUN \
216223
mv /bin/bash /bin/real-bash && \
217224
mv /bin/bash-wrapper /bin/bash

0 commit comments

Comments
 (0)