Merge pull request #964 from microsoft/myho/updateReleasePipeline
chore: update & document release process
Esse commit está contido em:
@@ -0,0 +1,66 @@
|
||||
# Overview
|
||||
|
||||
[](https://dev.azure.com/msft-vott/VoTT/_build/latest?definitionId=55&branchName=master)
|
||||
|
||||
Instruction on how to create new GitHub & Web Releases.
|
||||
|
||||
## Release Process
|
||||
|
||||

|
||||
|
||||
### AzDO Tasks
|
||||
|
||||
[GitHub Release Task](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/GitHubReleaseV1)
|
||||
|
||||
[Azure File Copy](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureFileCopyV3)
|
||||
|
||||
## Versioning
|
||||
|
||||
Follow [NPM Semantic Versioning](https://docs.npmjs.com/about-semantic-versioning#incrementing-semantic-versions-in-published-packages)
|
||||
|
||||
| Code status | Stage | Rule | Example version |
|
||||
| ----------------------------------------- | ------------- | ------------------------------------------------------------------ | --------------- |
|
||||
| First release | New product | Start with 1.0.0 | 1.0.0 |
|
||||
| Backward compatible bug fixes | Patch release | Increment the third digit | 1.0.1 |
|
||||
| Backward compatible new features | Minor release | Increment the middle digit and reset last digit to zero | 1.1.0 |
|
||||
| Changes that break backward compatibility | Major release | Increment the first digit and reset middle and last digits to zero | 2.0.0 |
|
||||
|
||||
### Commands
|
||||
|
||||
The pipeline use [npm-version](https://docs.npmjs.com/cli/version) to update version
|
||||
|
||||
#### Pre
|
||||
|
||||
All version with `pre`, ie. `preminor` will bump the appropriate didgit & append `-0` to the new version
|
||||
|
||||
Examples:
|
||||
|
||||
`npm version prepatch`
|
||||
|
||||
1. v2.3.0 --> v2.3.1-0
|
||||
1. v2.3.1-0 --> v2.3.2-0
|
||||
|
||||
`npm version preminor`
|
||||
|
||||
1. v2.3.0 --> v2.4.0-0
|
||||
1. v2.4.0-0 --> v2.5.0-0
|
||||
|
||||
##### Exception
|
||||
|
||||
`prerelease` behave similar to prepatch, but would increment the last digit.
|
||||
|
||||
Examples:
|
||||
|
||||
`npm version prerelease`
|
||||
|
||||
v2.3.0 --> v2.3.1-0
|
||||
|
||||
v2.3.0-0 --> v2.3.0-1
|
||||
|
||||
#### Major
|
||||
|
||||
v2.x.x --> v3.0.0
|
||||
|
||||
#### Minor
|
||||
|
||||
v2.2.0 --> v2.3.0
|
||||
@@ -0,0 +1,33 @@
|
||||
name: "GitHub & Web Release [$(SourceBranchName)] - $(Date:yyyyMMdd)$(Rev:.r)"
|
||||
|
||||
trigger: none # manual queue only when we're ready to release
|
||||
pr: none # disable CI build for PR
|
||||
|
||||
variables:
|
||||
azureSubscription: "pj-little-sub"
|
||||
DEV_STORAGE_ACCOUNT: 'vottdev'
|
||||
PROD_STORAGE_ACCOUNT: 'vott'
|
||||
DEV_URL: "https://vottdev.z5.web.core.windows.net/"
|
||||
PROD_URL: "https://vott.z22.web.core.windows.net/"
|
||||
|
||||
stages:
|
||||
- stage: version_bump_commit
|
||||
jobs:
|
||||
- template: templates/npm-version-bump.yml
|
||||
parameters:
|
||||
versionType: $(NPM_VERSION_TYPE)
|
||||
|
||||
- stage: github_release
|
||||
dependsOn: version_bump_commit
|
||||
jobs:
|
||||
- template: templates/create-github-release.yml
|
||||
parameters:
|
||||
GitHubConnection: 'GitHub connection' # defaults for any parameters that aren't specified
|
||||
repositoryName: '$(Build.Repository.Name)' # microsoft/VoTT
|
||||
isPreRelease: $(IS_PRERELEASE) # set when queuing build
|
||||
isDraft: $(IS_DRAFT)
|
||||
|
||||
- stage: web_release
|
||||
dependsOn: version_bump_commit
|
||||
jobs:
|
||||
- template: templates/create-web-release.yml
|
||||
@@ -1,26 +0,0 @@
|
||||
# Node.js with React
|
||||
# Build a Node.js project that uses React.
|
||||
# Add steps that analyze code, save build artifacts, deploy, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: 'Use Node 10.x'
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
# clean install
|
||||
npm ci
|
||||
npm run release-ci
|
||||
|
||||
mkdir -p linux
|
||||
cp releases/vott*.snap linux/
|
||||
displayName: Build
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: linux'
|
||||
inputs:
|
||||
PathtoPublish: linux
|
||||
ArtifactName: linux
|
||||
@@ -1,22 +0,0 @@
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: 'Use Node 10.x'
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
# clean install
|
||||
npm ci
|
||||
npm run release-ci
|
||||
|
||||
mkdir -p mac
|
||||
cp releases/vott*.dmg mac/
|
||||
displayName: Build
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: mac'
|
||||
inputs:
|
||||
PathtoPublish: mac
|
||||
ArtifactName: mac
|
||||
@@ -1,69 +0,0 @@
|
||||
name: $(Date:yyyyMMdd).$(Hours)$(Minutes)$(Seconds)
|
||||
variables:
|
||||
AZURE_STORAGE_ACCOUNT: vottv2
|
||||
trigger:
|
||||
- dev*
|
||||
- master
|
||||
pr: none # disable CI build for PR
|
||||
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
COMMIT_SHA=`echo ${BUILD_SOURCEVERSION} | cut -c1-8`
|
||||
echo "sha: " $COMMIT_SHA
|
||||
|
||||
# rewrite build number
|
||||
echo "##vso[build.updatebuildnumber]Report-${COMMIT_SHA}-${BUILD_BUILDNUMBER}"
|
||||
displayName: "Rewrite build number"
|
||||
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
ACCOUNT=$(AZURE_STORAGE_ACCOUNT)
|
||||
if [[ -z "${ACCOUNT}" ]]; then
|
||||
echo "Need to set AZURE_STORAGE_ACCOUNT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KEY=$(AZURE_STORAGE_KEY)
|
||||
if [[ -z "${KEY}" ]]; then
|
||||
echo "Need to set AZURE_STORAGE_KEY"
|
||||
exit 1
|
||||
fi
|
||||
displayName: "Verify storage account cred exists"
|
||||
|
||||
- task: NodeTool@0
|
||||
displayName: "Use Node 10.x"
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- task: Npm@1
|
||||
displayName: 'Run `npm ci`'
|
||||
inputs:
|
||||
command: custom
|
||||
verbose: false
|
||||
customCommand: ci
|
||||
|
||||
- task: AzureCLI@1
|
||||
displayName: "Pull down old report and add updates"
|
||||
inputs:
|
||||
azureSubscription: 'pj-little-sub'
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: './scripts/update-report.sh'
|
||||
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
cat /tmp/download.log
|
||||
displayName: "print download log"
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: report'
|
||||
inputs:
|
||||
PathtoPublish: ./report
|
||||
ArtifactName: report
|
||||
@@ -1,5 +0,0 @@
|
||||
# Overview
|
||||
|
||||
Collection of release definitions used in this project.
|
||||
Since release does not yet support yaml, we're exporting them for
|
||||
record keeping.
|
||||
@@ -1,535 +0,0 @@
|
||||
{
|
||||
"source": 2,
|
||||
"revision": 6,
|
||||
"description": null,
|
||||
"createdBy": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"createdOn": "2019-03-22T18:43:08.407Z",
|
||||
"modifiedBy": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"modifiedOn": "2019-04-12T21:39:14.277Z",
|
||||
"isDeleted": false,
|
||||
"variables": {},
|
||||
"variableGroups": [],
|
||||
"environments": [
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Dev",
|
||||
"rank": 1,
|
||||
"owner": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"variables": {
|
||||
"DEV_STORAGE_ACCOUNT": {
|
||||
"value": "vottdev",
|
||||
"allowOverride": true
|
||||
}
|
||||
},
|
||||
"variableGroups": [],
|
||||
"preDeployApprovals": {
|
||||
"approvals": [
|
||||
{
|
||||
"rank": 1,
|
||||
"isAutomated": true,
|
||||
"isNotificationOn": false,
|
||||
"id": 10
|
||||
}
|
||||
],
|
||||
"approvalOptions": {
|
||||
"requiredApproverCount": null,
|
||||
"releaseCreatorCanBeApprover": false,
|
||||
"autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
|
||||
"enforceIdentityRevalidation": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"executionOrder": 1
|
||||
}
|
||||
},
|
||||
"deployStep": {
|
||||
"id": 11
|
||||
},
|
||||
"postDeployApprovals": {
|
||||
"approvals": [
|
||||
{
|
||||
"rank": 1,
|
||||
"isAutomated": true,
|
||||
"isNotificationOn": false,
|
||||
"id": 12
|
||||
}
|
||||
],
|
||||
"approvalOptions": {
|
||||
"requiredApproverCount": null,
|
||||
"releaseCreatorCanBeApprover": false,
|
||||
"autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
|
||||
"enforceIdentityRevalidation": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"executionOrder": 2
|
||||
}
|
||||
},
|
||||
"deployPhases": [
|
||||
{
|
||||
"deploymentInput": {
|
||||
"parallelExecution": {
|
||||
"parallelExecutionType": 0
|
||||
},
|
||||
"skipArtifactsDownload": false,
|
||||
"artifactsDownloadInput": {
|
||||
"downloadInputs": [
|
||||
{
|
||||
"alias": "_Build Web Artifact",
|
||||
"artifactType": "Build",
|
||||
"artifactDownloadMode": "All",
|
||||
"artifactItems": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"queueId": 3,
|
||||
"demands": [],
|
||||
"enableAccessToken": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"jobCancelTimeoutInMinutes": 1,
|
||||
"condition": "succeeded()",
|
||||
"overrideInputs": {}
|
||||
},
|
||||
"rank": 1,
|
||||
"phaseType": 1,
|
||||
"name": "Deploy to dev*",
|
||||
"refName": null,
|
||||
"workflowTasks": [
|
||||
{
|
||||
"environment": {},
|
||||
"taskId": "eb72cb01-a7e5-427b-a8a1-1b31ccac8a43",
|
||||
"version": "2.*",
|
||||
"name": "AzureBlob File Copy to $(DEV_STORAGE_ACCOUNT)",
|
||||
"refName": "",
|
||||
"enabled": true,
|
||||
"alwaysRun": false,
|
||||
"continueOnError": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"definitionType": "task",
|
||||
"overrideInputs": {},
|
||||
"condition": "succeeded()",
|
||||
"inputs": {
|
||||
"SourcePath": "$(System.DefaultWorkingDirectory)/_Build Web Artifact/build",
|
||||
"ConnectedServiceNameSelector": "ConnectedServiceNameARM",
|
||||
"ConnectedServiceName": "",
|
||||
"ConnectedServiceNameARM": "28e5058e-d34a-48f3-978b-4bb47ea9e227",
|
||||
"Destination": "AzureBlob",
|
||||
"StorageAccount": "",
|
||||
"StorageAccountRM": "$(DEV_STORAGE_ACCOUNT)",
|
||||
"ContainerName": "$web",
|
||||
"BlobPrefix": "",
|
||||
"EnvironmentName": "",
|
||||
"EnvironmentNameRM": "",
|
||||
"ResourceFilteringMethod": "machineNames",
|
||||
"MachineNames": "",
|
||||
"vmsAdminUserName": "",
|
||||
"vmsAdminPassword": "",
|
||||
"TargetPath": "",
|
||||
"AdditionalArgumentsForBlobCopy": "",
|
||||
"AdditionalArgumentsForVMCopy": "",
|
||||
"enableCopyPrerequisites": "false",
|
||||
"CopyFilesInParallel": "true",
|
||||
"CleanTargetBeforeCopy": "false",
|
||||
"skipCACheck": "true",
|
||||
"outputStorageUri": "",
|
||||
"outputStorageContainerSasToken": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"environmentOptions": {
|
||||
"emailNotificationType": "OnlyOnFailure",
|
||||
"emailRecipients": "release.environment.owner;release.creator",
|
||||
"skipArtifactsDownload": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"enableAccessToken": false,
|
||||
"publishDeploymentStatus": true,
|
||||
"badgeEnabled": false,
|
||||
"autoLinkWorkItems": false,
|
||||
"pullRequestDeploymentEnabled": false
|
||||
},
|
||||
"demands": [],
|
||||
"conditions": [
|
||||
{
|
||||
"name": "ReleaseStarted",
|
||||
"conditionType": 1,
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"executionPolicy": {
|
||||
"concurrencyCount": 1,
|
||||
"queueDepthCount": 0
|
||||
},
|
||||
"schedules": [],
|
||||
"currentRelease": {
|
||||
"id": 215,
|
||||
"url": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/releases/215",
|
||||
"_links": {}
|
||||
},
|
||||
"retentionPolicy": {
|
||||
"daysToKeep": 30,
|
||||
"releasesToKeep": 3,
|
||||
"retainBuild": true
|
||||
},
|
||||
"processParameters": {
|
||||
"dataSourceBindings": [
|
||||
{
|
||||
"dataSourceName": "AzureRMWebAppNamesByAppType",
|
||||
"parameters": {
|
||||
"WebAppKind": "$(WebAppKind)"
|
||||
},
|
||||
"endpointId": "$(ConnectedServiceName)",
|
||||
"target": "WebAppName"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {},
|
||||
"preDeploymentGates": {
|
||||
"id": 0,
|
||||
"gatesOptions": null,
|
||||
"gates": []
|
||||
},
|
||||
"postDeploymentGates": {
|
||||
"id": 0,
|
||||
"gatesOptions": null,
|
||||
"gates": []
|
||||
},
|
||||
"environmentTriggers": [],
|
||||
"badgeUrl": "https://vsrm.dev.azure.com/msft-vott/_apis/public/Release/badge/4e739af6-f85e-44b9-a3f3-75eb893a6223/4/4"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "v2/master",
|
||||
"rank": 2,
|
||||
"owner": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"variables": {
|
||||
"PROD_STORAGE_ACCOUNT": {
|
||||
"value": "vott"
|
||||
}
|
||||
},
|
||||
"variableGroups": [],
|
||||
"preDeployApprovals": {
|
||||
"approvals": [
|
||||
{
|
||||
"rank": 1,
|
||||
"isAutomated": true,
|
||||
"isNotificationOn": false,
|
||||
"id": 19
|
||||
}
|
||||
],
|
||||
"approvalOptions": {
|
||||
"requiredApproverCount": null,
|
||||
"releaseCreatorCanBeApprover": false,
|
||||
"autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
|
||||
"enforceIdentityRevalidation": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"executionOrder": 1
|
||||
}
|
||||
},
|
||||
"deployStep": {
|
||||
"id": 20
|
||||
},
|
||||
"postDeployApprovals": {
|
||||
"approvals": [
|
||||
{
|
||||
"rank": 1,
|
||||
"isAutomated": true,
|
||||
"isNotificationOn": false,
|
||||
"id": 21
|
||||
}
|
||||
],
|
||||
"approvalOptions": {
|
||||
"requiredApproverCount": null,
|
||||
"releaseCreatorCanBeApprover": false,
|
||||
"autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
|
||||
"enforceIdentityRevalidation": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"executionOrder": 2
|
||||
}
|
||||
},
|
||||
"deployPhases": [
|
||||
{
|
||||
"deploymentInput": {
|
||||
"parallelExecution": {
|
||||
"parallelExecutionType": 0
|
||||
},
|
||||
"skipArtifactsDownload": false,
|
||||
"artifactsDownloadInput": {
|
||||
"downloadInputs": [
|
||||
{
|
||||
"alias": "_Build Web Artifact",
|
||||
"artifactType": "Build",
|
||||
"artifactDownloadMode": "All",
|
||||
"artifactItems": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"queueId": 3,
|
||||
"demands": [],
|
||||
"enableAccessToken": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"jobCancelTimeoutInMinutes": 1,
|
||||
"condition": "and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/v2'), eq(variables['Build.SourceBranch'], 'refs/heads/master')))",
|
||||
"overrideInputs": {}
|
||||
},
|
||||
"rank": 1,
|
||||
"phaseType": 1,
|
||||
"name": "Deploy to V2/Master",
|
||||
"refName": null,
|
||||
"workflowTasks": [
|
||||
{
|
||||
"environment": {},
|
||||
"taskId": "eb72cb01-a7e5-427b-a8a1-1b31ccac8a43",
|
||||
"version": "2.*",
|
||||
"name": "AzureBlob File Copy to $(PROD_STORAGE_ACCOUNT)",
|
||||
"refName": "",
|
||||
"enabled": true,
|
||||
"alwaysRun": false,
|
||||
"continueOnError": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"definitionType": "task",
|
||||
"overrideInputs": {},
|
||||
"condition": "succeeded()",
|
||||
"inputs": {
|
||||
"SourcePath": "$(System.DefaultWorkingDirectory)/_Build Web Artifact/build",
|
||||
"ConnectedServiceNameSelector": "ConnectedServiceNameARM",
|
||||
"ConnectedServiceName": "",
|
||||
"ConnectedServiceNameARM": "28e5058e-d34a-48f3-978b-4bb47ea9e227",
|
||||
"Destination": "AzureBlob",
|
||||
"StorageAccount": "",
|
||||
"StorageAccountRM": "$(PROD_STORAGE_ACCOUNT)",
|
||||
"ContainerName": "$web",
|
||||
"BlobPrefix": "",
|
||||
"EnvironmentName": "",
|
||||
"EnvironmentNameRM": "",
|
||||
"ResourceFilteringMethod": "machineNames",
|
||||
"MachineNames": "",
|
||||
"vmsAdminUserName": "",
|
||||
"vmsAdminPassword": "",
|
||||
"TargetPath": "",
|
||||
"AdditionalArgumentsForBlobCopy": "",
|
||||
"AdditionalArgumentsForVMCopy": "",
|
||||
"enableCopyPrerequisites": "false",
|
||||
"CopyFilesInParallel": "true",
|
||||
"CleanTargetBeforeCopy": "false",
|
||||
"skipCACheck": "true",
|
||||
"outputStorageUri": "",
|
||||
"outputStorageContainerSasToken": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"environmentOptions": {
|
||||
"emailNotificationType": "OnlyOnFailure",
|
||||
"emailRecipients": "release.environment.owner;release.creator",
|
||||
"skipArtifactsDownload": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"enableAccessToken": false,
|
||||
"publishDeploymentStatus": true,
|
||||
"badgeEnabled": false,
|
||||
"autoLinkWorkItems": false,
|
||||
"pullRequestDeploymentEnabled": false
|
||||
},
|
||||
"demands": [],
|
||||
"conditions": [
|
||||
{
|
||||
"name": "Dev",
|
||||
"conditionType": 2,
|
||||
"value": "4"
|
||||
},
|
||||
{
|
||||
"name": "_Build Web Artifact",
|
||||
"conditionType": 4,
|
||||
"value": "{\"sourceBranch\":\"master\",\"tags\":[],\"useBuildDefinitionBranch\":false,\"createReleaseOnBuildTagging\":false,\"tagFilter\":null}"
|
||||
}
|
||||
],
|
||||
"executionPolicy": {
|
||||
"concurrencyCount": 1,
|
||||
"queueDepthCount": 0
|
||||
},
|
||||
"schedules": [],
|
||||
"currentRelease": {
|
||||
"id": 0,
|
||||
"url": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/releases/0",
|
||||
"_links": {}
|
||||
},
|
||||
"retentionPolicy": {
|
||||
"daysToKeep": 30,
|
||||
"releasesToKeep": 3,
|
||||
"retainBuild": true
|
||||
},
|
||||
"processParameters": {
|
||||
"dataSourceBindings": [
|
||||
{
|
||||
"dataSourceName": "AzureRMWebAppNamesByAppType",
|
||||
"parameters": {
|
||||
"WebAppKind": "$(WebAppKind)"
|
||||
},
|
||||
"endpointId": "$(ConnectedServiceName)",
|
||||
"target": "WebAppName"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {},
|
||||
"preDeploymentGates": {
|
||||
"id": 0,
|
||||
"gatesOptions": null,
|
||||
"gates": []
|
||||
},
|
||||
"postDeploymentGates": {
|
||||
"id": 0,
|
||||
"gatesOptions": null,
|
||||
"gates": []
|
||||
},
|
||||
"environmentTriggers": [],
|
||||
"badgeUrl": "https://vsrm.dev.azure.com/msft-vott/_apis/public/Release/badge/4e739af6-f85e-44b9-a3f3-75eb893a6223/4/7"
|
||||
}
|
||||
],
|
||||
"artifacts": [
|
||||
{
|
||||
"sourceId": "4e739af6-f85e-44b9-a3f3-75eb893a6223:36",
|
||||
"type": "Build",
|
||||
"alias": "_Build Web Artifact",
|
||||
"definitionReference": {
|
||||
"artifactSourceDefinitionUrl": {
|
||||
"id": "https://dev.azure.com/msft-vott/_permalink/_build/index?collectionId=2f887b33-5e65-447a-a189-049f04641d6d&projectId=4e739af6-f85e-44b9-a3f3-75eb893a6223&definitionId=36",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionBranch": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionSpecific": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionTags": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionType": {
|
||||
"id": "latestType",
|
||||
"name": "Latest"
|
||||
},
|
||||
"definition": {
|
||||
"id": "36",
|
||||
"name": "Build Web Artifact"
|
||||
},
|
||||
"definitions": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"IsMultiDefinitionType": {
|
||||
"id": "False",
|
||||
"name": "False"
|
||||
},
|
||||
"project": {
|
||||
"id": "4e739af6-f85e-44b9-a3f3-75eb893a6223",
|
||||
"name": "VoTT"
|
||||
},
|
||||
"repository": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"isPrimary": true,
|
||||
"isRetained": false
|
||||
}
|
||||
],
|
||||
"triggers": [
|
||||
{
|
||||
"artifactAlias": "_Build Web Artifact",
|
||||
"triggerConditions": [
|
||||
{
|
||||
"sourceBranch": "dev*",
|
||||
"tags": [],
|
||||
"useBuildDefinitionBranch": false,
|
||||
"createReleaseOnBuildTagging": false
|
||||
},
|
||||
{
|
||||
"sourceBranch": "v2",
|
||||
"tags": [],
|
||||
"useBuildDefinitionBranch": false,
|
||||
"createReleaseOnBuildTagging": false
|
||||
},
|
||||
{
|
||||
"sourceBranch": "master",
|
||||
"tags": [],
|
||||
"useBuildDefinitionBranch": false,
|
||||
"createReleaseOnBuildTagging": false
|
||||
}
|
||||
],
|
||||
"triggerType": 1
|
||||
}
|
||||
],
|
||||
"releaseNameFormat": "Release-$(rev:r)",
|
||||
"tags": [],
|
||||
"pipelineProcess": {
|
||||
"type": 1
|
||||
},
|
||||
"properties": {
|
||||
"DefinitionCreationSource": {
|
||||
"$type": "System.String",
|
||||
"$value": "ReleaseClone"
|
||||
}
|
||||
},
|
||||
"id": 4,
|
||||
"name": "VoTT - Deploy to Web",
|
||||
"path": "\\",
|
||||
"projectReference": null,
|
||||
"url": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/definitions/4",
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/definitions/4"
|
||||
},
|
||||
"web": {
|
||||
"href": "https://dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_release?definitionId=4"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,329 +0,0 @@
|
||||
{
|
||||
"source": 2,
|
||||
"revision": 8,
|
||||
"description": "copy artifact to azure blob hosting plato report for VoTT",
|
||||
"createdBy": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"createdOn": "2019-03-25T22:52:29.780Z",
|
||||
"modifiedBy": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"modifiedOn": "2019-04-12T22:29:15.590Z",
|
||||
"isDeleted": false,
|
||||
"variables": {
|
||||
"STORAGE_ACCOUNT": {
|
||||
"value": "vottv2",
|
||||
"allowOverride": true
|
||||
}
|
||||
},
|
||||
"variableGroups": [],
|
||||
"environments": [
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Upload Report",
|
||||
"rank": 1,
|
||||
"owner": {
|
||||
"displayName": "My Ho 🥓🥐🍚",
|
||||
"url": "https://app.vssps.visualstudio.com/Af945f528-1155-48f8-b08b-b6529166b9f0/_apis/Identities/1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"_links": {
|
||||
"avatar": {
|
||||
"href": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
}
|
||||
},
|
||||
"id": "1077cc21-332d-415a-8e93-e6277da44f6d",
|
||||
"uniqueName": "myho@microsoft.com",
|
||||
"imageUrl": "https://dev.azure.com/msft-vott/_apis/GraphProfile/MemberAvatars/aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1",
|
||||
"descriptor": "aad.MTRlNGE0YjQtNDU5NS03OGI5LTk2MmItNTM0ZjNjYjUxMWI1"
|
||||
},
|
||||
"variables": {},
|
||||
"variableGroups": [],
|
||||
"preDeployApprovals": {
|
||||
"approvals": [
|
||||
{
|
||||
"rank": 1,
|
||||
"isAutomated": true,
|
||||
"isNotificationOn": false,
|
||||
"id": 16
|
||||
}
|
||||
],
|
||||
"approvalOptions": {
|
||||
"requiredApproverCount": null,
|
||||
"releaseCreatorCanBeApprover": false,
|
||||
"autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
|
||||
"enforceIdentityRevalidation": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"executionOrder": 1
|
||||
}
|
||||
},
|
||||
"deployStep": {
|
||||
"id": 17
|
||||
},
|
||||
"postDeployApprovals": {
|
||||
"approvals": [
|
||||
{
|
||||
"rank": 1,
|
||||
"isAutomated": true,
|
||||
"isNotificationOn": false,
|
||||
"id": 18
|
||||
}
|
||||
],
|
||||
"approvalOptions": {
|
||||
"requiredApproverCount": null,
|
||||
"releaseCreatorCanBeApprover": false,
|
||||
"autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped": false,
|
||||
"enforceIdentityRevalidation": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"executionOrder": 2
|
||||
}
|
||||
},
|
||||
"deployPhases": [
|
||||
{
|
||||
"deploymentInput": {
|
||||
"parallelExecution": {
|
||||
"parallelExecutionType": 0
|
||||
},
|
||||
"skipArtifactsDownload": false,
|
||||
"artifactsDownloadInput": {
|
||||
"downloadInputs": [
|
||||
{
|
||||
"alias": "_VoTT - Generate latest plato report",
|
||||
"artifactType": "Build",
|
||||
"artifactDownloadMode": "All",
|
||||
"artifactItems": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"queueId": 3,
|
||||
"demands": [],
|
||||
"enableAccessToken": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"jobCancelTimeoutInMinutes": 1,
|
||||
"condition": "succeeded()",
|
||||
"overrideInputs": {}
|
||||
},
|
||||
"rank": 1,
|
||||
"phaseType": 1,
|
||||
"name": "Upload Report",
|
||||
"refName": null,
|
||||
"workflowTasks": [
|
||||
{
|
||||
"environment": {},
|
||||
"taskId": "eb72cb01-a7e5-427b-a8a1-1b31ccac8a43",
|
||||
"version": "2.*",
|
||||
"name": "AzureBlob File Copy To $(STORAGE_ACCOUNT)",
|
||||
"refName": "",
|
||||
"enabled": true,
|
||||
"alwaysRun": false,
|
||||
"continueOnError": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"definitionType": "task",
|
||||
"overrideInputs": {},
|
||||
"condition": "succeeded()",
|
||||
"inputs": {
|
||||
"SourcePath": "$(System.DefaultWorkingDirectory)/_VoTT - Generate latest plato report/report",
|
||||
"ConnectedServiceNameSelector": "ConnectedServiceNameARM",
|
||||
"ConnectedServiceName": "",
|
||||
"ConnectedServiceNameARM": "28e5058e-d34a-48f3-978b-4bb47ea9e227",
|
||||
"Destination": "AzureBlob",
|
||||
"StorageAccount": "",
|
||||
"StorageAccountRM": "$(STORAGE_ACCOUNT)",
|
||||
"ContainerName": "$web",
|
||||
"BlobPrefix": "",
|
||||
"EnvironmentName": "",
|
||||
"EnvironmentNameRM": "",
|
||||
"ResourceFilteringMethod": "machineNames",
|
||||
"MachineNames": "",
|
||||
"vmsAdminUserName": "",
|
||||
"vmsAdminPassword": "",
|
||||
"TargetPath": "",
|
||||
"AdditionalArgumentsForBlobCopy": "",
|
||||
"AdditionalArgumentsForVMCopy": "",
|
||||
"enableCopyPrerequisites": "false",
|
||||
"CopyFilesInParallel": "true",
|
||||
"CleanTargetBeforeCopy": "false",
|
||||
"skipCACheck": "true",
|
||||
"outputStorageUri": "",
|
||||
"outputStorageContainerSasToken": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"environmentOptions": {
|
||||
"emailNotificationType": "OnlyOnFailure",
|
||||
"emailRecipients": "release.environment.owner;release.creator",
|
||||
"skipArtifactsDownload": false,
|
||||
"timeoutInMinutes": 0,
|
||||
"enableAccessToken": false,
|
||||
"publishDeploymentStatus": true,
|
||||
"badgeEnabled": false,
|
||||
"autoLinkWorkItems": false,
|
||||
"pullRequestDeploymentEnabled": false
|
||||
},
|
||||
"demands": [],
|
||||
"conditions": [
|
||||
{
|
||||
"name": "ReleaseStarted",
|
||||
"conditionType": 1,
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"executionPolicy": {
|
||||
"concurrencyCount": 1,
|
||||
"queueDepthCount": 0
|
||||
},
|
||||
"schedules": [],
|
||||
"currentRelease": {
|
||||
"id": 216,
|
||||
"url": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/releases/216",
|
||||
"_links": {}
|
||||
},
|
||||
"retentionPolicy": {
|
||||
"daysToKeep": 30,
|
||||
"releasesToKeep": 3,
|
||||
"retainBuild": true
|
||||
},
|
||||
"processParameters": {
|
||||
"dataSourceBindings": [
|
||||
{
|
||||
"dataSourceName": "AzureRMWebAppNamesByAppType",
|
||||
"parameters": {
|
||||
"WebAppKind": "$(WebAppKind)"
|
||||
},
|
||||
"endpointId": "$(ConnectedServiceName)",
|
||||
"target": "WebAppName"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {},
|
||||
"preDeploymentGates": {
|
||||
"id": 0,
|
||||
"gatesOptions": null,
|
||||
"gates": []
|
||||
},
|
||||
"postDeploymentGates": {
|
||||
"id": 0,
|
||||
"gatesOptions": null,
|
||||
"gates": []
|
||||
},
|
||||
"environmentTriggers": [],
|
||||
"badgeUrl": "https://vsrm.dev.azure.com/msft-vott/_apis/public/Release/badge/4e739af6-f85e-44b9-a3f3-75eb893a6223/6/6"
|
||||
}
|
||||
],
|
||||
"artifacts": [
|
||||
{
|
||||
"sourceId": "4e739af6-f85e-44b9-a3f3-75eb893a6223:41",
|
||||
"type": "Build",
|
||||
"alias": "_VoTT - Generate latest plato report",
|
||||
"definitionReference": {
|
||||
"artifactSourceDefinitionUrl": {
|
||||
"id": "https://dev.azure.com/msft-vott/_permalink/_build/index?collectionId=2f887b33-5e65-447a-a189-049f04641d6d&projectId=4e739af6-f85e-44b9-a3f3-75eb893a6223&definitionId=41",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionBranch": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionSpecific": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionTags": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"defaultVersionType": {
|
||||
"id": "latestType",
|
||||
"name": "Latest"
|
||||
},
|
||||
"definition": {
|
||||
"id": "41",
|
||||
"name": "VoTT - Generate latest plato report"
|
||||
},
|
||||
"definitions": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
},
|
||||
"IsMultiDefinitionType": {
|
||||
"id": "False",
|
||||
"name": "False"
|
||||
},
|
||||
"project": {
|
||||
"id": "4e739af6-f85e-44b9-a3f3-75eb893a6223",
|
||||
"name": "VoTT"
|
||||
},
|
||||
"repository": {
|
||||
"id": "",
|
||||
"name": ""
|
||||
}
|
||||
},
|
||||
"isPrimary": true,
|
||||
"isRetained": false
|
||||
}
|
||||
],
|
||||
"triggers": [
|
||||
{
|
||||
"artifactAlias": "_VoTT - Generate latest plato report",
|
||||
"triggerConditions": [
|
||||
{
|
||||
"sourceBranch": "dev*",
|
||||
"tags": [],
|
||||
"useBuildDefinitionBranch": false,
|
||||
"createReleaseOnBuildTagging": false
|
||||
},
|
||||
{
|
||||
"sourceBranch": "master",
|
||||
"tags": [],
|
||||
"useBuildDefinitionBranch": false,
|
||||
"createReleaseOnBuildTagging": false
|
||||
}
|
||||
],
|
||||
"triggerType": 1
|
||||
}
|
||||
],
|
||||
"releaseNameFormat": "Release-$(Date:MMddyy).$(Date:hhmm)-$(rev:r)",
|
||||
"tags": [],
|
||||
"pipelineProcess": {
|
||||
"type": 1
|
||||
},
|
||||
"properties": {
|
||||
"DefinitionCreationSource": {
|
||||
"$type": "System.String",
|
||||
"$value": "ReleaseClone"
|
||||
}
|
||||
},
|
||||
"id": 6,
|
||||
"name": "VoTT - Upload Plato Report",
|
||||
"path": "\\",
|
||||
"projectReference": null,
|
||||
"url": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/definitions/6",
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "https://vsrm.dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_apis/Release/definitions/6"
|
||||
},
|
||||
"web": {
|
||||
"href": "https://dev.azure.com/msft-vott/4e739af6-f85e-44b9-a3f3-75eb893a6223/_release?definitionId=6"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ jobs:
|
||||
pool: ${{ parameters.pool }}
|
||||
timeoutInMinutes: 15 # how long to run the job before automatically cancelling
|
||||
steps:
|
||||
- template: git-pull-current-branch.yml
|
||||
|
||||
- task: NodeTool@0
|
||||
displayName: 'Use Node 10.x'
|
||||
inputs:
|
||||
|
||||
@@ -1,32 +1,96 @@
|
||||
parameters:
|
||||
GitHubConnection: '' # defaults for any parameters that aren't specified
|
||||
repositoryName: ''
|
||||
releaseNotesSource: input
|
||||
addChangeLog: false
|
||||
isPreRelease: true
|
||||
isDraft: true
|
||||
parameters:
|
||||
GitHubConnection: '' # defaults for any parameters that aren't specified
|
||||
repositoryName: ''
|
||||
isPreRelease: false
|
||||
isDraft: false
|
||||
|
||||
jobs:
|
||||
- template: build-artifact.yml
|
||||
parameters:
|
||||
name: LinuxArtifact
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
os: linux
|
||||
artifact: vott*.snap
|
||||
|
||||
- template: build-artifact.yml
|
||||
parameters:
|
||||
name: WindowsArtifact
|
||||
pool:
|
||||
vmImage: "windows-2019"
|
||||
os: windows
|
||||
artifact: vott*.exe
|
||||
|
||||
- template: build-artifact.yml
|
||||
parameters:
|
||||
name: MacOSArtifact
|
||||
pool:
|
||||
vmImage: macOS-10.15
|
||||
os: mac
|
||||
artifact: vott*.dmg
|
||||
|
||||
jobs:
|
||||
- job: Create_Github_Release
|
||||
timeoutInMinutes: 30 # timeout on job if deploy is not completed in 30 minutes
|
||||
dependsOn:
|
||||
- LinuxArtifact
|
||||
- WindowsArtifact
|
||||
- MacOSArtifact
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
|
||||
steps:
|
||||
- checkout: none # we already have the artifacts built, don't need the code
|
||||
|
||||
- download: current
|
||||
- template: git-pull-current-branch.yml
|
||||
|
||||
- task: GitHubRelease@0
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
echo
|
||||
echo "======> Set commit sha"
|
||||
COMMIT_SHA=$(git rev-parse --short HEAD)
|
||||
echo "COMMIT SHA: $COMMIT_SHA"
|
||||
echo "##vso[task.setvariable variable=COMMIT_SHA]$COMMIT_SHA"
|
||||
|
||||
###
|
||||
# These variables were set in the "Version Bump" stage. There are
|
||||
# currently no way to pass variables between stages, hence this workaround.
|
||||
###
|
||||
echo
|
||||
echo "======> Set version variables"
|
||||
CURRENT_VERSION=$(cat $(Pipeline.Workspace)/variables/CURRENT_VERSION)
|
||||
echo "##vso[task.setvariable variable=CURRENT_VERSION]$CURRENT_VERSION"
|
||||
|
||||
NEXT_VERSION=$(cat $(Pipeline.Workspace)/variables/NEXT_VERSION)
|
||||
echo "##vso[task.setvariable variable=NEXT_VERSION]$NEXT_VERSION"
|
||||
displayName: "Set variables for release task"
|
||||
|
||||
- task: GitHubRelease@1
|
||||
displayName: 'GitHub release (create)'
|
||||
inputs:
|
||||
gitHubConnection: ${{ parameters.GitHubConnection }}
|
||||
repositoryName: ${{ parameters.repositoryName }}
|
||||
releaseNotesSource: ${{ parameters.releaseNotesSource }}
|
||||
target: $(Build.SourceBranch)
|
||||
repositoryName: '$(Build.Repository.Name)'
|
||||
action: 'create'
|
||||
target: '$(Build.SourceBranch)'
|
||||
tagSource: 'userSpecifiedTag'
|
||||
tag: $(NEXT_VERSION)
|
||||
releaseNotesSource: 'inline'
|
||||
releaseNotesInline: |
|
||||
## Web Release
|
||||
### Dev
|
||||
$(DEV_URL)
|
||||
|
||||
### Prod
|
||||
$(PROD_URL)
|
||||
|
||||
## Docs
|
||||
https://github.com/Microsoft/VoTT/blob/$(Build.SourceBranch)/README.md
|
||||
assets: |
|
||||
../linux/*
|
||||
../windows/*
|
||||
../mac/*
|
||||
addChangeLog: ${{ parameters.addChangeLog }}
|
||||
isDraft: true # for testing, change to true when ready to merge
|
||||
isDraft: ${{ parameters.isDraft }}
|
||||
isPreRelease: ${{ parameters.isPrelease }}
|
||||
changeLogCompareToRelease: 'lastNonDraftReleaseByTag'
|
||||
changeLogCompareToReleaseTag: $(CURRENT_VERSION)
|
||||
changeLogType: 'commitBased'
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
jobs:
|
||||
- job: "Web_Release"
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
|
||||
steps:
|
||||
- template: git-pull-current-branch.yml
|
||||
|
||||
- task: NodeTool@0
|
||||
displayName: 'Use Node 10.x'
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- task: Npm@1
|
||||
displayName: 'npm ci'
|
||||
inputs:
|
||||
command: custom
|
||||
workingDir: .
|
||||
verbose: false
|
||||
customCommand: ci
|
||||
|
||||
- task: Bash@3
|
||||
displayName: 'Create artifact'
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: './scripts/generate-web-artifact.sh'
|
||||
|
||||
- task: AzureFileCopy@3
|
||||
displayName: 'AzureBlob File Copy to $DEV_STORAGE_ACCOUNT'
|
||||
inputs:
|
||||
SourcePath: './build'
|
||||
azureSubscription: $(azureSubscription)
|
||||
destination: azureBlob
|
||||
storage: $(DEV_STORAGE_ACCOUNT)
|
||||
containerName: '$web'
|
||||
|
||||
- task: AzureFileCopy@3
|
||||
displayName: 'AzureBlob File Copy to $PROD_STORAGE_ACCOUNT'
|
||||
inputs:
|
||||
SourcePath: './build'
|
||||
azureSubscription: $(azureSubscription)
|
||||
destination: azureBlob
|
||||
storage: $(PROD_STORAGE_ACCOUNT)
|
||||
containerName: '$web'
|
||||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
||||
|
||||
- bash: |
|
||||
echo
|
||||
echo "Dev url: $DEV_URL"
|
||||
displayName: "Dev URL"
|
||||
|
||||
- bash: |
|
||||
echo
|
||||
echo "Prod url: $PROD_URL"
|
||||
displayName: "Prod URL"
|
||||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
||||
@@ -0,0 +1,8 @@
|
||||
steps:
|
||||
- task: Bash@3
|
||||
displayName: 'Pull latest from branch'
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: './scripts/git-pull-current-branch.sh'
|
||||
env:
|
||||
SOURCE_BRANCH: $(Build.SourceBranch)
|
||||
@@ -0,0 +1,60 @@
|
||||
parameters:
|
||||
versionType: ''
|
||||
|
||||
jobs:
|
||||
- job: "version_bump"
|
||||
|
||||
variables:
|
||||
- group: GitHub-Deploy-Creds
|
||||
|
||||
timeoutInMinutes: 30 # timeout on job if deploy is not completed in 30 minutes
|
||||
cancelTimeoutInMinutes: 1 # time limit to wait for job to cancel
|
||||
|
||||
pool:
|
||||
vmImage: macOS-latest # ssh key was generated on a Mac so using the same type of OS here
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
displayName: 'Install Node.js'
|
||||
|
||||
# Download secure file
|
||||
# Download a secure file to the agent machine
|
||||
- task: DownloadSecureFile@1
|
||||
# name: sshKey # The name with which to reference the secure file's path on the agent, like $(mySecureFile.secureFilePath)
|
||||
inputs:
|
||||
secureFile: vott_id_rsa
|
||||
|
||||
# Install an SSH key prior to a build or deployment
|
||||
- task: InstallSSHKey@0 # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-ssh-key?view=azure-devops
|
||||
inputs:
|
||||
knownHostsEntry: $(KNOWN_HOSTS_ENTRY)
|
||||
sshPublicKey: $(SSH_PUBLIC_KEY)
|
||||
#sshPassphrase: # Optional
|
||||
sshKeySecureFile: vott_id_rsa
|
||||
env:
|
||||
KNOWN_HOSTS_ENTRY: $(KNOWN_HOSTS_ENTRY)
|
||||
SSH_PUBLIC_KEY: $(SSH_PUBLIC_KEY) # map to the right format (camelCase) that Azure credentials understand
|
||||
|
||||
- task: Bash@3
|
||||
name: BumpNpmVersion
|
||||
displayName: Bump NPM Version
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: ./scripts/version-bump-commit.sh
|
||||
arguments:
|
||||
${{ parameters.versionType }}
|
||||
env:
|
||||
SOURCE_BRANCH: $(Build.SourceBranch)
|
||||
|
||||
- bash: |
|
||||
printenv | sort
|
||||
mkdir -p $(System.DefaultWorkingDirectory)/variables
|
||||
echo "$NEXT_VERSION" > $(System.DefaultWorkingDirectory)/variables/NEXT_VERSION
|
||||
echo "$CURRENT_VERSION" > $(System.DefaultWorkingDirectory)/variables/CURRENT_VERSION
|
||||
displayName: "Prep variables for publishing"
|
||||
|
||||
# Publish the variables folder as pipeline artifact
|
||||
- publish: $(System.DefaultWorkingDirectory)/variables
|
||||
artifact: variables
|
||||
@@ -0,0 +1,74 @@
|
||||
name: $(Date:yyyyMMdd).$(Hours)$(Minutes)$(Seconds)
|
||||
variables:
|
||||
AZURE_STORAGE_ACCOUNT: vottv2
|
||||
azureSubscription: 'pj-little-sub'
|
||||
REPORT_URL: 'https://vottv2.z22.web.core.windows.net/'
|
||||
|
||||
trigger:
|
||||
- dev*
|
||||
- master
|
||||
|
||||
pr: none # disable CI build for PR
|
||||
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
COMMIT_SHA=`echo ${BUILD_SOURCEVERSION} | cut -c1-8`
|
||||
echo "sha: " $COMMIT_SHA
|
||||
|
||||
# rewrite build number
|
||||
echo "##vso[build.updatebuildnumber]Report-${COMMIT_SHA}-${BUILD_BUILDNUMBER}"
|
||||
displayName: "Rewrite build number"
|
||||
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
ACCOUNT=$(AZURE_STORAGE_ACCOUNT)
|
||||
if [[ -z "${ACCOUNT}" ]]; then
|
||||
echo "Need to set AZURE_STORAGE_ACCOUNT"
|
||||
exit 1
|
||||
fi
|
||||
displayName: "Verify storage account cred exists"
|
||||
|
||||
- task: NodeTool@0
|
||||
displayName: "Use Node 10.x"
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- task: Npm@1
|
||||
displayName: 'Run `npm ci`'
|
||||
inputs:
|
||||
command: custom
|
||||
verbose: false
|
||||
customCommand: ci
|
||||
|
||||
- task: AzureCLI@1
|
||||
displayName: "Pull down old report and add updates"
|
||||
inputs:
|
||||
azureSubscription: $(azureSubscription)
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: './scripts/update-report.sh'
|
||||
|
||||
- bash: |
|
||||
set -e
|
||||
|
||||
cat /tmp/download.log
|
||||
displayName: "print download log"
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- task: AzureFileCopy@3
|
||||
displayName: 'AzureBlob File Copy to $(AZURE_STORAGE_ACCOUNT)'
|
||||
inputs:
|
||||
SourcePath: './report'
|
||||
azureSubscription: $(azureSubscription)
|
||||
destination: azureBlob
|
||||
storage: $(AZURE_STORAGE_ACCOUNT)
|
||||
containerName: '$web'
|
||||
|
||||
- bash: |
|
||||
echo "See report: $(REPORT_URL) "
|
||||
displayName: "Report URl"
|
||||
@@ -1,35 +0,0 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- dev*
|
||||
- master
|
||||
pr: none # disable CI build for PR
|
||||
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: 'Use Node 10.x'
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- task: Npm@1
|
||||
displayName: 'npm ci'
|
||||
inputs:
|
||||
command: custom
|
||||
workingDir: .
|
||||
verbose: false
|
||||
customCommand: ci
|
||||
|
||||
- task: Bash@3
|
||||
displayName: 'Create artifact'
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: './scripts/generate-web-artifact.sh'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: build'
|
||||
inputs:
|
||||
PathtoPublish: ./build
|
||||
ArtifactName: build
|
||||
@@ -1,24 +0,0 @@
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: 'Use Node 10.x'
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
|
||||
- bash: |
|
||||
set -ex
|
||||
|
||||
# clean install
|
||||
npm ci
|
||||
npm run release-ci
|
||||
|
||||
mkdir -p windows
|
||||
cp releases/vott*.exe windows/
|
||||
|
||||
displayName: Build
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: windows'
|
||||
inputs:
|
||||
PathtoPublish: windows
|
||||
ArtifactName: windows
|
||||
|
||||
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 87 KiB |
gerado
+1369
-549
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
+1
-1
@@ -113,7 +113,7 @@
|
||||
"@types/redux-mock-store": "^1.0.0",
|
||||
"cross-env": "^5.2.0",
|
||||
"electron": "^3.0.13",
|
||||
"electron-builder": "^20.38.3",
|
||||
"electron-builder": "^22.6.0",
|
||||
"enzyme": "^3.7.0",
|
||||
"enzyme-adapter-react-16": "^1.7.0",
|
||||
"foreman": "^3.0.1",
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
trigger: none # manual queue only when we're ready to release
|
||||
pr: none # disable CI build for PR
|
||||
|
||||
stages:
|
||||
- stage: version_bump_commit
|
||||
jobs:
|
||||
- job: "version_bump"
|
||||
|
||||
variables:
|
||||
- group: GitHub-Deploy-Creds
|
||||
|
||||
timeoutInMinutes: 30 # timeout on job if deploy is not completed in 30 minutes
|
||||
cancelTimeoutInMinutes: 1 # time limit to wait for job to cancel
|
||||
|
||||
pool:
|
||||
vmImage: macOS-10.15 # ssh key was generated on a Mac so using the same type of OS here
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: 10.x
|
||||
displayName: 'Install Node.js'
|
||||
|
||||
# Download secure file
|
||||
# Download a secure file to the agent machine
|
||||
- task: DownloadSecureFile@1
|
||||
# name: sshKey # The name with which to reference the secure file's path on the agent, like $(mySecureFile.secureFilePath)
|
||||
inputs:
|
||||
secureFile: vott_id_rsa
|
||||
|
||||
# Install an SSH key prior to a build or deployment
|
||||
- task: InstallSSHKey@0 # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-ssh-key?view=azure-devops
|
||||
inputs:
|
||||
knownHostsEntry: $(KNOWN_HOSTS_ENTRY)
|
||||
sshPublicKey: $(SSH_PUBLIC_KEY)
|
||||
#sshPassphrase: # Optional
|
||||
sshKeySecureFile: vott_id_rsa
|
||||
env:
|
||||
KNOWN_HOSTS_ENTRY: $(KNOWN_HOSTS_ENTRY)
|
||||
SSH_PUBLIC_KEY: $(SSH_PUBLIC_KEY) # map to the right format (camelCase) that Azure credentials understand
|
||||
|
||||
- task: Bash@3
|
||||
name: BumpNpmVersion
|
||||
displayName: Bump NPM Prerelease Version
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: ./scripts/version-bump-commit.sh
|
||||
env:
|
||||
SOURCE_BRANCH: $(Build.SourceBranch)
|
||||
|
||||
- stage: package_build
|
||||
dependsOn: version_bump_commit
|
||||
jobs:
|
||||
- template: azure-pipelines/templates/build-artifact.yml
|
||||
parameters:
|
||||
name: Linux
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
os: linux
|
||||
artifact: vott*.snap
|
||||
|
||||
- template: azure-pipelines/templates/build-artifact.yml
|
||||
parameters:
|
||||
name: Windows
|
||||
pool:
|
||||
vmImage: "windows-2019"
|
||||
os: windows
|
||||
artifact: vott*.exe
|
||||
|
||||
- template: azure-pipelines/templates/build-artifact.yml
|
||||
parameters:
|
||||
name: MacOS
|
||||
pool:
|
||||
vmImage: macOS-10.15
|
||||
os: mac
|
||||
artifact: vott*.dmg
|
||||
|
||||
- stage: github_release
|
||||
dependsOn: package_build
|
||||
jobs:
|
||||
- template: azure-pipelines/templates/create-github-release.yml
|
||||
parameters:
|
||||
GitHubConnection: 'GitHub connection' # defaults for any parameters that aren't specified
|
||||
repositoryName: 'Microsoft/VoTT'
|
||||
releaseNotesSource: input
|
||||
addChangeLog: false
|
||||
isPreRelease: true
|
||||
isDraft: false
|
||||
@@ -1,34 +0,0 @@
|
||||
trigger:
|
||||
- refs/tags/* # trigger on any tag
|
||||
pr: none # disable CI build for PR
|
||||
|
||||
jobs:
|
||||
- job: Linux
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
|
||||
steps:
|
||||
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
|
||||
fetchDepth: 1 # the depth of commits to ask Git to fetch
|
||||
- template: azure-pipelines/linux/artifact-build-linux.yml
|
||||
|
||||
- job: MacOS
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: macOS-10.15
|
||||
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
|
||||
steps:
|
||||
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
|
||||
fetchDepth: 1 # the depth of commits to ask Git to fetch
|
||||
- template: azure-pipelines/mac/artifact-build-mac.yml
|
||||
|
||||
- job: Windows
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: "windows-2019"
|
||||
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
|
||||
steps:
|
||||
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
|
||||
fetchDepth: 1 # the depth of commits to ask Git to fetch
|
||||
- template: azure-pipelines/windows/artifact-build-windows.yml
|
||||
@@ -49,8 +49,15 @@ echo "commit=${COMMIT_SHA}"
|
||||
# these are just needed for the reports; just install ad-hoc and don't save to package.json
|
||||
npm install es6-plato eslint-plugin-react command-line-args --no-save
|
||||
|
||||
echo
|
||||
echo "------> Finish installing dependencies"
|
||||
|
||||
echo
|
||||
echo "------> Transpile TS to ES6"
|
||||
# we can't do complexity analysis on TypeScript directly; transpile to ES6
|
||||
rm -rf ${ES6_SRC}
|
||||
tsc --noEmit false --outDir ${ES6_SRC}
|
||||
|
||||
echo
|
||||
echo "------> Running complexity analasis ..."
|
||||
node ${BASEDIR}/complexity-analysis.js --src ${ES6_SRC} --output ${REPORT_DIR} --version ${VERSION} --commit ${COMMIT_SHA}
|
||||
|
||||
Arquivo executável
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Get full branch name excluding refs/head from the env var SOURCE_BRANCH
|
||||
SOURCE_BRANCH_NAME=${SOURCE_BRANCH/refs\/heads\/}
|
||||
|
||||
echo "SOURCE_BRANCH: ${SOURCE_BRANCH_NAME}"
|
||||
git pull origin ${SOURCE_BRANCH_NAME}
|
||||
git checkout ${SOURCE_BRANCH_NAME}
|
||||
echo "Checked out branch: ${SOURCE_BRANCH_NAME}"
|
||||
Arquivo normal → Arquivo executável
+18
-6
@@ -1,12 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
NPM_RELEASE_TYPE=${1-"prepatch --preid=preview"}
|
||||
NPM_VERSION_TYPE=${1:-"prepatch --preid=preview"}
|
||||
echo "Next version type: ----->$NPM_VERSION_TYPE<-----"
|
||||
|
||||
PACKAGE_VERSION=$(node -pe "require('./package.json').version")
|
||||
CURRENT_VERSION="v$PACKAGE_VERSION"
|
||||
|
||||
# Get full branch name excluding refs/head from the env var SOURCE_BRANCH
|
||||
SOURCE_BRANCH_NAME=${SOURCE_BRANCH/refs\/heads\/}
|
||||
|
||||
# Configure git to commit as SLS Azure Functions Service Account
|
||||
# Configure git to commit as VoTT Service Account
|
||||
echo "Configuring git to use deploy key..."
|
||||
git config --local user.email "vott@microsoft.com"
|
||||
git config --local user.name "Vott"
|
||||
@@ -16,13 +20,21 @@ git pull origin ${SOURCE_BRANCH_NAME}
|
||||
git checkout ${SOURCE_BRANCH_NAME}
|
||||
echo "Checked out branch: ${SOURCE_BRANCH_NAME}"
|
||||
|
||||
NPM_VERSION=`npm version ${NPM_RELEASE_TYPE} -m "release: Update ${NPM_RELEASE_TYPE} version to %s ***NO_CI***"`
|
||||
echo "Set NPM version to: ${NPM_VERSION}"
|
||||
## format: v2.2.0
|
||||
NEXT_VERSION=`npm version ${NPM_VERSION_TYPE} -m "release: Update ${NPM_VERSION_TYPE} version to %s ***NO_CI***"`
|
||||
echo "Set next version to: ${NEXT_VERSION}"
|
||||
|
||||
# There is currently no way to pass variables between stages, hence this workaround
|
||||
echo
|
||||
echo "##vso[task.setvariable variable=NEXT_VERSION]$NEXT_VERSION"
|
||||
echo "##vso[task.setvariable variable=CURRENT_VERSION]$CURRENT_VERSION"
|
||||
|
||||
#### Push new tag
|
||||
SHA=`git rev-parse HEAD`
|
||||
|
||||
export GIT_SSH_COMMAND="ssh -vvv -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||
git remote add authOrigin git@github.com:microsoft/VoTT.git
|
||||
git push authOrigin ${SOURCE_BRANCH_NAME} --tags
|
||||
|
||||
echo "Pushed new tag: ${NPM_VERSION} @ SHA: ${SHA:0:8}"
|
||||
echo
|
||||
echo "Pushed new tag: ${NEXT_VERSION} @ SHA: ${SHA:0:8}"
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário