Skip to content

Add CI that runs this repository through a CodePipeline - #3

Merged
HarshCasper merged 2 commits into
mainfrom
ci/run-source-through-pipeline
Oct 14, 2026
Merged

HarshCasper merged 2 commits into
mainfrom
ci/run-source-through-pipeline

Conversation

@HarshCasper

@HarshCasper HarshCasper commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The repo had no CI. It is the source fixture for LocalStack's CodePipeline tests (localstack-pro test_codepipeline.py pulls main), so this PR adds no sample code and leaves the fixture files untouched.

  • New test.sh builds a LocalStack CodePipeline with this repository as its source:
    • Source: CodeStarSourceConnection on $REPOSITORY at $BRANCH
    • Build: CodeBuild with the repo's own buildspec.yml, so the Maven build and the JUnit tests run in CodeBuild
    • Deploy: CloudFormation CREATE_UPDATE on SourceCode::cfn_stack.yaml with a QueueName override
  • The pipeline sets pipelineType: V1. Without it, LocalStack created a V2 pipeline, logged Emulation support for V2 type pipelines is not available, and never started an execution. The test now fails after 120s if no execution starts.
  • It checks:
    • the pipeline execution succeeds
    • the source action fetched the expected commit (the PR head in CI)
    • the build artifact holds target/messageUtil-1.0.jar, and javap shows MessageUtil with both methods
    • the stack is CREATE_COMPLETE, and its QueueURL output matches the queue
  • New workflow, with read-only permissions:
    • pre-pulls the CodeBuild images with retries, because of the CodeBuild image pull race (AWS-2171)
    • passes GITHUB_TOKEN as LOCALSTACK_CODEPIPELINE_GH_TOKEN
    • runs test.sh against the PR branch
    • skips PRs from forks, since the pipeline can only fetch branches in this repository
  • README gets a Testing section.

Not covered: the ECS blue/green deployment (appspec.yml, Dockerfile).

Verified by CI.

https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM

test.sh builds the repository with its own buildspec.yml in a LocalStack CodePipeline and deploys cfn_stack.yaml with the CloudFormation action, then checks the jar and the queue.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
Without pipelineType, LocalStack created the pipeline as V2, logged that V2 emulation is not available and never started an execution, so the test waited 20 minutes on status None.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
@HarshCasper
HarshCasper merged commit 8add965 into main Oct 14, 2026
1 check passed
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