Add Jenkins pipeline
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
|||||||
|
```groovy
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
echo "Building project..."
|
||||||
|
mkdir -p build
|
||||||
|
g++ main.cpp -o build/test_app
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Run') {
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
./build/test_app
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user