-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anoint <72187543+whoami-anoint@users.noreply.github.com>
- Loading branch information
1 parent
17daa70
commit d7dc5e6
Showing
1 changed file
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
pipeline { | ||
agent any | ||
|
||
stages { | ||
stage('Setup') { | ||
steps { | ||
script { | ||
// Clone the repository | ||
try { | ||
git branch: 'main', url: 'https://github.com/whoami-anoint/Probe' | ||
} catch (Exception e) { | ||
echo "Error: Failed to clone repository - ${e.message}" | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Prepare') { | ||
steps { | ||
script { | ||
// Download requirements.txt | ||
try { | ||
sh 'wget https://raw.githubusercontent.com/whoami-anoint/Probe/main/requirements.txt' | ||
} catch (Exception e) { | ||
echo "Error: Failed to download requirements.txt - ${e.message}" | ||
} | ||
|
||
// Make shell scripts executable | ||
try { | ||
sh 'chmod +x make.sh probe.sh' | ||
} catch (Exception e) { | ||
echo "Error: Failed to chmod +x for shell scripts - ${e.message}" | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
script { | ||
// Run make.sh | ||
try { | ||
sh './make.sh' | ||
} catch (Exception e) { | ||
echo "Error: Failed to execute make.sh - ${e.message}" | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Test') { | ||
steps { | ||
script { | ||
// Run probe.sh | ||
try { | ||
sh './probe.sh' | ||
} catch (Exception e) { | ||
echo "Error: Failed to execute probe.sh - ${e.message}" | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Cleanup') { | ||
steps { | ||
script { | ||
// Clean up workspace | ||
deleteDir() | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
success { | ||
echo 'Pipeline has completed successfully!' | ||
} | ||
|
||
failure { | ||
echo 'Pipeline has failed!' | ||
} | ||
} | ||
} |