init ssh command

This commit is contained in:
Basyrov Rustam
2025-06-09 11:52:38 +03:00
parent 6b4e12697f
commit 92498c074c

24
Jenkinsfile vendored
View File

@@ -1,11 +1,35 @@
def remote=[:]
remote.name = 'saccada.xyz'
remote.host = 'saccada.xyz'
remote.allowAnyHosts = true
pipeline {
agent any
environment {
CREDS=credentials('73d234d2-3f9d-44e9-97fc-b6317070b462')
}
stages {
stage('Hello') {
steps {
echo 'Hello from Jenkins'
}
}
stage('Connect to server') {
steps {
script {
remote.user = env.CREDS_USR
remote.password = env.CREDS_PSW
}
sshCommand(remote: remote, command: "find ~/ws")
}
}
}
post {
always {
sleep 5
}
}
}