Skip to content

Commit bcc5e29

Browse files
authored
Merge pull request #9 from carlosrodlop/meaningfulExample
[Pipeline Template Catalog]: Extending the basic example
2 parents 3856f62 + 897962f commit bcc5e29

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

pipeline-template-examples/templates/simple-java-maven-app/Jenkinsfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
pipeline {
22
agent any
3-
3+
44
stages {
5+
stage('Checkout') {
6+
steps {
7+
git credentialsId: "${github_creds}" , url: "${github_repo}"
8+
}
9+
}
510
stage('Build') {
611
steps {
712
sh 'mvn -B -DskipTests clean package'
@@ -34,4 +39,4 @@ pipeline {
3439
)
3540
}
3641
}
37-
}
42+
}

pipeline-template-examples/templates/simple-java-maven-app/template.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ parameters:
77
- name: emailRecipient
88
type: string
99
displayName: Email address to be used for sending build notifications
10+
- name: github_repo
11+
type: string
12+
displayName: GitHub HTTPS repo endpoint
13+
- name: github_creds
14+
displayName: GitHub Credentials ID
15+
type: credentials
16+
defaultValue: github-creds-example

0 commit comments

Comments
 (0)