Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (params.ENVIRONMENT == 'Cloud'){
- stage('Get commit'){
- podTemplate(label: jnlp, cloud: 'aks', containers:[
- containerTemplate(
- name: 'jnlp',
- image: 'jenkins/jnlp-slave:3.27-1-alpine',
- alwaysPullImage: false,
- args: '${computer.jnlpmac} ${computer.name}'
- ),
- ])
- {
- node(jnlp) {
- stage('Git checkout'){
- scmVars = checkout scm
- commit = scmVars.GIT_COMMIT
- }
- }
- }
- }
- stage('stage for parallel'){
- parallel (
- el5: {
- stage('Building module:el5'){
- podTemplate(label: el5, cloud: 'aks', containers:[
- containerTemplate(
- name: 'el5',
- image: 'sandbox.repo/oa-build-envs/el5:8.3.6',
- alwaysPullImage: false,
- command: 'cat',
- ttyEnabled: true,
- resourceRequestCpu: '5000m',
- resourceRequestMemory: '5G'
- ),
- ],
- imagePullSecrets: [ 'sandbox-secret' ]
- )
- {
- node(el5) {
- container('el5') {
- timestamps {
- wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) {
- timeout(time: 60, unit: 'MINUTES') {
- gitCheckout(commit)
- modulesBuild()
- }
- }
- }
- }
- }
- }
- }
- },
- el6: {
- stage('Building module: el6'){
- podTemplate(label: el6, cloud: 'aks', containers:[
- containerTemplate(
- name: 'el6',
- image: 'sandbox.repo/oa-build-envs/el6:8.3.5',
- alwaysPullImage: false,
- command: 'cat',
- ttyEnabled: true,
- resourceRequestCpu: '5000m',
- resourceRequestMemory: '5G'
- ),
- ],
- imagePullSecrets: [ 'sandbox-secret' ]
- )
- {
- node(el6) {
- container('el6') {
- timestamps {
- wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) {
- timeout(time: 60, unit: 'MINUTES') {
- gitCheckout(commit)
- modulesBuild()
- }
- }
- }
- }
- }
- }
- }
- }
- )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement