github / gh-valet

Valet helps facilitate the migration of Azure DevOps, CircleCI, GitLab CI, Jenkins, and Travis CI pipelines to GitHub Actions.
MIT License
510 stars 35 forks source link

Updating options on GH-Valet with new ADO options #104

Closed begonaguereca closed 1 year ago

begonaguereca commented 1 year ago

What's changing?

Make sure you have the latest version of the Valet container: gh valet update

Build c# project: dotnet build /Users/bguereca/1ESLighthouse/gh-valet/gh-valet/src/Valet/Valet.csproj

Make sure you add a sample ADO pipeline to output/pipeline.yml

trigger:
- main

pool:
  vmImage: ubuntu-latest

steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'

- script: |
    echo Add other tasks to build, test, and deploy your project.
    echo See https://aka.ms/yaml
  displayName: 'Run a multi-line script'

also output/config.yaml:

pipelines:
  - project_slug: valet-testing/unit/basic-pipeline-sample
    source_file_path: output/pipeline.yml
  - project_slug: valet-testing/unit/directed-acrylic-graph-pipeline
    source_file_path: output/pipeline.yml

Regular commands: dotnet run --project src/Valet/Valet.csproj -- dry-run azure-devops pipeline --pipeline-id 427 -o "output"

dotnet run --project src/Valet/Valet.csproj -- migrate azure-devops pipeline --pipeline-id 427 -o "output" --target-url "https://github.com/begonaguereca/demo"

dotnet run --project src/Valet/Valet.csproj -- audit azure-devops -o "output"


Commands with config options:

Run a dry-run with source-file-path: dotnet run --project src/Valet/Valet.csproj -- dry-run azure-devops pipeline -o "output" --source-file-path output/pipeline.yml

Run for migrate with source-file-path: dotnet run --project src/Valet/Valet.csproj -- migrate azure-devops pipeline -o "output" --source-file-path output/pipeline.yml --target-url "https://github.com/begonaguereca/demo"

Run for audit with a config-file-path: dotnet run --project src/Valet/Valet.csproj -- audit azure-devops -o "output" --config-file-path "output/config.yml"

How's this tested?

Closes [related issues]

github-actions[bot] commented 1 year ago

Unit Test Results

38 tests  ±0   38 :heavy_check_mark: ±0   0s :stopwatch: ±0s   1 suites ±0     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit e88fb44a. ± Comparison against base commit 848d112b.

:recycle: This comment has been updated with latest results.

j-dunham commented 1 year ago

@begonaguereca should this work?

dotnet run --project src/Valet/Valet.csproj -- dry-run azure-devops pipeline -i 427 -o "output"