diff options
| author | 2019-09-26 09:29:33 -0400 | |
|---|---|---|
| committer | 2019-09-26 09:29:33 -0400 | |
| commit | 0ba70558734bcd63f61e0ed485857604e96a2272 (patch) | |
| tree | 67066fc82f442891693d7d7ea499c3fc8d592595 | |
| parent | ci: Optionally prepend commit messages with environment variable (diff) | |
| download | yuzu-0ba70558734bcd63f61e0ed485857604e96a2272.tar.gz yuzu-0ba70558734bcd63f61e0ed485857604e96a2272.tar.xz yuzu-0ba70558734bcd63f61e0ed485857604e96a2272.zip | |
ci: Add private mergebot CI templates
| -rw-r--r-- | .ci/templates/merge-private.yml | 47 | ||||
| -rw-r--r-- | .ci/templates/mergebot-private.yml | 23 |
2 files changed, 70 insertions, 0 deletions
diff --git a/.ci/templates/merge-private.yml b/.ci/templates/merge-private.yml new file mode 100644 index 000000000..a640cfbde --- /dev/null +++ b/.ci/templates/merge-private.yml | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | jobs: | ||
| 2 | - job: merge | ||
| 3 | displayName: 'pull requests' | ||
| 4 | steps: | ||
| 5 | - checkout: self | ||
| 6 | submodules: recursive | ||
| 7 | - template: ./mergebot-private.yml | ||
| 8 | parameters: | ||
| 9 | matchLabel: '$(BuildName)-merge' | ||
| 10 | matchLabelPublic: '$(PublicBuildName)-merge' | ||
| 11 | - task: ArchiveFiles@2 | ||
| 12 | displayName: 'Package Source' | ||
| 13 | inputs: | ||
| 14 | rootFolderOrFile: '$(System.DefaultWorkingDirectory)' | ||
| 15 | includeRootFolder: false | ||
| 16 | archiveType: '7z' | ||
| 17 | archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z' | ||
| 18 | - task: PublishPipelineArtifact@1 | ||
| 19 | displayName: 'Upload Artifacts' | ||
| 20 | inputs: | ||
| 21 | targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z' | ||
| 22 | artifact: 'yuzu-$(BuildName)-source' | ||
| 23 | replaceExistingArchive: true | ||
| 24 | - job: upload_source | ||
| 25 | displayName: 'upload' | ||
| 26 | dependsOn: merge | ||
| 27 | steps: | ||
| 28 | - template: ./sync-source.yml | ||
| 29 | parameters: | ||
| 30 | artifactSource: 'true' | ||
| 31 | needSubmodules: 'true' | ||
| 32 | - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh | ||
| 33 | displayName: 'Apply Git Configuration' | ||
| 34 | - script: git tag -a $(BuildName)-$(Build.BuildId) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName)" | ||
| 35 | displayName: 'Tag Source' | ||
| 36 | - script: git remote add other $(GitRepoPushChangesURL) | ||
| 37 | displayName: 'Register Repository' | ||
| 38 | - script: git push --follow-tags --force other HEAD:$(GitPushBranch) | ||
| 39 | displayName: 'Update Code' | ||
| 40 | - script: git rev-list -n 1 $(BuildName)-$(Build.BuildId) > $(Build.ArtifactStagingDirectory)/tag-commit.sha | ||
| 41 | displayName: 'Calculate Release Point' | ||
| 42 | - task: PublishPipelineArtifact@1 | ||
| 43 | displayName: 'Upload Release Point' | ||
| 44 | inputs: | ||
| 45 | targetPath: '$(Build.ArtifactStagingDirectory)/tag-commit.sha' | ||
| 46 | artifact: 'yuzu-$(BuildName)-release-point' | ||
| 47 | replaceExistingArchive: true \ No newline at end of file | ||
diff --git a/.ci/templates/mergebot-private.yml b/.ci/templates/mergebot-private.yml new file mode 100644 index 000000000..a673c5b01 --- /dev/null +++ b/.ci/templates/mergebot-private.yml | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | parameters: | ||
| 2 | matchLabel: 'dummy-merge' | ||
| 3 | matchLabelPublic: 'dummy-merge' | ||
| 4 | |||
| 5 | steps: | ||
| 6 | - script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3 | ||
| 7 | displayName: 'Prepare Environment' | ||
| 8 | - script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh | ||
| 9 | displayName: 'Apply Git Configuration' | ||
| 10 | - task: PythonScript@0 | ||
| 11 | displayName: 'Discover, Download, and Apply Patches' | ||
| 12 | inputs: | ||
| 13 | scriptSource: 'filePath' | ||
| 14 | scriptPath: '.ci/scripts/merge/apply-patches-by-label.py' | ||
| 15 | arguments: '${{ parameters.matchLabelPublic }} patches-public' | ||
| 16 | workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
| 17 | - task: PythonScript@0 | ||
| 18 | displayName: 'Discover, Download, and Apply Patches' | ||
| 19 | inputs: | ||
| 20 | scriptSource: 'filePath' | ||
| 21 | scriptPath: '.ci/scripts/merge/apply-patches-by-label-private.py' | ||
| 22 | arguments: '$(PrivateMergeUser) ${{ parameters.matchLabel }} patches-private' | ||
| 23 | workingDirectory: '$(System.DefaultWorkingDirectory)' | ||