|
| 1 | +parameters: |
| 2 | + - name: Repository |
| 3 | + type: string |
| 4 | + default: $(Build.Repository.Name) |
| 5 | + - name: Prefix |
| 6 | + type: string |
| 7 | + - name: CIConventionOptions |
| 8 | + type: string |
| 9 | + default: '' |
| 10 | + - name: UPConventionOptions |
| 11 | + type: string |
| 12 | + default: '' |
| 13 | + - name: TestsConventionOptions |
| 14 | + type: string |
| 15 | + default: '' |
| 16 | + |
| 17 | +steps: |
| 18 | + - template: install-pipeline-generation.yml |
| 19 | + |
| 20 | + # This covers our public repos. |
| 21 | + - ${{ if not(endsWith(parameters.Repository, '-pr'))}}: |
| 22 | + - script: > |
| 23 | + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator |
| 24 | + --organization https://dev.azure.com/azure-sdk |
| 25 | + --project public |
| 26 | + --prefix ${{parameters.Prefix}} |
| 27 | + --devopspath "\${{parameters.Prefix}}" |
| 28 | + --path $(System.DefaultWorkingDirectory)/sdk |
| 29 | + --endpoint Azure |
| 30 | + --repository ${{parameters.Repository}} |
| 31 | + --convention ci |
| 32 | + --agentpool Hosted |
| 33 | + --branch refs/heads/master |
| 34 | + --patvar PATVAR |
| 35 | + --debug |
| 36 | + ${{parameters.CIConventionOptions}} |
| 37 | + displayName: Create CI pipelines for public repository |
| 38 | + env: |
| 39 | + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) |
| 40 | + - script: > |
| 41 | + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator |
| 42 | + --organization https://dev.azure.com/azure-sdk |
| 43 | + --project internal |
| 44 | + --prefix ${{parameters.Prefix}} |
| 45 | + --devopspath "\${{parameters.Prefix}}" |
| 46 | + --path $(System.DefaultWorkingDirectory)/sdk |
| 47 | + --endpoint Azure |
| 48 | + --repository ${{parameters.Repository}} |
| 49 | + --convention up |
| 50 | + --agentpool Hosted |
| 51 | + --branch refs/heads/master |
| 52 | + --patvar PATVAR |
| 53 | + --debug |
| 54 | + ${{parameters.UPConventionOptions}} |
| 55 | + displayName: Create UP pipelines for public repository |
| 56 | + env: |
| 57 | + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) |
| 58 | + - script: > |
| 59 | + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator |
| 60 | + --organization https://dev.azure.com/azure-sdk |
| 61 | + --project internal |
| 62 | + --prefix ${{parameters.Prefix}} |
| 63 | + --devopspath "\${{parameters.Prefix}}" |
| 64 | + --path $(System.DefaultWorkingDirectory)/sdk |
| 65 | + --endpoint Azure |
| 66 | + --repository ${{parameters.Repository}} |
| 67 | + --convention tests |
| 68 | + --agentpool Hosted |
| 69 | + --branch refs/heads/master |
| 70 | + --patvar PATVAR |
| 71 | + --debug |
| 72 | + ${{parameters.TestsConventionOptions}} |
| 73 | + displayName: Create Live Test pipelines for public repository |
| 74 | + env: |
| 75 | + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) |
| 76 | +
|
| 77 | + # This covers our -pr repositories. |
| 78 | + - ${{ if endsWith(parameters.Repository, '-pr')}}: |
| 79 | + - script: > |
| 80 | + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator |
| 81 | + --organization https://dev.azure.com/azure-sdk |
| 82 | + --project internal |
| 83 | + --prefix ${{parameters.Prefix}}-pr |
| 84 | + --devopspath "\${{parameters.Prefix}}\pr" |
| 85 | + --path $(System.DefaultWorkingDirectory)/sdk |
| 86 | + --endpoint Azure |
| 87 | + --repository ${{parameters.Repository}} |
| 88 | + --convention ci |
| 89 | + --agentpool Hosted |
| 90 | + --branch refs/heads/master |
| 91 | + --patvar PATVAR |
| 92 | + --debug |
| 93 | + --no-schedule |
| 94 | + ${{parameters.CIConventionOptions}} |
| 95 | + displayName: Create CI pipelines for private repository |
| 96 | + env: |
| 97 | + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) |
| 98 | + - script: > |
| 99 | + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator |
| 100 | + --organization https://dev.azure.com/azure-sdk |
| 101 | + --project internal |
| 102 | + --prefix ${{parameters.Prefix}}-pr |
| 103 | + --devopspath "\${{parameters.Prefix}}\pr" |
| 104 | + --path $(System.DefaultWorkingDirectory)/sdk |
| 105 | + --endpoint Azure |
| 106 | + --repository ${{parameters.Repository}} |
| 107 | + --convention up |
| 108 | + --agentpool Hosted |
| 109 | + --branch refs/heads/master |
| 110 | + --patvar PATVAR |
| 111 | + --debug |
| 112 | + --no-schedule |
| 113 | + ${{parameters.UPConventionOptions}} |
| 114 | + displayName: Create UP pipelines for private repository |
| 115 | + env: |
| 116 | + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) |
| 117 | + - script: > |
| 118 | + $(Pipeline.Workspace)/pipeline-generator/pipeline-generator |
| 119 | + --organization https://dev.azure.com/azure-sdk |
| 120 | + --project internal |
| 121 | + --prefix ${{parameters.Prefix}}-pr |
| 122 | + --devopspath "\${{parameters.Prefix}}\pr" |
| 123 | + --path $(System.DefaultWorkingDirectory)/sdk |
| 124 | + --endpoint Azure |
| 125 | + --repository ${{parameters.Repository}} |
| 126 | + --convention tests |
| 127 | + --agentpool Hosted |
| 128 | + --branch refs/heads/master |
| 129 | + --patvar PATVAR |
| 130 | + --debug |
| 131 | + --no-schedule |
| 132 | + ${{parameters.TestsConventionOptions}} |
| 133 | + displayName: Create Live Test pipelines for private repository |
| 134 | + env: |
| 135 | + PATVAR: $(azuresdk-azure-sdk-devops-pipeline-generation-pat) |
0 commit comments