The purpose of this example is to showcase all available features in PFO. It should help you to kickoff your config with a quick copy paste, and try field behaviours in your environment.
This example includes a:
bitbucket-pipelines.yml - needed for pipeline configuration
pipeline-forms.yml - needed for forms configuration
STEP 1 - bitbucket-pipelines.yml
Pipelines should be enabled in the Repository settings / Pipelines / Settings menu
After this you should navigate to your bitbucket-pipelines.yml and edit the file. It can be done from:
the UI editor in Bitbucket
any text editor you use for version control
image: node:18
definitions:
caches:
sonar: /root/.sonar/cache
frontend-node: static/frontend/node_modules
steps:
- step:
name: Templates
script:
- &build-backend-script |
npm install
npm run build
- &cd-frontend-run-install-script |
cd ./static/frontend
npm install -f
- &build-frontend-script |
cd ./static/frontend
npm install -f
npm run build
- &cd-forge |
cd forge
- &cd-root |
cd ../../
pipelines:
custom:
Demonstration pipeline:
- step:
name: Custom Step
script:
- echo "This step will run on a cloud runner.";
- printenv
Pipeline without forms:
- step:
name: Custom Step
script:
- echo "This step will run on a cloud runner.";
- printenv
Commit your changes.
STEP 2 - pipeline-forms.yml
Open your source code and add a new file on the root level, next to bitbucket-pipelines.yml, named pipeline-forms.yml.
If you struggle creating this file, check out this part of the documentation: