Last active
March 15, 2024 12:27
-
-
Save cheshi-mantu/c6a088f4153a69a313cc3c8fd2a2539f to your computer and use it in GitHub Desktop.
jenkins with allurectl under hood
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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