testing jenkinsfile
HomeLab/Gitea HomeLab/pipeline/head This commit looks good

This commit is contained in:
2026-05-02 14:12:59 +10:00
parent 533874291a
commit 7a105ae0ef
2 changed files with 28 additions and 12 deletions
Vendored
+12 -12
View File
@@ -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"
}
}
}
}
}
}
}
}
+16
View File
@@ -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'
}
}
}
}
}
}