Skip to content

Instantly share code, notes, and snippets.

@cheshi-mantu
Last active March 15, 2024 12:27
Show Gist options
  • Save cheshi-mantu/c6a088f4153a69a313cc3c8fd2a2539f to your computer and use it in GitHub Desktop.
Save cheshi-mantu/c6a088f4153a69a313cc3c8fd2a2539f to your computer and use it in GitHub Desktop.
jenkins with allurectl under hood
pipeline {
agent any
environment {
ALLURE_ENDPOINT = 'https://demo.testops.cloud'
ALLURE_PROJECT_ID = '1'
ALLURE_RESULTS = 'build/allure-results'
ALLURE_LAUNCH_TAGS = 'allurectl, java, junit, resident, demo'
ALLURE_LAUNCH_NAME = 'hello jenkins ${JOB_BASE_NAME} - #${BUILD_NUMBER}'
}
stages {
stage('pull the tests code fom VCS') {
steps {
git branch: '${TESTS_BRANCH_NAME}', url: 'https://github.com/cheshi-mantu/allure-example-ae.git'
}
}
stage('Running tests') {
steps {
withCredentials([string(credentialsId: 'qameta-testops-cloud-admin', variable: 'ALLURE_TOKEN')]) {
sh "curl -L -o ./allurectl https://github.com/allure-framework/allurectl/releases/download/${ALLURECTL_RELEASE}/allurectl_linux_amd64"
sh 'chmod +x ./allurectl'
sh "rm -r -f build/allure-results"
sh "chmod +x ./gradlew"
sh "./allurectl watch -- ./gradlew clean test"
sh "./allurectl ci env"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment