Skip to main content

Developers workflow (pre-trunk-based)

1. In Azure Repo pre-trunk-based branch create a YAML file named azdevops-ci.yml with the following content:

azdevops-ci.yml
###################################################################################################
############################# ShamanOps pipeline | Azure DevOps ###################################
###################################################################################################
trigger:
- pre-trunk-based
resources:
repositories:
- repository: automation
type: github
name: shamanops/resources
endpoint: 'shamanops-automation'
ref: main
stages:
- template: azdevops/pretrunk/stable/base-pipeline.yaml@automation
pool:
name: Azure pipelines
variables:
- template: azdevops/pretrunk/stable/base-variables.yaml@automation
# Project
- name: projectName
value: 'examples'
# Pre-trunk sets
- name: exposeEnabled
value: 'true'
- name: appInternalPort
value: '80'
#-------------------------------------------------------------------------------------------------#
## Features -------------------------------------------------------------------------------------#
- name: appDaysToLive
value: '0'
#-------------------------------------------------------------------------------------------------#
###################################################################################################
info

By default, pre-trunk-based applications are configured to not be deleted.
To define how many days the application should live, you must modify the field appDaysToLive in Features section.

2. Create a pipeline and run it from the file created in step 1:

  • Go to pipelines

Pipelines

  • New Pipeline

New Pipeline

  • From Azure Repos

From Azure Repos

  • Select Repository

Select Repository

  • Existing Azure Pipelines YAML file

Existin Azure yaml

  • Select file: azdevops-ci.yaml in main branch

Select file

  • RUN pipeline!

Run pipeline