azdo-classic-to-yaml

1.0.1 • Public • Published

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

Name Description Required Default
AZURE_VSRM_URL Azure VSRM URL Optional https://vsrm.dev.azure.com
AZDO_ENV_URL Azdo environment url Optional https://dev.azure.com
ORGANIZATION Organization Name Yes N/A
PROJECT Project Name Yes N/A
PAT Public Access Token Yes N/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

Package Sidebar

Install

npm i azdo-classic-to-yaml

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

19.9 kB

Total Files

3

Last publish

Collaborators

  • sathishvalaguru