Commit 10c4efab authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'ci-try-outs' into 'develop'

MR nb 6

See merge request !6
parents af217bfd d35957ed
Pipeline #8513 passed with stage
in 0 seconds
......@@ -5,9 +5,9 @@ pipeline {
label 'bellatrix'
}
options {
gitLabConnection('OAI GitLab')
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build", "Test"])
}
......@@ -28,57 +28,59 @@ pipeline {
// Doing it manually --> it may have merge conflicts
sh "git merge --ff origin/${env.gitlabTargetBranch}"
sh "git log -n1"
}
}
}
}
}
stage ("Build") {
steps {
gitlabCommitStatus(name: "Build") {
steps {
gitlabCommitStatus(name: "Build") {
sh "gcc src/test1.c -o bin/test1"
sh "gcc src/test2.c -o bin/test2"
sh "gcc src/test2.c -o bin/test3"
sh "cppcheck --enable=warning --force --xml --xml-version=2 src 2> cppcheck.xml"
}
}
}
stage ("Test") {
steps {
gitlabCommitStatus(name: "Test") {
steps {
gitlabCommitStatus(name: "Test") {
sh "./bin/test1"
sh "./bin/test2"
sh "./bin/test3"
}
}
}
}
post {
always {
always {
script {
if(fileExists('cppcheck.xml')) {
archiveArtifacts artifacts: 'cppcheck.xml'
}
}
}
success {
script {
if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
def msg = "OAI build #" + BUILD_ID + " passed"
echo "$msg"
addGitLabMRComment comment: msg
def message = "OAI build #" + BUILD_ID + " passed (" + BUILD_URL + ")"
echo "$message"
addGitLabMRComment comment: message
}
}
}
failure {
script {
if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
def message = "OAI build #" + BUILD_ID + " failed (" + BUILD_URL + ")"
addGitLabMRComment comment: message
}
}
}
}
success {
script {
if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
def msg = "OAI build #" + BUILD_ID + " passed"
echo "$msg"
addGitLabMRComment comment: msg
def message = "OAI build #" + BUILD_ID + " passed (" + BUILD_URL + ")"
echo "$message"
addGitLabMRComment comment: message
}
}
}
failure {
script {
if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
def message = "OAI build #" + BUILD_ID + " failed (" + BUILD_URL + ")"
addGitLabMRComment comment: message
}
}
}
}
}
/*
* Copyright OAI Software Alliance - 2018
* Author Raphael Defosseux
* Comments : Proper comments
*/
#include <stdio.h>
int main()
{
int testId = 3;
printf ("Test #%d\n", testId);
return 0;
}
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