Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
name: CI (Jira cloud example with GH action) on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Java uses: actions/setup-java@v1 with: java-version: '1.8' - name: Cache Maven packages uses: actions/cache@v2 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build with Maven run: mvn clean compile test --file pom.xml - name: Submit results to Xray uses: mikepenz/xray-action@v0action@v2.94.45 with: username: ${{ secrets.client_id }} password: ${{ secrets.client_secret }} testFormat: "junit" testPaths: "**/surefire-reports/*.xml" projectKey: "CALC" |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
name: CI (Jira cloud example) on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Java uses: actions/setup-java@v1 with: java-version: '1.8' - name: Cache Maven packages uses: actions/cache@v2 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build with Maven run: mvn clean compile test --file pom.xml - name: Get Xray Cloud API token env: CLIENT_ID: ${{ secrets.client_id }} CLIENT_SECRET: ${{ secrets.client_secret }} id: xray-token run: | echo ::set-output name=XRAY_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 '"') - name: Submit results to Xray run: 'curl -H "Content-Type: text/xml" -H "Authorization: Bearer ${{ steps.xray-token.outputs.XRAY_TOKEN }}" --data @target/surefire-reports/TEST-com.xpand.java.CalcTest.xml "https://xray.cloud.xpand-itgetxray.comapp/api/v2/import/execution/junit?projectKey=CALC"' |
...