CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 12:30:07 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=f0b8ad1c1a3a11e8aeb55d8fd77f32256c98c95b540501682e38aa74c185350ea%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22MoEEmL2IRhJA43Y_reXNd5PeDiuHrLc-%22%3B%7D; HttpOnly; Path=/
cf-ray: 98ce5df1be8375e9-BLR
pipeline - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * A Jenkins pipeline demonstrating how layered product QE teams can perform their OCP
- * layered product testing when integrating into the Interop QE CI system using their
- * triggering service offering.
- */
- import java.time.Instant
- /**
- * Get xUnit urls for the given build. Requires the use of the NonCPS
- * annotation as getArtifacts method uses Jenkins API.
- * @return xUnit urls for the build
- */
- @NonCPS
- def getXunitUrls() {
- List xunitUrls = []
- List artifacts = currentBuild.rawBuild.getArtifacts()
- for (String artifact in artifacts) {
- if (artifact.getFileName().endsWith('.xml')) {
- xunitUrls.add(env.BUILD_URL + "artifact/${artifact}")
- }
- }
- return xunitUrls
- }
- node("master") {
- // declare variables
- String messageTopic = "product-scenario.test.complete"
- def ocp_info
- def message
- def product_info
- Boolean allowEmpty = false
- String testStatus
- def testRuntime
- timestamps{
- stage("parse message"){
- try{
- sh "printenv"
- // get ci message and write to disk
- message = readJSON text: params.get("CI_MESSAGE")
- writeJSON file: "ci-message.json", json: message
- // gather OpenShift details
- for (item in message['artifact']['products']) {
- if (item['name'].toLowerCase() == 'openshift') {
- ocp_info = item
- } else {
- product_info = item
- }
- }
- println("Testing OCP build: ${ocp_info['nvr']}")
- } catch (e){
- allowEmpty = true
- println("${e.toString()}")
- throw e
- } finally {
- archiveArtifacts artifacts: "*.json", fingerprint: false, allowEmptyArchive: allowEmpty
- }
- }
- stage("setup test environment"){
- println("Setting up test environment...")
- }
- stage("Run Tests"){
- dir("repo"){
- println("Running Tests")
- // save start time
- startTime = new Date().getTime()
- // clone mock_openshift repo to get sample xunit results
- git url: "https://github.com/openshift/jenkins.git", branch: "master"
- sh '''
- oc login https://api.daily-4.12-092201.dev.openshiftappsvc.org:6443 -u kubeadmin -p 9NJXn-WQEUD-XkYdY-zuWdL --insecure-skip-tls-verify
- export KUBECONFIG=~/.kube/config
- ./scripts/test-jenkins-template-install.sh
- '''
- // archive the xunit results from running the tests
- archiveArtifacts artifacts: "out/smoke/*.xml", fingerprint: false
- // save stop time
- stopTime = new Date().getTime()
- }
- // calculate test total runtime
- testRuntime = ((stopTime - startTime) / 1000).toInteger()
- //analyze the results, and set the test status
- testStatus = "passed"
- println("Finished test execution")
- }
- stage("build ci message") {
- println("Building product-scenario.test.complete ci message..")
- // build list of xunit urls
- List xunitUrls = getXunitUrls()
- // override default message topic (development usage)
- messageTopic += ".${message['contact']['email'].toString().split('@')[0]}"
- }
- // build message
- message['contact']['name'] = product_info['name']
- message['contact']['team'] = product_info['name']
- message['contact']['url'] = env.JENKINS_URL
- message['run'] = [:]
- message['run']['url'] = env.BUILD_URL
- message['run']['log'] = env.BUILD_URL + "console"
- message['test'] = [:]
- message['test']['category'] = "interoperability"
- message['test']['namespace'] = "interop"
- message['test']['type'] = "layered-product"
- message['test']['result'] = testStatus
- message['test']['runtime'] = testRuntime
- message['test']['xunit_urls'] = xunitUrls
- message['generated_at'] = Instant.now().toString()
- println("${message}")
- println("CI message product-scenario.test.complete finished building!")
- // archive product-scenario.test.complete message
- archiveArtifacts artifacts: "*.json", fingerprint: false
- }
- stage("send ci message") {
- println("Sending product-scenario.test.complete ci message..")
- // set topic
- String topic = String.join(".", "VirtualTopic.qe.ci", "${messageTopic}")
- //MESSAGE_PROVIDER = Red Hat UMB or Red Hat UMB (stage) -> if accessible
- sendCIMessage providerName: params.MESSAGE_PROVIDER,
- overrides: [topic: topic],
- messageType: "Custom",
- messageContent: message.toString()
- println("CI message product-scenario.test.complete finished sending!")
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐⭐⭐ 2
JavaScript | 1 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ 4
JavaScript | 1 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 2 sec ago | 0.24 KB
-
✅⭐ Make $2500 in 15 minutes ✅ NEVER SEEN BEFO...
JavaScript | 11 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ 1
JavaScript | 12 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ C
JavaScript | 12 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 4
JavaScript | 23 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ A
JavaScript | 23 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand