Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.1.0: release: use preflight tool for RedHat images #80927

Merged
merged 1 commit into from
May 3, 2022
Merged
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
21 changes: 21 additions & 0 deletions build/release/teamcity-publish-redhat-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fi
# Hard coded release number used only by the RedHat images
rhel_release=1
rhel_registry="scan.connect.redhat.com"
rhel_project_id=5e61ea74fe2231a0c2860382
rhel_repository="${rhel_registry}/p194808216984433e18e6e90dd859cb1ea7c738ec50/cockroach"
dockerhub_repository="cockroachdb/cockroach"

Expand Down Expand Up @@ -63,3 +64,23 @@ tc_end_block "Rebuild docker image"
tc_start_block "Push RedHat docker image"
retry docker push "${rhel_repository}:${build_name}"
tc_end_block "Push RedHat docker image"

tc_start_block "Run preflight"
mkdir -p artifacts
docker run \
-it \
--rm \
--security-opt=label=disable \
--env PFLT_LOGLEVEL=trace \
--env PFLT_ARTIFACTS=/artifacts \
--env PFLT_LOGFILE=/artifacts/preflight.log \
--env PFLT_CERTIFICATION_PROJECT_ID="$rhel_project_id" \
--env PFLT_PYXIS_API_TOKEN="$REDHAT_API_TOKEN" \
--env PFLT_DOCKERCONFIG=/temp-authfile.json \
--env DOCKER_CONFIG=/tmp/docker \
-v $PWD/artifacts:/artifacts \
-v ~/.docker/config.json:/temp-authfile.json:ro \
-v ~/.docker/config.json:/tmp/docker/config.json:ro \
quay.io/opdev/preflight:1.1.0 check container \
"${rhel_repository}:${build_name}" --submit
tc_end_block "Run preflight"