Skip to content

CI improvements including drop of EOL's Node versions#1209

Closed
kbarnold wants to merge 6 commits intomasterfrom
CIimprovements
Closed

CI improvements including drop of EOL's Node versions#1209
kbarnold wants to merge 6 commits intomasterfrom
CIimprovements

Conversation

@kbarnold
Copy link
Copy Markdown
Collaborator

Before submitting a pull request, please ensure the following:

Description

  1. We drop unsupported Node versions <20
  2. Add building of Docker images to CI/PR jobs
  3. Make sure individual integration test runs do not influence each other by deploying to separate CF spaces

Checklist

  • Code compiles correctly
  • Relevant tests were added (unit / contract / integration)
  • Relevant logs were added
  • Formatting and linting run locally successfully
  • All tests pass
  • UA review
  • Design is documented
  • Extended the README / documentation, if necessary
  • Open source is approved

Node versions older than v20 are EOL and not supported anymore.
This drops their support within this project.
Until now, some issues only came up during the release process when
building Docker images. This resulted in releases in GitHub that were
not available as Docker images and thus burnt version numbers.
Every CI run — PR builds, master merges, and release tags — deployed to the
same CF space using hardcoded identifiers from
integration/testdata/mta_demo/mta.yaml. When two pipelines ran concurrently,
their cf undeploy mta_demo (in BeforeEach) and cf delete node/node-js
(in AfterEach) calls raced against each other — one run's cleanup tears
down the other run's deployment mid-flight.

The test job in .circleci/config.yml now:
- Creates a unique CF space mbt-ci-<CIRCLE_BUILD_NUM> before the tests run —
  every pipeline gets its own isolated space, so there is no shared state
  between concurrent runs
- Runs tests targeting that space via SPACE="$TEST_SPACE" passed to the test
  process
- Deletes the space afterwards with when: always, ensuring cleanup happens
  even if the tests fail — no orphaned spaces accumulate
No changes to test code or MTA descriptors were needed. The TECH_USER must
have the CF OrgManager or SpaceManager role to create/delete spaces in the
target org.
It might happen, e.g. when a job is cancelled, that a CF space created
as part of the integration tests is not cleaned up. To prevent this, we
add a cleanup job and a regular nightly trigger for it.
The NODE_APP_ROUTE env var was a hardcoded URL containing the old fixed space
name. Since the route is now <org>-<space>-<appname>.<domain> and the space is
dynamic, we need to query the actual route from CF after the deploy instead of
relying on the env var.
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