Configure Jobs and Pipelines with YAML
YAML (YAML Ain't Markup Language) is a human-readable data serialization language that is commonly used for configuration files. To find more about YAML, see https://yaml.org/
.
In VB Studio, you can use a YAML file (a file with .yml
extension) to store a job or
pipeline configuration in any of the project's Git repositories. The build system constantly
monitors the Git repositories and, when it detects a YAML file, creates or updates a job or a
pipeline with the configuration specified in the YAML file.
Here's an example with a YAML file that configures a job:
job:
name: MyFirstYAMLJob
vm-template: Basic Build Executor Template
git:
- url: "https://mydevcsinstance-mydomain.developer.ocp.oraclecloud.com/mydevcsinstance-mydomain/s/mydevcsinstance-mydomain_my-project_902/scm/employee.git"
branch: main
repo-name: origin
steps:
- shell:
script: "echo Build Number: $BUILD_NUMBER"
- maven:
goals: clean install
pom-file: "employees-app/pom.xml"
after:
- artifacts:
include: "employees-app/target/*"
settings:
- discard-old:
days-to-keep-build: 5
builds-to-keep: 10
days-to-keep-artifacts: 5
artifacts-to-keep: 10