Olaf Bohlen
2020-07-07 72e1b3ae28c18821d1a3b050ac88db585133e0c8
apply pipe def
1 files added
40 ■■■■■ changed files
Jenkinsfile-apply 40 ●●●●● patch | view | raw | blame | history
Jenkinsfile-apply
New file
@@ -0,0 +1,40 @@
pipeline {
    triggers {
    pollSCM ('H/3 * * * *')
    }
    options {
    buildDiscarder (logRotator (numToKeepStr: '5', artifactNumToKeepStr: '5'))
    disableConcurrentBuilds()
    }
    agent {
    node {
        label 'nodejs'
    }
    }
    stages {
    stage ('Validate configuration resources') {
        steps {
        sh 'oc apply --dry-run -k config'
        }
    }
    stage ('Apply resources') {
        when {
        branch 'master'
        }
        steps {
        sh 'oc apply -k config'
        sh 'oc wait co/authentication --for condition=Progressing --timeout 15s || true'
        sh 'oc rollout status deployment/auth-openshift -n openshift-authentication -w --timeout 360s'
        }
    }
    stage ('Verify test user') {
        when {
        branch 'master'
        }
        steps {
        sh 'oc login -u testuser -p redhat123 --insecure-skip-tls-verify https://kubernetes.default.svc:443'
        sh 'oc new-project test-testuser || true'
        }
    }
    }
}