diff --git a/script/vsts/platforms/linux.yml b/script/vsts/platforms/linux.yml index e8c1a2d8096..a65d59c988d 100644 --- a/script/vsts/platforms/linux.yml +++ b/script/vsts/platforms/linux.yml @@ -4,6 +4,7 @@ jobs: timeoutInMinutes: 180 variables: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] + IsBuild: true pool: vmImage: ubuntu-18.04 diff --git a/script/vsts/platforms/macos.yml b/script/vsts/platforms/macos.yml index 52ea6ae94f9..c00a6dc94d5 100644 --- a/script/vsts/platforms/macos.yml +++ b/script/vsts/platforms/macos.yml @@ -9,6 +9,7 @@ jobs: IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] RunCoreMainTests: true + IsBuild: true pool: vmImage: macos-10.15 diff --git a/script/vsts/platforms/templates/bootstrap.yml b/script/vsts/platforms/templates/bootstrap.yml index 9cd3c12a8e6..6c6898ff890 100644 --- a/script/vsts/platforms/templates/bootstrap.yml +++ b/script/vsts/platforms/templates/bootstrap.yml @@ -24,3 +24,13 @@ steps: CI: true CI_PROVIDER: VSTS condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptRunnerNodeModulesRestored'], true), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'), ne(variables['LocalPackagesRestored'], 'true')) + + # upload bootstraped repository + # to provide a ready development environment (similar to a pre-built docker image) + - template: ./zip-upload.yml + parameters: + artifacts: + - path: '.' + condition: and(succeeded(), eq(variables.IsBuild, 'true')) + archiveFileName: bootstrapped_repository_$(Agent.OS)_$(BUILD_ARCH).7z + archiveDir: $(Build.ArtifactStagingDirectory) diff --git a/script/vsts/platforms/templates/zip-upload.yml b/script/vsts/platforms/templates/zip-upload.yml new file mode 100644 index 00000000000..daa619beb4a --- /dev/null +++ b/script/vsts/platforms/templates/zip-upload.yml @@ -0,0 +1,31 @@ +parameters: + # artifacts files or directory + # props: + # - path + # - condition + # - archiveFileName + # - archiveDir + - name: artifacts + type: object + default: {} + +steps: + - ${{ each artifact in parameters.artifacts }}: + - task: ArchiveFiles@2 + inputs: + rootFolderOrFile: ${{artifact.path}} + archiveType: 7z + sevenZipCompression: normal + archiveFile: ${{artifact.archiveDir}}/${{artifact.archiveFileName}} + replaceExistingArchive: true + displayName: Compress ${{artifact.path}} + ${{ if artifact.condition }}: + condition: ${{artifact.condition}} + + - template: ./publish.yml + parameters: + artifacts: + - filename: ${{artifact.archiveFileName}} + dir: ${{artifact.archiveDir}} + ${{ if artifact.condition }}: + condition: ${{artifact.condition}} diff --git a/script/vsts/platforms/windows.yml b/script/vsts/platforms/windows.yml index ac71ef5fb3f..10b81ea3b67 100644 --- a/script/vsts/platforms/windows.yml +++ b/script/vsts/platforms/windows.yml @@ -21,6 +21,7 @@ jobs: ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ] IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ] IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ] + IsBuild: true steps: - template: templates/preparation.yml