diff --git a/script/vsts/nightly-release.yml b/script/vsts/nightly-release.yml index c921e719e..88721e926 100644 --- a/script/vsts/nightly-release.yml +++ b/script/vsts/nightly-release.yml @@ -1,16 +1,6 @@ jobs: - - job: GetReleaseVersion - pool: - vmImage: 'ubuntu-latest' - steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm install` completes. - - script: | - cd script/vsts - npm install - displayName: npm install - - script: node script/vsts/get-release-version.js --nightly - name: Version + # Import "GetReleaseVersion" job definition + - template: platforms/templates/get-release-version.yml # Import OS-specific build definitions - template: platforms/windows.yml diff --git a/script/vsts/platforms/templates/get-release-version.yml b/script/vsts/platforms/templates/get-release-version.yml new file mode 100644 index 000000000..1e72f44ec --- /dev/null +++ b/script/vsts/platforms/templates/get-release-version.yml @@ -0,0 +1,17 @@ +jobs: + +- job: GetReleaseVersion + pool: + vmImage: 'ubuntu-latest' + steps: + # This has to be done separately because VSTS inexplicably + # exits the script block after `npm ci` completes. + - script: | + cd script/vsts + npm ci + displayName: npm ci + - script: node script/vsts/get-release-version.js + name: Version + env: + REPO_OWNER: $(REPO_OWNER) + NIGHTLY_RELEASE_REPO: $(NIGHTLY_RELEASE_REPO) diff --git a/script/vsts/pull-requests.yml b/script/vsts/pull-requests.yml index 0029be0f3..58c989b97 100644 --- a/script/vsts/pull-requests.yml +++ b/script/vsts/pull-requests.yml @@ -1,18 +1,8 @@ trigger: none # No CI builds, only PR builds jobs: - - job: GetReleaseVersion - pool: - vmImage: 'ubuntu-latest' - steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm install` completes. - - script: | - cd script/vsts - npm install - displayName: npm install - - script: node script/vsts/get-release-version.js - name: Version + # Import "GetReleaseVersion" job definition + - template: platforms/templates/get-release-version.yml # Import OS-specific build definitions - template: platforms/windows.yml diff --git a/script/vsts/release-branch-build.yml b/script/vsts/release-branch-build.yml index 9494832cf..684a27f00 100644 --- a/script/vsts/release-branch-build.yml +++ b/script/vsts/release-branch-build.yml @@ -5,18 +5,8 @@ trigger: pr: none # no PR triggers jobs: - - job: GetReleaseVersion - pool: - vmImage: 'ubuntu-latest' - steps: - # This has to be done separately because VSTS inexplicably - # exits the script block after `npm install` completes. - - script: | - cd script/vsts - npm install - displayName: npm install - - script: node script/vsts/get-release-version.js - name: Version + # Import "GetReleaseVersion" job definition + - template: platforms/templates/get-release-version.yml # Import OS-specific build definitions. - template: platforms/windows.yml