-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move testing dependent projects from a script to Azure Devops Pipeline (
#357) * Disable ms-rest-azure-js tests * Refactor script * Add debug statement * Change test command * Remove command line arguments * Rename command * Split the script * Add directory creation * Combine jobs * Refactor script * Remove workdir * Add pwd script * Change variable name * Split jobs * Add additional logging * Add additional logging * Add ls -a * Combine jobs * Add copying artifacts * Move artifact to a folder * Move artifact to a folder * Rename artifact * Add npm pack * Add ls -a * Fix path * Add predefined variable * Introduce variables * Fix missing variable * Add autorest.typescript testing * Add ms-rest-azure-js publishing * Add working directory parameter * Fix dependent tasks * Add debug statement * Flip order of gulp build * Bump the version * Update Constants * Add friendly job names * Cleanup debug statements
- Loading branch information
Showing
4 changed files
with
120 additions
and
41 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 |
---|---|---|
@@ -1,29 +1,96 @@ | ||
variables: | ||
artifactName: ms-rest-js | ||
msRestJsPackageName: azure-ms-rest-js.tgz | ||
msRestAzureArtifactName: ms-rest-azure-js | ||
msRestAzureJsPackageName: azure-ms-rest-azure-js.tgz | ||
tempDirectory: $(Pipeline.Workspace)/.tmp | ||
vmImage: 'Ubuntu 16.04' | ||
|
||
jobs: | ||
- job: Test_dependent_projects | ||
- job: prepare_ms_rest_js | ||
displayName: 'Pack and upload ms-rest-js' | ||
pool: | ||
vmImage: 'Ubuntu 16.04' | ||
vmImage: $(vmImage) | ||
steps: | ||
- task: Npm@1 | ||
displayName: 'npm install' | ||
- script: 'npm pack' | ||
displayName: 'npm pack' | ||
- script: 'mv azure-ms-rest-js-*.tgz $(msRestJsPackageName)' | ||
displayName: 'rename artifact' | ||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: install | ||
- task: Npm@1 | ||
displayName: 'Build ms-rest-js' | ||
artifactName: $(artifactName) | ||
targetPath: $(msRestJsPackageName) | ||
|
||
- job: test_ms_rest_azure_js | ||
displayName: 'Test ms-rest-azure-js with PR ms-rest-js' | ||
dependsOn: prepare_ms_rest_js | ||
pool: | ||
vmImage: $(vmImage) | ||
variables: | ||
repoDir: '$(tempDirectory)/ms-rest-azure-js' | ||
steps: | ||
- task: DownloadPipelineArtifact@0 | ||
inputs: | ||
artifactName: $(artifactName) | ||
targetPath: $(System.DefaultWorkingDirectory) | ||
- script: 'mkdir -p $(tempDirectory)' | ||
displayName: 'mkdir -p $(tempDirectory)' | ||
- script: 'git clone https://github.com/Azure/ms-rest-azure-js.git ms-rest-azure-js --depth 1' | ||
workingDirectory: $(tempDirectory) | ||
displayName: "clone ms-rest-azure-js" | ||
- script: 'npm pack' | ||
workingDirectory: $(repoDir) | ||
displayName: 'npm pack' | ||
- script: 'npm install $(Build.SourcesDirectory)/$(msRestJsPackageName)' | ||
workingDirectory: $(repoDir) | ||
displayName: 'npm install @azure/ms-rest-js' | ||
- script: 'npm run test' | ||
workingDirectory: $(repoDir) | ||
displayName: "npm run test" | ||
- script: 'mv azure-ms-rest-azure-js-*.tgz $(msRestAzureJsPackageName)' | ||
workingDirectory: $(repoDir) | ||
displayName: 'rename artifact' | ||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
command: custom | ||
verbose: false | ||
customCommand: 'run build' | ||
- task: Npm@1 | ||
displayName: 'npm run dep:ms-rest-azure-js' | ||
artifactName: $(msRestAzureArtifactName) | ||
targetPath: '$(repoDir)/$(msRestAzureJsPackageName)' | ||
|
||
- job: test_autorest_typescript | ||
displayName: 'Test autorest.typescript with PR ms-rest-js' | ||
dependsOn: [prepare_ms_rest_js, test_ms_rest_azure_js] | ||
pool: | ||
vmImage: $(vmImage) | ||
variables: | ||
repoDir: '$(tempDirectory)/autorest.typescript' | ||
steps: | ||
- task: DownloadPipelineArtifact@0 | ||
inputs: | ||
command: custom | ||
verbose: true | ||
customCommand: run dep:ms-rest-azure-js | ||
- task: Npm@1 | ||
displayName: 'npm run dep:autorest.typescript' | ||
artifactName: $(artifactName) | ||
targetPath: $(System.DefaultWorkingDirectory) | ||
- task: DownloadPipelineArtifact@0 | ||
inputs: | ||
command: custom | ||
verbose: true | ||
customCommand: run dep:autorest.typescript | ||
artifactName: $(msRestAzureArtifactName) | ||
targetPath: $(System.DefaultWorkingDirectory) | ||
- script: 'mkdir -p $(tempDirectory)' | ||
displayName: 'mkdir -p $(tempDirectory)' | ||
- script: 'git clone https://github.com/Azure/autorest.typescript.git autorest.typescript --recursive --depth 1' | ||
workingDirectory: $(tempDirectory) | ||
displayName: "clone autorest.typescript" | ||
- script: 'npm install $(Build.SourcesDirectory)/$(msRestAzureJsPackageName)' | ||
workingDirectory: $(repoDir) | ||
displayName: 'npm install @azure/ms-rest-azure-js' | ||
- script: 'npm install $(Build.SourcesDirectory)/$(msRestJsPackageName)' | ||
workingDirectory: $(repoDir) | ||
displayName: 'npm install @azure/ms-rest-js' | ||
- script: 'cat package.json' | ||
workingDirectory: $(repoDir) | ||
displayName: "debug" | ||
- script: 'npm install --verbose' | ||
workingDirectory: $(repoDir) | ||
displayName: "npm install" | ||
- script: 'gulp regenerate' | ||
workingDirectory: $(repoDir) | ||
displayName: 'gulp regenerate' | ||
- script: 'gulp test' | ||
workingDirectory: $(repoDir) | ||
displayName: 'gulp test' |
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
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
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