Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/actions/build-and-push-image/build-and-push-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ set -euo pipefail
build_and_push_image() {
local image_flavor="$1"

docker login -u "$QUAY_RHACS_ENG_RW_USERNAME" --password-stdin <<<"$QUAY_RHACS_ENG_RW_PASSWORD" quay.io
docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io

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

make "${image_flavor}-image"

retry 5 true docker push "${IMAGE}"

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

# TODO: move all usages of apollo-ci images to quay.io/rhacs-eng/apollo-ci or quay.io/stackrox-io/apollo-ci.
docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io
docker tag "${IMAGE}" "quay.io/stackrox-io/apollo-ci:${TAG}"

retry 5 true docker push "quay.io/stackrox-io/apollo-ci:${TAG}"
}

# retry() - retry a command up to a specific numer of times until it exits
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
tags:
- "*"
env:
QUAY_RHACS_ENG_RW_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}
QUAY_RHACS_ENG_RW_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}
QUAY_STACKROX_IO_RW_USERNAME: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}
QUAY_STACKROX_IO_RW_PASSWORD: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}

Expand Down Expand Up @@ -91,7 +89,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Test cci-export in a context similar to how it is used in CI
run: |
docker login -u "$QUAY_RHACS_ENG_RW_USERNAME" --password-stdin <<<"$QUAY_RHACS_ENG_RW_PASSWORD" quay.io
docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io
make test-cci-export

comment-build-images:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ifeq ($(DOCKER),)
DOCKER=docker
endif
QUAY_REPO=rhacs-eng
QUAY_REPO=stackrox-io

STACKROX_BUILD_TAG=$(shell scripts/get_tag.sh "stackrox-build")

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,4 @@ To bump the Go version across all Docker images in this repository, use the auto

- Clean git working tree (no uncommitted changes)
- Push access to the repository
- (Optional) [GitHub CLI](https://cli.github.com/) for automatic PR creation

If GitHub CLI is not installed, the script will provide a link to manually create the PR.
- [GitHub CLI](https://cli.github.com/) installed and authenticated
2 changes: 1 addition & 1 deletion images/scanner-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# binaries and images. Builds upon scanner-build.Dockerfile.

ARG BASE_TAG
FROM quay.io/rhacs-eng/apollo-ci:${BASE_TAG} as base
FROM quay.io/stackrox-io/apollo-ci:${BASE_TAG} as base

# This line makes sure that piped commands in RUN instructions exit early.
# This should not affect use in CircleCI because Circle doesn't use
Expand Down
2 changes: 1 addition & 1 deletion images/stackrox-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# binaries and images. Builds upon stackrox-build.Dockerfile.

ARG BASE_TAG
FROM quay.io/rhacs-eng/apollo-ci:${BASE_TAG} as base
FROM quay.io/stackrox-io/apollo-ci:${BASE_TAG} as base

# This line makes sure that piped commands in RUN instructions exit early.
# This should not affect use in CircleCI because Circle doesn't use
Expand Down
2 changes: 1 addition & 1 deletion images/test.cci-export.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BASE_TAG
FROM quay.io/rhacs-eng/apollo-ci:${BASE_TAG}
FROM quay.io/stackrox-io/apollo-ci:${BASE_TAG}

COPY test/ .
ENV CI=true
Expand Down
4 changes: 2 additions & 2 deletions images/test/bats/cci-export.bats
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ setup() {
}

@test "cci-export should escape special characters in values" {
run cci-export FOO 'quay.io/rhacs-"eng"/super $canner:2.21.0-15-{{g44}(8f)2dc8fa}'
run cci-export FOO 'quay.io/stackrox-"io"/super $canner:2.21.0-15-{{g44}(8f)2dc8fa}'
assert_success
run foo_printer
assert_output 'FOO: quay.io/rhacs-"eng"/super $canner:2.21.0-15-{{g44}(8f)2dc8fa}'
assert_output 'FOO: quay.io/stackrox-"io"/super $canner:2.21.0-15-{{g44}(8f)2dc8fa}'
refute_output "FOO: "
}

Expand Down
Loading