Skip to content

Remove cci-export and the bash-wrapper mechanism - #256

Open
davdhacs wants to merge 1 commit into
mainfrom
worktree-remove-cci-export
Open

Remove cci-export and the bash-wrapper mechanism#256
davdhacs wants to merge 1 commit into
mainfrom
worktree-remove-cci-export

Conversation

@davdhacs

@davdhacs davdhacs commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Remove cci-export and the entire bash-wrapper mechanism from the CI images.

Why

cci-export persisted environment variables across CircleCI steps by appending export lines to $BASH_ENV, which CircleCI sources before each step's shell. StackRox CI now runs on GitHub Actions and OpenShift CI / prow, where BASH_ENV is never sourced between steps — cross-step state travels via $GITHUB_ENV and $SHARED_DIR(prow) instead. The mechanism is dead weight.

It surfaced recently causing hundreds of noise warnings in our prow e2e logs: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_release/83406/rehearse-83406-pull-ci-stackrox-stackrox-master-ocp-4-12-compliance-e2e-tests/2088023413737132032#1:build-log.txt%3A1491

INFO[2026-08-14T01:18:26Z] /bin/real-bash: /etc/initial-bash.env: Permission denied
/bin/real-bash: /etc/initial-bash.env: Permission denied
/bin/real-bash: /etc/initial-bash.env: Permission denied
/bin/real-bash: /etc/initial-bash.env: Permission denied
INFO: Thu Aug 13 23:56:25 UTC 2026: BEGIN OpenShift CI mods

Consumer impact

Verified across stackrox/{stackrox,scanner,collector}, automation-flavors, and an org-wide code search (including release-4.9/release-4.10):

  • stackrox and scanner call cci-export behind a command -v cci-export guard and fall back to plain export (+ $GITHUB_ENV in stackrox's ci_export). This change degrades gracefully rather than breaking their CI.
  • collector and automation-flavors don't reference it at all; automation-flavors passes cluster info / kubeconfig via $SHARED_DIR, which is independent of cci-export.
  • Release branches pin older image tags, so they keep the existing behavior until they explicitly bump (and cci-export is not needed across 4.9,4.10,4.11 versions).

🤖 Generated with Claude Code

cci-export persisted environment variables across CircleCI steps by
writing to $BASH_ENV, which CircleCI sources before each step's shell.
StackRox CI runs on GitHub Actions and OpenShift CI/prow now, where
BASH_ENV is never sourced between steps -- cross-step state travels via
$GITHUB_ENV and $SHARED_DIR instead -- so the mechanism is dead weight.

Removed:
- static-contents/bin/bash-wrapper (the cci-export function and the
  /bin/bash -> /bin/real-bash swap that installed it)
- static-contents/etc/initial-bash.env (the BASH_ENV foundation)
- images/test.cci-export.Dockerfile and images/test/ (the bats tests)
- the ENV BASH_ENV declarations from the test/ui-test images
- the test-cci-export Makefile target and the corresponding CI job

Consumers (stackrox, scanner) call cci-export behind a
`command -v cci-export` guard and fall back to plain `export`, so this
change degrades gracefully rather than breaking their CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ec9a37a4-c6fa-4b63-99eb-a4cab7871d9d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Build Images

Image Flavor Image Tag
jenkins-plugin quay.io/stackrox-io/apollo-ci:jenkins-plugin-0.5.14-1-g9bed4c4911
scanner-build quay.io/stackrox-io/apollo-ci:scanner-build-0.5.14-1-g9bed4c4911
scanner-test quay.io/stackrox-io/apollo-ci:scanner-test-0.5.14-1-g9bed4c4911
stackrox-build quay.io/stackrox-io/apollo-ci:stackrox-build-0.5.14-1-g9bed4c4911
stackrox-test quay.io/stackrox-io/apollo-ci:stackrox-test-0.5.14-1-g9bed4c4911
stackrox-ui-test quay.io/stackrox-io/apollo-ci:stackrox-ui-test-0.5.14-1-g9bed4c4911

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant