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 #!/bin/groovy
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * 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 * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*------------------------------------------------------------------------------- *-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
// Abstraction function to send social media messages: // Abstraction function to send social media messages:
// like on Slack or Mattermost // like on Slack or Mattermost
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
if (params.pipelineUsesSlack != null) { if (params.pipelineUsesSlack != null) {
if (params.pipelineUsesSlack) { if (params.pipelineUsesSlack) {
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
} }
} }
} }
...@@ -51,6 +51,8 @@ def eNB_CommitID ...@@ -51,6 +51,8 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch
def PROJECT_NAME = "test-boris" def PROJECT_NAME = "test-boris"
def author
def email_author
// Global Parameters not to break the main.py command line and code. // Global Parameters not to break the main.py command line and code.
def ADB_IPAddress = "none" def ADB_IPAddress = "none"
def ADB_Username = "none" def ADB_Username = "none"
...@@ -62,17 +64,17 @@ def EPC_Password = "none" ...@@ -62,17 +64,17 @@ def EPC_Password = "none"
pipeline { pipeline {
agent { agent {
label pythonExecutor label pythonExecutor
} }
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
timestamps() timestamps()
gitLabConnection('OAI GitLab') gitLabConnection('OAI GitLab')
ansiColor('xterm') ansiColor('xterm')
} }
stages { stages {
stage ('Retrieve latest from branch') { stage ('Retrieve latest from branch') {
steps { steps {
script { script {
checkout([$class: 'GitSCM', branches: [[name: '*/gNB-nrUE-USRP']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.eurecom.fr/oai/openairinterface5g.git']]]) 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 { ...@@ -80,8 +82,8 @@ pipeline {
sh "git log -n1" sh "git log -n1"
} }
} }
} }
stage ("Print latest commit info") { stage ("Print latest commit info") {
steps { steps {
script { script {
echo "Building on: " echo "Building on: "
...@@ -92,8 +94,8 @@ pipeline { ...@@ -92,8 +94,8 @@ pipeline {
//eNB_Repository = ${GIT_URL} //eNB_Repository = ${GIT_URL}
} }
} }
} }
stage ("Verify Parameters") { stage ("Verify Parameters") {
steps { steps {
script { script {
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"' JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
...@@ -164,6 +166,10 @@ pipeline { ...@@ -164,6 +166,10 @@ pipeline {
if (params.UE_Credentials == null) { if (params.UE_Credentials == null) {
allParametersPresent = false 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 "allParametersPresent = ${allParametersPresent}"
echo "begin if 2" echo "begin if 2"
if (allParametersPresent) { if (allParametersPresent) {
...@@ -183,9 +189,9 @@ pipeline { ...@@ -183,9 +189,9 @@ pipeline {
//echo "params.ADB_IPAddress = ${params.ADB_IPAddress}" //echo "params.ADB_IPAddress = ${params.ADB_IPAddress}"
} }
} }
} }
stage ("Build and Test") { stage ("Build and Test") {
steps { steps {
script { script {
dir ('ci-scripts') { dir ('ci-scripts') {
...@@ -228,9 +234,9 @@ pipeline { ...@@ -228,9 +234,9 @@ pipeline {
} }
} }
} }
} }
stage ("Terminate") { stage ("Terminate") {
parallel { parallel {
stage('Terminate NR UE') { stage('Terminate NR UE') {
steps { steps {
...@@ -257,9 +263,9 @@ pipeline { ...@@ -257,9 +263,9 @@ pipeline {
} }
} }
} }
} }
stage('Log Collection') { stage('Log Collection') {
parallel { parallel {
stage('Log Collection (gNB and NR UE - Build)') { stage('Log Collection (gNB and NR UE - Build)') {
steps { steps {
...@@ -326,9 +332,9 @@ pipeline { ...@@ -326,9 +332,9 @@ pipeline {
} }
} }
} }
} }
} }
post { post {
always { always {
script { script {
// Stage destroy may not be run if error in previous stage // 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