-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup pipeline to sync common engineering directory
- Loading branch information
1 parent
d8578fe
commit ae25068
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Common Engineering System | ||
|
||
The `eng/common` directory contains engineering files that are common across the various azure-sdk language repos. | ||
It should remain relatively small and only contain textual based files like scripts, configs, or templates, it | ||
should not contain binary files as they don't play well with git. | ||
|
||
# Updating | ||
|
||
Any updates to files in the `eng/common` directory should be made in the [azure-sdk-tools](https://github.com/azure/azure-sdk-tools) repo. | ||
All changes made will generate a PR to be created to all subscribed azure-sdk language repos which will blindly replace all contents of | ||
the `eng/common` directory in that repo. For that reason do **NOT** make changes to files in this directory in the individual azure-sdk | ||
languages repos as they will be overwritten the next time an update is taken from the common azure-sdk-tools repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Mirror the eng/common folder to all subscribed langauge repos. | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- eng/common | ||
|
||
pr: none | ||
|
||
resources: | ||
repositories: | ||
- repository: azure-sdk-build-tools | ||
type: git | ||
name: internal/azure-sdk-build-tools | ||
|
||
pool: | ||
vmImage: windows-2019 | ||
|
||
jobs: | ||
- job: SyncEngCommon | ||
displayName: Sync eng/common Directory | ||
|
||
steps: | ||
- template: tools/clone-buildtools/clone-buildtools.yml@azure-sdk-build-tools | ||
- template: ./templates/steps/sync-directory.yml | ||
parameters: | ||
CommitMessage: Sync eng/common directory with azure-sdk-tools repository | ||
DirectoryToSync: eng/common | ||
Repos: | ||
- azure-sdk-for-java | ||
- azure-sdk-for-js | ||
- azure-sdk-for-net | ||
- azure-sdk-for-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
parameters: | ||
Repos: [] | ||
DirectoryToSync: eng/common | ||
CommitMessage: commit-message-not-set | ||
|
||
steps: | ||
|
||
- ${{ each repo in parameters.Repos }}: | ||
- pwsh: | | ||
git clone --branch master https://github.com/azure/${{ repo }} | ||
$repoPath = "${{ repo }}/${{ parameters.DirectoryToSync }}" | ||
if (!(Test-Path $repoPath)) { mkdir $repoPath } | ||
rm -v -r $repoPath/*.* | ||
cp -v -r $(Build.SourcesDirectory)/${{ parameters.DirectoryToSync }}/*.* $repoPath | ||
ls -r $repoPath | ||
displayName: Copy ${{ parameters.DirectoryToSync }} from azure-sdk-tools to ${{ repo }} | ||
- template: pipelines/steps/create-pull-request.yml@azure-sdk-build-tools | ||
parameters: | ||
RepoName: ${{ repo }} | ||
PRBranchName: sync-${{ parameters.DirectoryToSync }} | ||
CommitMsg: ${{ parameters.CommitMessage }} | ||
PushArgs: -f | ||
WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ repo }} |