Skip to content

Commit 34f0c3a

Browse files
committed
Added agent hostname log
Signed-off-by: Sombrio <[email protected]>
1 parent b7399ed commit 34f0c3a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Jenkinsfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@Library('[email protected]') _
22

3+
def logHostname() {
4+
def host = sh(returnStdout: true, script: 'hostname').trim()
5+
sh label: "Running on ${host}", script: "true"
6+
}
7+
38
def baseTests(String image) {
49
Map base_tests = [failFast: false];
510

@@ -43,6 +48,7 @@ def baseTests(String image) {
4348
flow_tests.each { current_test ->
4449
base_tests["Flow Test - ${current_test}"] = {
4550
node {
51+
logHostname()
4652
withDockerContainer(args: '-u root', image: image) {
4753
stage("Setup ${current_test}") {
4854
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
@@ -78,6 +84,7 @@ def getParallelTests(String image) {
7884
def ret = [
7985
'Docs Tester': {
8086
node {
87+
logHostname()
8188
withDockerContainer(args: '-u root', image: image) {
8289
stage('Setup Docs Test') {
8390
echo "Setting up Docs Tester environment in ${image}";
@@ -101,6 +108,7 @@ def getParallelTests(String image) {
101108

102109
'Build without GUI': {
103110
node {
111+
logHostname()
104112
withDockerContainer(args: '-u root', image: image) {
105113
stage('Setup no-GUI Build') {
106114
echo "Build without GUI";
@@ -118,6 +126,7 @@ def getParallelTests(String image) {
118126

119127
'Build without Test': {
120128
node {
129+
logHostname()
121130
withDockerContainer(args: '-u root', image: image) {
122131
stage('Setup no-test Build') {
123132
echo "Build without Tests";
@@ -139,6 +148,7 @@ def getParallelTests(String image) {
139148

140149
'Build on RHEL8': {
141150
node ('rhel8') {
151+
logHostname()
142152
stage('Setup RHEL8 Build') {
143153
checkout scm;
144154
}
@@ -172,6 +182,7 @@ def getParallelTests(String image) {
172182

173183
'Unit Tests Ninja': {
174184
node {
185+
logHostname()
175186
withDockerContainer(args: '-u root', image: image) {
176187
stage('Setup Ninja Tests') {
177188
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
@@ -195,6 +206,7 @@ def getParallelTests(String image) {
195206

196207
'Compile with C++20': {
197208
node {
209+
logHostname()
198210
withDockerContainer(args: '-u root', image: image) {
199211
stage('Setup C++20 Compile') {
200212
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
@@ -213,6 +225,7 @@ def getParallelTests(String image) {
213225

214226
def bazelTest = {
215227
node {
228+
logHostname()
216229
stage('Setup') {
217230
checkout scm;
218231
sh label: 'Setup Docker Image', script: 'docker build -f docker/Dockerfile.bazel -t openroad/bazel-ci .';
@@ -265,6 +278,7 @@ def dockerTests = {
265278
test_os.each { os ->
266279
build_docker_images["Test Installer - ${os.name}"] = {
267280
node {
281+
logHostname()
268282
checkout scm;
269283
sh label: 'Build Docker image', script: "./etc/DockerHelper.sh create -target=builder -os=${os.image}";
270284
sh label: 'Test Docker image', script: "./etc/DockerHelper.sh test -target=builder -os=${os.image} -smoke";

0 commit comments

Comments
 (0)