Skip to content

Add action to test kustomize config validity - #419

Merged
ACLay merged 10 commits into
mainfrom
408_test_kustomize_config_validity
Aug 26, 2026
Merged

Add action to test kustomize config validity#419
ACLay merged 10 commits into
mainfrom
408_test_kustomize_config_validity

Conversation

@ACLay

@ACLayACLay commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Refs #408

Mirror's the config repo's jenkins job to dry-run apply our kubernetes config and catch any syntax errors before they make it into the main branch. I've set the kubeconfigs up as repo secrets for now. Will look at moving them to organisation ones once I'm confident everything's set up properly.

Examples of failed and successful runs can be seen in the last few commits, after I worked out the bugs in the action.

@ACLay
ACLay marked this pull request as ready for review August 25, 2026 15:13
@ACLay
ACLay requested review from a team as code ownersAugust 25, 2026 15:13
Comment on lines +34 to +37
if [ "$?" -ne "0" ]; then
echo "Verification error in $devOverlay"
! break
fi

@ACLayACLayAug 26, 2026

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

There seems to be some variability in how shells handle errors in loops. Locally, this if statement was needed to catch the non-zero exit code from a failed kubectl apply ... and force the loop to exit with an error, but the action itself just exits on the failed kubectl apply .... Keeping this check here means the code can still be used locally, and we're covered incase the action's environment changes.

@ACLay
ACLay merged commit dafddd2 into mainAug 26, 2026
1 check passed
@ACLay
ACLay deleted the 408_test_kustomize_config_validity branch August 26, 2026 13:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ACLay@William-Edwards-STFC@deepaksftc