Update 'Jenkinsfile'
This commit is contained in:
parent
96e0a07c27
commit
72873ca112
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -49,6 +49,9 @@ pipeline{
|
|||||||
}
|
}
|
||||||
stage('Remote SSH') {
|
stage('Remote SSH') {
|
||||||
steps {
|
steps {
|
||||||
|
sh'''
|
||||||
|
printenv | tee env.source
|
||||||
|
'''
|
||||||
sshCommand remote: remote, command: '''#! /bin/bash
|
sshCommand remote: remote, command: '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
echo $WORKSPACE
|
echo $WORKSPACE
|
||||||
@ -56,10 +59,9 @@ pipeline{
|
|||||||
export WORKSPACE="jenkins/workspace/test"
|
export WORKSPACE="jenkins/workspace/test"
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
bash test.sh
|
bash test.sh
|
||||||
bname=$(git rev-parse --abbrev-ref HEAD)
|
|
||||||
echo "current branche is $bname"
|
|
||||||
'''
|
'''
|
||||||
sshCommand remote: remote, command: '''
|
sshCommand remote: remote, command: '''#! /bin/bash
|
||||||
|
source env.source
|
||||||
for i in {1..5}; do
|
for i in {1..5}; do
|
||||||
echo -n "Loop $i ";
|
echo -n "Loop $i ";
|
||||||
date ;
|
date ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user