Commit 80d98628 authored by Boris Djalal's avatar Boris Djalal

Retrieving info about the author of the commit.

Signed-off-by: default avatarBoris Djalal <boris.djalal@eurecom.fr>
parent c4de0422
#!/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
*/
* 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
*/
// Abstraction function to send social media messages:
// like on Slack or Mattermost
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
if (params.pipelineUsesSlack != null) {
if (params.pipelineUsesSlack) {
if (params.pipelineUsesSlack != null) {
if (params.pipelineUsesSlack) {
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
}
}
}
}
}
......@@ -51,6 +51,8 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
def PROJECT_NAME = "test-boris"
def author
def email_author
// Global Parameters not to break the main.py command line and code.
def ADB_IPAddress = "none"
def ADB_Username = "none"
......@@ -62,17 +64,17 @@ def EPC_Password = "none"
pipeline {
agent {
label pythonExecutor
}
options {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
ansiColor('xterm')
}
stages {
stage ('Retrieve latest from branch') {
agent {
label pythonExecutor
}
options {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
ansiColor('xterm')
}
stages {
stage ('Retrieve latest from branch') {
steps {
script {
checkout([$class: 'GitSCM', branches: [[name: '*/gNB-nrUE-USRP']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.eurecom.fr/oai/openairinterface5g.git']]])
......@@ -80,8 +82,8 @@ pipeline {
sh "git log -n1"
}
}
}
stage ("Print latest commit info") {
}
stage ("Print latest commit info") {
steps {
script {
echo "Building on: "
......@@ -92,8 +94,8 @@ pipeline {
//eNB_Repository = ${GIT_URL}
}
}
}
stage ("Verify Parameters") {
}
stage ("Verify Parameters") {
steps {
script {
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
......@@ -164,6 +166,10 @@ pipeline {
if (params.UE_Credentials == null) {
allParametersPresent = false
}
author = $(git show -s --pretty=%an)
echo "The author of the commit is: ${author}"
email_author = $(git show -s --pretty=%ae)
echo "The email of the author is: ${email_author}"
echo "allParametersPresent = ${allParametersPresent}"
echo "begin if 2"
if (allParametersPresent) {
......@@ -183,9 +189,9 @@ pipeline {
//echo "params.ADB_IPAddress = ${params.ADB_IPAddress}"
}
}
}
}
stage ("Build and Test") {
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
......@@ -228,9 +234,9 @@ pipeline {
}
}
}
}
}
stage ("Terminate") {
stage ("Terminate") {
parallel {
stage('Terminate NR UE') {
steps {
......@@ -257,9 +263,9 @@ pipeline {
}
}
}
}
}
stage('Log Collection') {
stage('Log Collection') {
parallel {
stage('Log Collection (gNB and NR UE - Build)') {
steps {
......@@ -326,9 +332,9 @@ pipeline {
}
}
}
}
}
post {
}
}
post {
always {
script {
// Stage destroy may not be run if error in previous stage
......
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