Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleazure-pipelines.yml
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java


trigger:
- master

pool:
  vmImage: 'Ubuntu-16.04'

steps:
- task: Maven@3
  inputs:
    mavenPomFile: 'java-junit-calc/pom.xml'
    mavenOptions: '-Xmx3072m'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.11'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: false
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'clean compile test'
- bash: |
    token=$(curl -H "Content-Type: application/json" -X POST --data '{ "client_id": "$(client_id)","client_secret": "$(client_secret)" }' https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/authenticate| tr -d '"')
    curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer ${token}" --data @java-junit-calc/target/surefire-reports/TEST-com.xpand.java.CalcTest.xml https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/import/execution/junit?projectKey=$(project_key)

...

Code Block
token=$(curl -H "Content-Type: application/json" -X POST --data '{ "client_id": "$(client_id)","client_secret": "$(client_secret)" }' https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/authenticate| tr -d '"')
curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer ${token}" --data @java-junit-calc/target/surefire-reports/TEST-com.xpand.java.CalcTest.xml https://xray.cloud.xpand-itgetxray.comapp/api/v1v2/import/execution/junit?projectKey=$(project_key)

...