Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openxg-5gcs-release
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhaoJingguo
openxg-5gcs-release
Commits
b253c1a1
Commit
b253c1a1
authored
Apr 03, 2022
by
Luhan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
9df44b22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
0 deletions
+105
-0
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+105
-0
No files found.
ci-scripts/Jenkinsfile-gitlab
0 → 100644
View file @
b253c1a1
#
!
/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment