Configure build job in Circle CI

Configure build jobs

The example below shows the configurations for Circle CI workflow:

Build job configuration

  1. You need to use allurectl to upload the test results to Allure TestOps.
version: 2.1

parameters:
  ALLURE_JOB_RUN_ID:
    type: string
    default: ""
  BROWSER:
    type: string
    default: "firefox"

jobs:
  build:
    docker:
      - image: circleci/openjdk:8-jdk
    working_directory: ~/repo
    environment:
      ALLURE_JOB_RUN_ID: << pipeline.parameters.ALLURE_JOB_RUN_ID >>
      ALLURE_TESTPLAN_PATH: ./testplan.json
      ALLURE_RESULTS: allure-results
      BROWSER: << pipeline.parameters.BROWSER >>
    steps:
      - checkout
      - run: |
          wget https://github.com/allure-framework/allurectl/releases/latest/download/allurectl_linux_386 -O ./allurectl
          chmod +x ./allurectl
      - run: ./allurectl job-run plan --output-file ${ALLURE_TESTPLAN_PATH}
      - run: ./allurectl watch -- ./gradlew test -Pbrowser=${BROWSER}

Jump to import of test results