Skip to content

Extract inline scripts into ConfigMaps for linting and formatting - #22

Merged
lslavkov merged 3 commits into
opdev:mainfrom
lslavkov:linting-formatting-scripts
Jul 29, 2026
Merged

Extract inline scripts into ConfigMaps for linting and formatting#22
lslavkov merged 3 commits into
opdev:mainfrom
lslavkov:linting-formatting-scripts

Conversation

@lslavkov

@lslavkov lslavkov commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extract all inlined Tekton Task scripts into standalone files under rhacs/scripts/ (8 Python, 7 shell)
  • Replace per-task ConfigMaps (configmaps/scripts.yaml) with two shared ConfigMaps generated via Kustomize configMapGenerator:
    • rhacs-shell-scripts (defaultMode 0755) — install-ocm, install-roxctl, ocm-token, test-rox-api-token, create/delete-rox-api-token-secret, scan-image
    • rhacs-python-scripts — authenticate-central, configure-central, destroy-central, provision-central, wait-for-central-ready/delete, wait-for-scanner-init, json-to-csv
  • Convert Tekton variable substitutions inside scripts to environment variables (STEP_RESULT_PATH, TASK_RESULT_PATH)
  • Add rhacs/kustomization.yaml — deploy with kubectl apply -k rhacs/
  • Delete rhacs/configmaps/scripts.yaml (replaced by configMapGenerator)

Closes #18

Test plan

  • Run kubectl kustomize rhacs/ and verify all 13 resources render (2 RBAC, 2 ConfigMaps, 1 Pipeline, 7 Tasks)
  • Verify no script: fields remain in rendered Task output
  • Verify no raw Tekton expressions remain in script files
  • Run a PipelineRun end-to-end to confirm scripts execute correctly from ConfigMap mounts

🤖 Generated with Claude Code

@exe-prow-github-app
exe-prow-github-app Bot requested a review from mgoerens July 23, 2026 11:58
@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 23, 2026
Move all inlined Tekton Task scripts into standalone files under
rhacs/scripts/, mounted via two ConfigMaps (shell and python).
Replace Tekton variable substitutions inside scripts with environment
variables bridged through step env: entries. Add Kustomize
configMapGenerator to auto-create ConfigMaps from the script files.

Closes opdev#18

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lslavkov
lslavkov force-pushed the linting-formatting-scripts branch from cf705c0 to 7e2b2d3 Compare July 23, 2026 12:07
@lslavkov lslavkov self-assigned this Jul 23, 2026
lslavkov and others added 2 commits July 23, 2026 14:14
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lslavkov
lslavkov requested a review from yashoza19 July 23, 2026 13:13
@lslavkov lslavkov added documentation Improvements or additions to documentation kind/feature Categorizes issue or PR as related to a new feature. kind/documentation Categorizes issue or PR as related to documentation. labels Jul 23, 2026

@yashoza19 yashoza19 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lslavkov, yashoza19

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lslavkov
lslavkov merged commit 3b553ab into opdev:main Jul 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. documentation Improvements or additions to documentation kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable linting & formatting for scripts

2 participants