From 7a105ae0efc387ec263243246ebfdee4a5b34473 Mon Sep 17 00:00:00 2001 From: cristiano Date: Sat, 2 May 2026 14:12:59 +1000 Subject: [PATCH] testing jenkinsfile --- Jenkinsfile | 24 ++++++++++++------------ Jenkinsfile.old | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 Jenkinsfile.old diff --git a/Jenkinsfile b/Jenkinsfile index 2004c6b..c88d46e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,16 +1,16 @@ pipeline { - agent any - stages { - stage('Checkout') { - steps { - withCredentials([string(credentialsId: 'jenkins', variable: 'MY_TOKEN')]) { - if (isUnix()) { - sh 'git clone https://$MY_TOKEN@ggit.niascom.net/homelab/linux.gi' - } else { - bat 'git clone https://%MY_TOKEN%@git.niascom.net/homelab/linux.git' - } + agent any + stages { + stage('Test') { + steps { + script { // <--- Added script block + if (isUnix()) { + echo "Unix" + } else { + echo "Windows" + } + } + } } - } } - } } diff --git a/Jenkinsfile.old b/Jenkinsfile.old new file mode 100644 index 0000000..2004c6b --- /dev/null +++ b/Jenkinsfile.old @@ -0,0 +1,16 @@ +pipeline { + agent any + stages { + stage('Checkout') { + steps { + withCredentials([string(credentialsId: 'jenkins', variable: 'MY_TOKEN')]) { + if (isUnix()) { + sh 'git clone https://$MY_TOKEN@ggit.niascom.net/homelab/linux.gi' + } else { + bat 'git clone https://%MY_TOKEN%@git.niascom.net/homelab/linux.git' + } + } + } + } + } +}