Quality Gate: Fast Feedback
Fast feedback gives engineers fast feedback on every change.
It is run on every PR and on every commit to main.
Implement the following Make targets:
Usage
If you used corectl to create your application this workflow will already be in your repository.
name: Fast Feedback
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
id-token: write
jobs:
version:
uses: coreeng/p2p/.github/workflows/p2p-version.yaml@v1
secrets:
git-token: ${{ secrets.GITHUB_TOKEN }}
fastfeedback:
needs: [version]
uses: coreeng/p2p/.github/workflows/p2p-workflow-fastfeedback.yaml@v1
with:
version: ${{ needs.version.outputs.version }}
Subsections of Quality Gate: Fast Feedback
Build
The purpose of P2P build is to
- Run any local tests + static verification
- Build an immutable versioned artifact to pass through the rest of the P2P.
Pushing to the fast feedback registry
For deployed testing to take place push a versioned artifact to the registry
required for fast feedback:
docker image push $(REGISTRY)/$(FAST_FEEDBACK_PATH)/<app-name>:$(VERSION)
Variables set by the P2P that you can use:
Deployed Stubbed Functional Test
Make target: p2p-functional
Shift left the verification of your application.
Stub out any external dependencies apart from databases / caches / queues to enable reliable, fast feedback, with
the ability to test failure scenarios.
Deploy Application
Deploy to the following namespace
<app_name>-functional
Or if you have multiple apps in the same tenancy
<tenant>-<app-name>-functional
Run Tests
Execute functional tests, we recommend using a BDD framework. All software templates come with example tests.
Deployed Stubbed NFT
Make target: p2p-nft
Shift left the non-functional verification of your application.
Stub out any external dependencies apart from databases / caches / queues to enable reliable, fast feedback, with
the ability to test failure scenarios.
Deploy Application
Deploy to the following namespace
<app_name>-nft
Or if you have multiple apps in the same tenancy
<tenant>-<app-name>-nft
Run Tests
Execute non-functional tests. We recommend using k6 and software templates come with example non-functional tests.
Integration Test
Make target: p2p-integration
Integration is the first time your application is integrated with other applications.
Different levels of integration will be appropriate depending on your architecture.
Deploy Application
Deploy to the following namespace
<app_name>-integration
Or if you have multiple apps in the same tenancy
<tenant>-<app-name>-integration
Run Tests
Execute integrated functional tests, we recommend using a BDD framework. All software templates come with example tests.
Make target: p2p-promote-to-extended-test
After successful run of p2p-functional
, p2p-integration
, and p2p-nft
the version is considered ready for
Extended Test.
The default implementation as provided by software templates rarely needs changing:
p2p-promote-to-extended-test:
corectl p2p promote <app-name>:${VERSION} \
--source-stage $(FAST_FEEDBACK_PATH) \
--dest-registry $(REGISTRY) \
--dest-stage $(EXTENDED_TEST_PATH)
This moves the immutable versioned artifact into the registry for extended test and will be
picked up next time Extended Test runs