Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Bootstrapped Repository #10

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions script/vsts/platforms/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
timeoutInMinutes: 180
variables:
ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
IsBuild: true
pool:
vmImage: ubuntu-18.04

Expand Down
1 change: 1 addition & 0 deletions script/vsts/platforms/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions script/vsts/platforms/templates/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
31 changes: 31 additions & 0 deletions script/vsts/platforms/templates/zip-upload.yml
Original file line number Diff line number Diff line change
@@ -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}}
1 change: 1 addition & 0 deletions script/vsts/platforms/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down