Versions Compared

Key

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

...

Code Block
languagejs
titlebitbucket-pipelines.yml
# Use Maven 3.5 and JDK8
image: maven:3.5-jdk-8


pipelines:
  default:
    - step:
        caches:
          - maven
        script:
          - |
              echo "building my amazing repo..."
              mvn test
              export 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/v1/authenticate| tr -d '"')
              curl -H "Content-Type: text/xml" -H "Authorization: Bearer $token" --data @target/surefire-reports/TEST-com.xpand.java.CalcTest.xml  "https://xray.cloud.xpand-itgetxray.comapp/api/v1/import/execution/junit?projectKey=CALC"
              echo "done"

...

export 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/v1/authenticate| tr -d '"')
curl -H "Content-Type: text/xml" -H "Authorization: Bearer $token" --data @target/surefire-reports/TEST-com.xpand.java.CalcTest.xml  "https://xray.cloud.xpand-itgetxray.comapp/api/v1/import/execution/junit?projectKey=SP"

...

Code Block
languagejs
titlebitbucket-pipelines.yml
# This is a sample build configuration for Ruby.
# Check our guides at https://confluence.atlassian.com/x/8r-5Mw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: ruby:2.5

pipelines:
  default:
    - step:
        caches:
          - bundler
        script: # Modify the commands below to build your repository.
          - |
              apt-get update -qq
              apt-get install unzip
              gem install cucumber
              gem install rspec-expectations
              export 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/v1/authenticate| tr -d '"')
              curl -H "Content-Type: application/json" --output features/features.zip -X GET -H "Authorization: Bearer ${token}"  "https://xray-tst.cloud.xpand-addonsgetxray.comapp/api/v1v2/export/cucumber?keys=$cucumber_keys"
              rm -f features/*.feature
              unzip -o features/features.zip -d features/
              cucumber -x -f json -o data.json
              curl -H "Content-Type: application/json" -X POST -H "Authorization: Bearer ${token}" --data @data.json https://xray.cloud.xpand-itgetxray.comapp/api/v1/import/execution/cucumber
              echo "done"

definitions:
  caches:
    bundler: ./vendor

...