From 9b47134115886c609bd53a8323116bb0bcb4c0f9 Mon Sep 17 00:00:00 2001
From: Mike Harder <mharder@microsoft.com>
Date: Tue, 5 Mar 2019 12:38:40 -0800
Subject: [PATCH] Update YAML formatting (#3033)

- Update whitespace to match Prettier formatting
- Add .prettierrc.yml
- Part of Azure/azure-sdk#225
---
 .azure-pipelines/.prettierrc.yml      |   1 +
 .azure-pipelines/client.test.live.yml |  72 +++---
 .azure-pipelines/client.yml           | 334 +++++++++++++-------------
 3 files changed, 204 insertions(+), 203 deletions(-)
 create mode 100644 .azure-pipelines/.prettierrc.yml

diff --git a/.azure-pipelines/.prettierrc.yml b/.azure-pipelines/.prettierrc.yml
new file mode 100644
index 0000000000000..01769692264f1
--- /dev/null
+++ b/.azure-pipelines/.prettierrc.yml
@@ -0,0 +1 @@
+singleQuote: true
diff --git a/.azure-pipelines/client.test.live.yml b/.azure-pipelines/client.test.live.yml
index b6c9d12eb084b..b895e469fee90 100644
--- a/.azure-pipelines/client.test.live.yml
+++ b/.azure-pipelines/client.test.live.yml
@@ -1,41 +1,41 @@
 jobs:
-- job: 'LiveTest'
+  - job: 'LiveTest'
 
-  strategy:
-    matrix:
-      AzureBatch:
-        pomFilePath: './batch/data-plane/pom.xml'
-      AzureKeyVault:
-        pomFilePath: './keyvault/data-plane/pom.xml'
+    strategy:
+      matrix:
+        AzureBatch:
+          pomFilePath: './batch/data-plane/pom.xml'
+        AzureKeyVault:
+          pomFilePath: './keyvault/data-plane/pom.xml'
 
-  pool:
-    vmImage: 'vs2017-win2016'
+    pool:
+      vmImage: 'vs2017-win2016'
 
-  steps:
-  # Adding -Dmaven.wagon.http.pool=false to the mvn command as a workaround to prevent build failures at maven artifacts downloading stage.
-  - task: Maven@3
-    displayName: 'Run Live tests'
-    inputs:
-      mavenPomFile: $(pomFilePath)
-      options: '--batch-mode -Dmaven.wagon.http.pool=false -Dsurefire.rerunFailingTestsCount=3'
-      mavenOptions: '-Xmx3072m -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
-      javaHomeOption: 'JDKVersion'
-      jdkVersionOption: '1.8'
-      jdkArchitectureOption: 'x64'
-      publishJUnitResults: false
-      goals: 'test'
-    env:
-      ARM_CLIENTID: $(java-keyvault-test-arm-client-id)
-      ARM_CLIENTKEY: $(java-keyvault-test-arm-client-key)
-      AZURE_TEST_MODE: RECORD
-      AZURE_BATCH_ACCOUNT: $(java-batch-test-account-name)
-      AZURE_BATCH_ACCESS_KEY: $(java-batch-test-account-access-key)
-      STORAGE_ACCOUNT_KEY: $(java-batch-test-storage-account-key)
-      STORAGE_ACCOUNT_NAME: $(java-batch-test-storage-account-name)
-      AZURE_BATCH_ENDPOINT: https://servbatch.centralus.batch.azure.com
+    steps:
+      # Adding -Dmaven.wagon.http.pool=false to the mvn command as a workaround to prevent build failures at maven artifacts downloading stage.
+      - task: Maven@3
+        displayName: 'Run Live tests'
+        inputs:
+          mavenPomFile: $(pomFilePath)
+          options: '--batch-mode -Dmaven.wagon.http.pool=false -Dsurefire.rerunFailingTestsCount=3'
+          mavenOptions: '-Xmx3072m -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
+          javaHomeOption: 'JDKVersion'
+          jdkVersionOption: '1.8'
+          jdkArchitectureOption: 'x64'
+          publishJUnitResults: false
+          goals: 'test'
+        env:
+          ARM_CLIENTID: $(java-keyvault-test-arm-client-id)
+          ARM_CLIENTKEY: $(java-keyvault-test-arm-client-key)
+          AZURE_TEST_MODE: RECORD
+          AZURE_BATCH_ACCOUNT: $(java-batch-test-account-name)
+          AZURE_BATCH_ACCESS_KEY: $(java-batch-test-account-access-key)
+          STORAGE_ACCOUNT_KEY: $(java-batch-test-storage-account-key)
+          STORAGE_ACCOUNT_NAME: $(java-batch-test-storage-account-name)
+          AZURE_BATCH_ENDPOINT: https://servbatch.centralus.batch.azure.com
 
-  - task: PublishTestResults@2
-    condition: succeededOrFailed()
-    inputs:
-      mergeTestResults: true
-      testRunTitle: 'Live tests for $(pomFilePath)'
+      - task: PublishTestResults@2
+        condition: succeededOrFailed()
+        inputs:
+          mergeTestResults: true
+          testRunTitle: 'Live tests for $(pomFilePath)'
diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml
index 0d289228ded6b..38ec73c6980be 100644
--- a/.azure-pipelines/client.yml
+++ b/.azure-pipelines/client.yml
@@ -2,176 +2,176 @@
 # "pomFile" : "pom.client.xml".   This is the project object model file for Maven.
 
 trigger:
-- master
+  - master
 
 variables:
   DefaultOptions: '--batch-mode -Dmaven.wagon.http.pool=false'
   LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
 
 jobs:
-- job: 'Build'
-
-  pool:
-    vmImage: 'ubuntu-16.04'
-
-  strategy:
-    matrix:
-      Java 8:
-        ArtifactName: 'packages'
-        ProfileFlag: ''
-        JavaVersion: '1.8'
-      Java LTS:
-        ArtifactName: 'java-lts-packages'
-        ProfileFlag: '-Djava-lts'
-        JavaVersion: '1.11'
-
-  steps:
-  - task: Maven@3
-    displayName: 'Build and Package'
-    inputs:
-      mavenPomFile: $(pomFile)
-      goals: 'javadoc:jar source:jar package'
-      options: '$(DefaultOptions) $(ProfileFlag) -Dmaven.test.skip=true -Dinclude-template' # We include template-module so we ensure it always builds in CI
-      mavenOptions: '$(LoggingOptions)'
-      javaHomeOption: 'JDKVersion'
-      jdkVersionOption: $(JavaVersion)
-      jdkArchitectureOption: 'x64'
-      publishJUnitResults: false
-
-  - powershell: |
-      # use sources files as a marker to find POM files so we can copy them to the output. The sources.jar file is generally
-      # in a target folder next to the pom.xml file so $_.Directory.Parent should get us the folder that contains the POM.
-      dir -r -i *-sources.jar | % { copy (Join-Path $_.Directory.Parent.FullName "pom.xml") (Join-Path $(Build.ArtifactStagingDirectory) $_.Name.Replace("-sources.jar",".pom")) }
-      dir -r -i *.jar | % { copy $_ $(Build.ArtifactStagingDirectory) }
-    displayName: 'Copy JAR and POM files to artifact staging'
-
-  - task: PublishBuildArtifacts@1
-    displayName: 'Publish Artifacts $(ArtifactName)'
-    inputs:
-      artifactName: '$(ArtifactName)'
-
-- job: 'Analyze'
-
-  pool:
-    vmImage: 'ubuntu-16.04'
-
-  steps:
-    # sudo is required for pip install, as a console_entrypoint shim needs to be placed in bin
-  - script: |
-      pip install setuptools wheel
-      sudo pip install doc-warden
-      ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml
-    displayName: 'Verify Readmes'
-
-  - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
-    # ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
-    # builds should be sufficient.
-    condition: and(succeededOrFailed(), ne(variables['Build.Reason'], 'PullRequest'))
-    displayName: 'Component Detection'
-
-  # We `install` separately from running `site:site site:stage` so that the `install` brings in the non-shipping-modules,
-  # but we don't include them in the Maven site commands (so that we don't generate reports for the non-shipping modules).
-  - task: Maven@3
-    displayName: 'Install reporting tools'
-    inputs:
-      mavenPomFile: $(pomFile)
-      options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip'
-      mavenOptions: '$(LoggingOptions)'
-      javaHomeOption: 'JDKVersion'
-      jdkVersionOption: '1.11'
-      jdkArchitectureOption: 'x64'
-      publishJUnitResults: false
-      goals: 'install'
-
-  - task: Maven@3
-    displayName: 'Generate Maven project site, including JavaDocs, SpotBugs, and CheckStyle reports'
-    inputs:
-      mavenPomFile: $(pomFile)
-      options: '$(DefaultOptions) -DskipTests -Dgpg.skip'
-      mavenOptions: '$(LoggingOptions)'
-      javaHomeOption: 'JDKVersion'
-      jdkVersionOption: '1.11'
-      jdkArchitectureOption: 'x64'
-      publishJUnitResults: false
-      goals: 'site:site site:stage'
-
-  - powershell: |
-      copy -r target/staging $(Build.ArtifactStagingDirectory)
-      copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
-      copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging")
-    displayName: 'Copy reports to artifact staging'
-
-  - task: PublishBuildArtifacts@1
-    condition: succeededOrFailed()
-    displayName: 'Publish Report Artifacts'
-    inputs:
-      artifactName: reports
-
-- job: 'Test'
-
-  strategy:
-    matrix:
-      Linux - Java 8:
-        OSName: 'Linux'
-        OSVmImage: 'ubuntu-16.04'
-        JavaVersion: '1.8'
-        ProfileFlag: ''
-      macOS - Java 8:
-        OSName: 'macOS'
-        OSVmImage: 'macOS-10.13'
-        JavaVersion: '1.8'
-        ProfileFlag: ''
-      Windows - Java 8:
-        OSName: 'Windows'
-        OSVmImage: 'vs2017-win2016'
-        JavaVersion: '1.8'
-        ProfileFlag: ''
-      Linux - Java LTS:
-        OSName: 'Linux'
-        OSVmImage: 'ubuntu-16.04'
-        JavaVersion: '1.11'
-        ProfileFlag: '-Djava-lts'
-      macOS - Java LTS:
-        OSName: 'macOS'
-        OSVmImage: 'macOS-10.13'
-        JavaVersion: '1.11'
-        ProfileFlag: '-Djava-lts'
-      Windows - Java LTS:
-        OSName: 'Windows'
-        OSVmImage: 'vs2017-win2016'
-        JavaVersion: '1.11'
-        ProfileFlag: '-Djava-lts'
-
-  pool:
-    vmImage: $(OSVmImage)
-
-  steps:
-  - task: Maven@3
-    displayName: 'Start Jetty'
-    inputs:
-      mavenPomFile: $(pomFile)
-      options: '$(DefaultOptions) $(ProfileFlag)'
-      mavenOptions: '$(LoggingOptions)'
-      javaHomeOption: 'JDKVersion'
-      jdkVersionOption: $(JavaVersion)
-      jdkArchitectureOption: 'x64'
-      publishJUnitResults: false
-      goals: 'jetty:run-forked'
-
-  - task: Maven@3
-    displayName: 'Run tests'
-    inputs:
-      mavenPomFile: $(pomFile)
-      options: '$(DefaultOptions) $(ProfileFlag)'
-      mavenOptions: '-Xmx3072m $(LoggingOptions)'
-      javaHomeOption: 'JDKVersion'
-      jdkVersionOption: $(JavaVersion)
-      jdkArchitectureOption: 'x64'
-      publishJUnitResults: false
-      goals: 'test'
-
-  - task: PublishTestResults@2
-    condition: succeededOrFailed()
-    inputs:
-      mergeTestResults: true
-      testRunTitle: '$(OSName) on Java $(JavaVersion)'
+  - job: 'Build'
+
+    pool:
+      vmImage: 'ubuntu-16.04'
+
+    strategy:
+      matrix:
+        Java 8:
+          ArtifactName: 'packages'
+          ProfileFlag: ''
+          JavaVersion: '1.8'
+        Java LTS:
+          ArtifactName: 'java-lts-packages'
+          ProfileFlag: '-Djava-lts'
+          JavaVersion: '1.11'
+
+    steps:
+      - task: Maven@3
+        displayName: 'Build and Package'
+        inputs:
+          mavenPomFile: $(pomFile)
+          goals: 'javadoc:jar source:jar package'
+          options: '$(DefaultOptions) $(ProfileFlag) -Dmaven.test.skip=true -Dinclude-template' # We include template-module so we ensure it always builds in CI
+          mavenOptions: '$(LoggingOptions)'
+          javaHomeOption: 'JDKVersion'
+          jdkVersionOption: $(JavaVersion)
+          jdkArchitectureOption: 'x64'
+          publishJUnitResults: false
+
+      - powershell: |
+          # use sources files as a marker to find POM files so we can copy them to the output. The sources.jar file is generally
+          # in a target folder next to the pom.xml file so $_.Directory.Parent should get us the folder that contains the POM.
+          dir -r -i *-sources.jar | % { copy (Join-Path $_.Directory.Parent.FullName "pom.xml") (Join-Path $(Build.ArtifactStagingDirectory) $_.Name.Replace("-sources.jar",".pom")) }
+          dir -r -i *.jar | % { copy $_ $(Build.ArtifactStagingDirectory) }
+        displayName: 'Copy JAR and POM files to artifact staging'
+
+      - task: PublishBuildArtifacts@1
+        displayName: 'Publish Artifacts $(ArtifactName)'
+        inputs:
+          artifactName: '$(ArtifactName)'
+
+  - job: 'Analyze'
+
+    pool:
+      vmImage: 'ubuntu-16.04'
+
+    steps:
+      # sudo is required for pip install, as a console_entrypoint shim needs to be placed in bin
+      - script: |
+          pip install setuptools wheel
+          sudo pip install doc-warden
+          ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml
+        displayName: 'Verify Readmes'
+
+      - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
+        # ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
+        # builds should be sufficient.
+        condition: and(succeededOrFailed(), ne(variables['Build.Reason'], 'PullRequest'))
+        displayName: 'Component Detection'
+
+      # We `install` separately from running `site:site site:stage` so that the `install` brings in the non-shipping-modules,
+      # but we don't include them in the Maven site commands (so that we don't generate reports for the non-shipping modules).
+      - task: Maven@3
+        displayName: 'Install reporting tools'
+        inputs:
+          mavenPomFile: $(pomFile)
+          options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip'
+          mavenOptions: '$(LoggingOptions)'
+          javaHomeOption: 'JDKVersion'
+          jdkVersionOption: '1.11'
+          jdkArchitectureOption: 'x64'
+          publishJUnitResults: false
+          goals: 'install'
+
+      - task: Maven@3
+        displayName: 'Generate Maven project site, including JavaDocs, SpotBugs, and CheckStyle reports'
+        inputs:
+          mavenPomFile: $(pomFile)
+          options: '$(DefaultOptions) -DskipTests -Dgpg.skip'
+          mavenOptions: '$(LoggingOptions)'
+          javaHomeOption: 'JDKVersion'
+          jdkVersionOption: '1.11'
+          jdkArchitectureOption: 'x64'
+          publishJUnitResults: false
+          goals: 'site:site site:stage'
+
+      - powershell: |
+          copy -r target/staging $(Build.ArtifactStagingDirectory)
+          copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
+          copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging")
+        displayName: 'Copy reports to artifact staging'
+
+      - task: PublishBuildArtifacts@1
+        condition: succeededOrFailed()
+        displayName: 'Publish Report Artifacts'
+        inputs:
+          artifactName: reports
+
+  - job: 'Test'
+
+    strategy:
+      matrix:
+        Linux - Java 8:
+          OSName: 'Linux'
+          OSVmImage: 'ubuntu-16.04'
+          JavaVersion: '1.8'
+          ProfileFlag: ''
+        macOS - Java 8:
+          OSName: 'macOS'
+          OSVmImage: 'macOS-10.13'
+          JavaVersion: '1.8'
+          ProfileFlag: ''
+        Windows - Java 8:
+          OSName: 'Windows'
+          OSVmImage: 'vs2017-win2016'
+          JavaVersion: '1.8'
+          ProfileFlag: ''
+        Linux - Java LTS:
+          OSName: 'Linux'
+          OSVmImage: 'ubuntu-16.04'
+          JavaVersion: '1.11'
+          ProfileFlag: '-Djava-lts'
+        macOS - Java LTS:
+          OSName: 'macOS'
+          OSVmImage: 'macOS-10.13'
+          JavaVersion: '1.11'
+          ProfileFlag: '-Djava-lts'
+        Windows - Java LTS:
+          OSName: 'Windows'
+          OSVmImage: 'vs2017-win2016'
+          JavaVersion: '1.11'
+          ProfileFlag: '-Djava-lts'
+
+    pool:
+      vmImage: $(OSVmImage)
+
+    steps:
+      - task: Maven@3
+        displayName: 'Start Jetty'
+        inputs:
+          mavenPomFile: $(pomFile)
+          options: '$(DefaultOptions) $(ProfileFlag)'
+          mavenOptions: '$(LoggingOptions)'
+          javaHomeOption: 'JDKVersion'
+          jdkVersionOption: $(JavaVersion)
+          jdkArchitectureOption: 'x64'
+          publishJUnitResults: false
+          goals: 'jetty:run-forked'
+
+      - task: Maven@3
+        displayName: 'Run tests'
+        inputs:
+          mavenPomFile: $(pomFile)
+          options: '$(DefaultOptions) $(ProfileFlag)'
+          mavenOptions: '-Xmx3072m $(LoggingOptions)'
+          javaHomeOption: 'JDKVersion'
+          jdkVersionOption: $(JavaVersion)
+          jdkArchitectureOption: 'x64'
+          publishJUnitResults: false
+          goals: 'test'
+
+      - task: PublishTestResults@2
+        condition: succeededOrFailed()
+        inputs:
+          mergeTestResults: true
+          testRunTitle: '$(OSName) on Java $(JavaVersion)'