commit | author | age
|
46d457
|
1 |
# jenkins-s2i |
D |
2 |
This repo contains a sample s2i for jenkins used by the Red Hat Open Innovation Labs. |
|
3 |
|
|
4 |
## Adding plugins |
|
5 |
Add plugins to the `plugins.txt` file by including them in the form of `<plugin-id>:<version>`. Eg `email-ext:2.11`. |
|
6 |
|
|
7 |
To get a list of all plugins and their version on an existing Jenkins in this format run this command in the Groovy console. |
|
8 |
|
|
9 |
```groovy |
|
10 |
Jenkins.instance.pluginManager.plugins.each{ |
|
11 |
plugin -> |
|
12 |
println ("${plugin.getShortName()}:${plugin.getVersion()}") |
|
13 |
} |
|
14 |
``` |
|
15 |
## Adding seed jobs |
|
16 |
The JENKINS created by this s2i is loaded with a seed for creating a react app and golang pipeline. Additional seeds can be created by including them in `configuration/jobs/`. Create a new folder (for the jenkins job name) and add a `config.xml`. The example seeds point to a DSL stored with sample apps. |
|
17 |
|
|
18 |
## Slack Integration |
|
19 |
Edit the `configuration/jenkins.plugins.slack.SlackNotifier.xml` and replace `YOUR_TOKEN_GOES_HERE` with the slack endpoint token. Edit the domain name to match your team one too. |
|
20 |
|
|
21 |
## Git Credentials Generation |
|
22 |
The `init.groovy` contains some code run on launch. When deploying Jenkins, set the `GIT_USERNAME` and `GIT_PASSWORD` env variables to have them read in my this config generator |