From a495c52fc590e5d3b3511442b90a11213996763a Mon Sep 17 00:00:00 2001 From: cristiano Date: Sat, 2 May 2026 14:03:34 +1000 Subject: [PATCH] testing jenkinsfile --- Jenkinsfile | 35 ++++++++++++----------------------- Jenkinsfile.bckp | 27 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 23 deletions(-) create mode 100644 Jenkinsfile.bckp diff --git a/Jenkinsfile b/Jenkinsfile index 20f49b2..d8b015b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,27 +1,16 @@ pipeline { - agent any - stages { - stage('Checkout') { - steps { - checkout scm - } - } - stage('Build') { - steps { - // Add build commands here, e.g., sh 'make build' - sh 'echo "Building project..."' - } - } - stage('Test') { - steps { - // Add test commands here - sh 'echo "Running tests..."' - } - } - } - post { - failure { - echo 'The build failed.' + agent any + stages { + stage('Checkout') { + steps { + withCredentials([string(credentialsId: 'jenkins', variable: 'd7624903f15d6e2e5f76d3ac001e9028eec2a6b5')]) { + if (isUnix()) { + sh 'git clone https://%d7624903f15d6e2e5f76d3ac001e9028eec2a6b5%@git.niascom.net/homelab/linux.git' + } else { + bat 'git clone https://%d7624903f15d6e2e5f76d3ac001e9028eec2a6b5%@git.niascom.net/homelab/linux.git' + } } + } } + } } diff --git a/Jenkinsfile.bckp b/Jenkinsfile.bckp new file mode 100644 index 0000000..20f49b2 --- /dev/null +++ b/Jenkinsfile.bckp @@ -0,0 +1,27 @@ +pipeline { + agent any + stages { + stage('Checkout') { + steps { + checkout scm + } + } + stage('Build') { + steps { + // Add build commands here, e.g., sh 'make build' + sh 'echo "Building project..."' + } + } + stage('Test') { + steps { + // Add test commands here + sh 'echo "Running tests..."' + } + } + } + post { + failure { + echo 'The build failed.' + } + } +}