-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
44 lines (44 loc) · 1.39 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
pipeline {
agent {
kubernetes {
inheritFrom 'default'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: maven:3-eclipse-temurin-17-alpine
command:
- cat
tty: true
"""
}
}
stages {
stage('Checkout') {
steps {
container('maven') {
// Download the ZIP file
sh 'wget https://codeload.github.com/Gamerboy59/RocketBoots/zip/refs/heads/master -O RocketBoots.zip'
// Unzip the file
sh 'unzip RocketBoots.zip'
}
}
}
stage('Build and Archive') {
steps {
container('maven') {
dir('RocketBoots-master') { // change directory to the unzipped project
// Run Maven build with goals from pom.xml
sh 'mvn'
// Archive the build artifacts
archiveArtifacts artifacts: 'target/RocketBoots*.jar', allowEmptyArchive: true
// Create fingerprints for the archived artifacts
fingerprint 'target/RocketBoots*.jar'
}
}
}
}
}
}