1.0.1 • Published 1 year ago

azdo-classic-to-yaml v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Azdo Classic Release Pipeline to Yaml

This JavaScript package library extracts varibale groups, task groups and classic release pipleine as Yaml files.

Installation

  1. Run below commands to create package.json file and install azdo-classic-to-yaml.
npm init && npm i azdo-classic-to-yaml
  1. Add "generate": "node ./node_modules/azdo-classic-to-yaml/generate.js" in package.json file
{
  "name": "demo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "generate": "node ./node_modules/azdo-classic-to-yaml/generate.js"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "azdo-classic-to-yaml": "^1.0.1"
  }
}
  1. Create .env file and update with your ORGANIZATION, PROJECT and PAT. (https://dev.azure.com/ORGANIZATION/PROJECT)
ORGANIZATION=
PROJECT=
PAT=
  1. Run below command. This will generate yaml file in pipelines folder.
npm run generate

Environment Variables

NameDescriptionRequiredDefault
AZURE_VSRM_URLAzure VSRM URLOptionalhttps://vsrm.dev.azure.com
AZDO_ENV_URLAzdo environment urlOptionalhttps://dev.azure.com
ORGANIZATIONOrganization NameYesN/A
PROJECTProject NameYesN/A
PATPublic Access TokenYesN/A

Generated YAML files

  • Variable Groups - ./pipelines/varibalegroups/*.yaml
  • Task Groups - ./pipelines/taskgroups/*.yaml
  • Release Pipeline - ./pipelines/*.yaml

Known Issues:

  • This supports only for classic release pipelines and gives you simple template structure.
  • Pre and Post approval flows are not covered and recommended to use deployment strategies with approval.
  • connectedServiceNameARM: $(az_service_connection) needs to be replaced with azureSubscription: $(az_service_connection) in some places.
  • Task groups needs to be updated with parameters - $(az_service_connection) to ${{ parameters.az_service_connection }}
  • Needs cleanup and fixes.

Samples:

name: "Release Pipeline 1"
trigger: none
paremeters: []
variables: []
resources:
  pipelines: []
  repositories: []
stages:
  - stage: Development
    variables: []
    jobs:
      - job: Bundle - DEV
      - job: AKS Deployment - DEV
      - job: DB Migration - DEV
  - stage: Integration
    variables: []
    jobs:
      - job: AKS Deployment  - INT
      - job: DB Migration - INT 
      - job: Post Deploy Testing - INT