Commit b253c1a1 authored by Luhan Wang's avatar Luhan Wang

test

parent 9df44b22
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// test1
// test2
// Abstraction function to send social media messages:
// like on Slack or Mattermost
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
if (params.pipelineUsesSlack != null) {
if (params.pipelineUsesSlack) {
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
}
}
}
// Location of the executor node
def nodeExecutor = params.nodeExecutor
// VM Lockable resources
def vmResource = params.vmLockableResource
// Tags to shorten pipeline duration
def doMandatoryTests = false
def doFullTestsuite = false
pipeline {
agent {
label nodeExecutor
}
options {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OpenXG GitLab')
ansiColor('xterm')
}
stages {
stage ("Build Stage") {
steps {
script {
echo "Hello World, Compile main.c"
sh 'gcc ./main.c'
}
}
}
stage ("Verify output Stage") {
steps {
script {
echo "Hello World, Run a.out"
sh './a.out'
result = sh(script: "./a.out", returnStdout: true)
echo result.trim()
echo "aaaaaaaaaaa"
if (true){
echo "in if yuju"
currentBuild.result = 'FAILED'
error('Aborting the build.')
return
}
}
}
}
}
post {
always {
script {
// Stage destroy may not be run if error in previous stage
sh "rm a.out"
}
}
success {
script {
echo "Build and run successfully"
}
}
failure {
script {
echo "Build and run failed"
}
}
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment