Skip to content

Commit 7ec1db8

Browse files
committed
updated samples
1 parent e127795 commit 7ec1db8

10 files changed

Lines changed: 48 additions & 41 deletions

File tree

pipeline-template-examples/demos/credentials/README.md

Whitespace-only changes.

pipeline-template-examples/demos/multibranch-bitbucket-org/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# CloudBees Pipeline Templates Example
22
## Multibranch Pipeline Authentication for Bitbucket.org
33

4-
This example shows how to add authentication to Bitbucket.org. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core.
4+
This example shows how to add authentication to Bitbucket.org. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core, and Pipeline Templates then use the developer's value to replace the placeholder variable in the Jenkinsfile.
55

66
````
7-
type: MULTIBRANCH
8-
...
9-
107
multibranch:
118
branchSource:
129
bitbucket:

pipeline-template-examples/demos/multibranch-bitbucket-server/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# CloudBees Pipeline Templates Example
22
## Multibranch Pipeline Authentication for a Bitbucket Server
33

4-
This example shows how to add authentication to your organization's Bitbucket server. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core.
4+
This example shows how to add authentication to Bitbucket.org. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core, and Pipeline Templates then use the developer's value to replace the placeholder variable in the Jenkinsfile.
55

66
````
7-
type: MULTIBRANCH
8-
...
9-
107
multibranch:
118
branchSource:
129
bitbucket:

pipeline-template-examples/demos/multibranch-git/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# CloudBees Pipeline Templates Example
22
## Multibranch Pipeline Authentication for a Git Server
33

4-
This example shows how to add authentication to your Git server repository. The developer will supply the value for the ${repoUrl} parameter when they create their pipeline job in CloudBees Core.
4+
This example shows how to add authentication to Bitbucket.org. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core, and Pipeline Templates then use the developer's value to replace the placeholder variable in the Jenkinsfile.
55

66
````
7-
type: MULTIBRANCH
8-
...
9-
107
multibranch:
118
branchSource:
129
git:

pipeline-template-examples/demos/multibranch-github-com/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# CloudBees Pipeline Templates Example
22
## Multibranch Pipeline Authentication for Github.com
33

4-
This example shows how to add authentication to your Github.com repository. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core.
4+
This example shows how to add authentication to Bitbucket.org. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core, and Pipeline Templates then use the developer's value to replace the placeholder variable in the Jenkinsfile.
55

66
````
7-
type: MULTIBRANCH
8-
...
9-
107
multibranch:
118
branchSource:
129
github:

pipeline-template-examples/demos/multibranch-github-ent/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# CloudBees Pipeline Templates Example
22
## Multibranch Pipeline Authentication for Github Enterprise
33

4-
This example shows how to add authentication to your Github Enterprise repository. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core.
4+
This example shows how to add authentication to Bitbucket.org. The developer will supply the value for the ${repoName} parameter when they create their pipeline job in CloudBees Core, and Pipeline Templates then use the developer's value to replace the placeholder variable in the Jenkinsfile.
55

66
````
7-
type: MULTIBRANCH
8-
...
9-
107
multibranch:
118
branchSource:
129
github:

pipeline-template-examples/demos/notifications/README.md

Whitespace-only changes.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
pipeline {
2+
agent {
3+
docker {
4+
image 'maven:3-alpine'
5+
args '-v /root/.m2:/root/.m2'
6+
}
7+
}
8+
stages {
9+
stage('Build') {
10+
steps {
11+
sh 'mvn -B -DskipTests clean package'
12+
}
13+
}
14+
}
15+
16+
post {
17+
18+
// Email Ext plugin:
19+
success {
20+
21+
emailext (
22+
subject: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
23+
body: """<p>SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
24+
<p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
25+
to: "'${emailRecipient}'",
26+
from: "buildNotifications@emailaddress.com"
27+
)
28+
}
29+
30+
failure {
31+
32+
emailext (
33+
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
34+
body: """<p>FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
35+
<p>Check console output at &QUOT;<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>&QUOT;</p>""",
36+
to: "'${emailRecipient}'",
37+
from: "buildNotifications@emailaddress.com"
38+
)
39+
}
40+
}
41+
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ type: pipeline-template
44
name: Maven App Pipeline Job
55
description: Run browser compat tests in the dev environment.
66
parameters:
7-
- name: previewEnvHostname
8-
displayName: Preview env hostname
97
- name: emailRecipient
10-
displayName: Notification email address
8+
type: string
9+
displayName: Email address to be used for sending build notifications

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

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)