Skip to content

Commit

Permalink
Fix Jenkinsfile examples in README (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSRobinson authored May 14, 2020
1 parent 9cf016e commit c1c44ce
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ Declarative Pipeline:

```groovy
pipeline {
agent any
environment {
NEWRELIC_API_KEY = credentials('newrelic-api-key')
}
stages {
stage('Foo') {
echo 'Hello world'
steps {
echo 'Hello world'
}
}
}
}
Expand Down Expand Up @@ -109,13 +112,16 @@ Declarative Pipeline:

```groovy
pipeline {
agent any
environment {
// Creates variables ARTIFACTORY=joe:supersecret, ARTIFACTORY_USR=joe, ARTIFACTORY_PSW=supersecret
ARTIFACTORY = credentials('artifactory')
}
stages {
stage('Foo') {
echo 'Hello world'
steps {
echo 'Hello world'
}
}
}
}
Expand Down Expand Up @@ -153,13 +159,16 @@ Declarative Pipeline:

```groovy
pipeline {
agent any
environment {
// Creates variables KEY=/temp/path/to/key, KEY_USR=joe
KEY = credentials('ssh-key')
}
stages {
stage('Foo') {
echo 'Hello world'
steps {
echo 'Hello world'
}
}
}
}
Expand Down Expand Up @@ -222,12 +231,15 @@ Declarative Pipeline:

```groovy
pipeline {
agent any
environment {
LICENSE_KEY_FILE = credentials('license-key')
}
stages {
stage('Example') {
echo 'Hello world'
steps {
echo 'Hello world'
}
}
}
}
Expand Down

0 comments on commit c1c44ce

Please sign in to comment.