[MWCI-170] Take advantage of podTemplate inheritance instead of a YAML template file Created: 09/May/19 Updated: 10/Jul/19 Resolved: 10/Jul/19 |
|
| Status: | Closed |
| Project: | Continuous Integration Infrastructure for Middleware Development |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Enrico Vianello | Assignee: | Enrico Vianello |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | ci | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
Take advantage of podTemplate inheritance instead of the same huge YAML file to run CI jobs |
| Comments |
| Comment by Enrico Vianello [ 09/May/19 ] |
|
Example of declarative pipeline with a containerTemplate based on a docker image: pipeline {
agent {
kubernetes {
cloud 'Kube mwdevel'
label 'python-pod'
inheritFrom 'test-docker-runner'
containerTemplate {
name 'python-runner'
image "italiangrid/storm-info-provider:${env.BRANCH_NAME}"
ttyEnabled true
command 'cat'
resourceRequestCpu '0.5'
resourceLimitCpu '0.5'
resourceRequestMemory '250Mi'
resourceLimitMemory '250Mi'
}
}
}
...
stages {
stage('tests') {
steps {
container('python-runner') {
...
}
}
}
}
}
|
| Comment by Enrico Vianello [ 09/May/19 ] |
|
Into 'Manage Jenkins' > 'Configure System' add the following podTemplates:
More details on attachments |