Add a preview pipeline
This commit is contained in:
parent
fc79631a1c
commit
bb8b27f0b7
3 changed files with 26 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
prev:
|
||||||
|
deployment:
|
||||||
|
frontend:
|
||||||
|
templates:
|
||||||
|
- manifest: deployment/manifests/app.yaml
|
||||||
|
parameters:
|
||||||
|
ENV: prev
|
||||||
|
REPLICAS: 1
|
||||||
dev:
|
dev:
|
||||||
deployment:
|
deployment:
|
||||||
frontend:
|
frontend:
|
||||||
|
|
8
deployment/preview-pipeline.groovy
Normal file
8
deployment/preview-pipeline.groovy
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
@Library('occd') _
|
||||||
|
|
||||||
|
node() {
|
||||||
|
stage("Deploy to PREV") {
|
||||||
|
occd.tag("rubex-dev", "frontend", "${SOURCE_IMAGE_STREAM_TAG}", "prev")
|
||||||
|
occd.rollout("rubex-prev", "frontend", config.prev.deployment.frontend)
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,9 +16,9 @@ oc create is oc-jenkins
|
||||||
oc tag --source=docker --scheduled=true omallo/oc-jenkins:latest openshift/oc-jenkins:latest
|
oc tag --source=docker --scheduled=true omallo/oc-jenkins:latest openshift/oc-jenkins:latest
|
||||||
|
|
||||||
oc login -u admin -p admin
|
oc login -u admin -p admin
|
||||||
oc new-project cicd
|
oc new-project rubex-prev
|
||||||
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-dev
|
oc policy add-role-to-user edit dev1 -n rubex-prev
|
||||||
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-test
|
oc policy add-role-to-user view test1 -n rubex-prev
|
||||||
|
|
||||||
oc login -u admin -p admin
|
oc login -u admin -p admin
|
||||||
oc new-project rubex-dev
|
oc new-project rubex-dev
|
||||||
|
@ -28,8 +28,15 @@ oc policy add-role-to-user view test1 -n rubex-dev
|
||||||
oc login -u admin -p admin
|
oc login -u admin -p admin
|
||||||
oc new-project rubex-test
|
oc new-project rubex-test
|
||||||
oc policy add-role-to-user edit test1 -n rubex-test
|
oc policy add-role-to-user edit test1 -n rubex-test
|
||||||
|
oc policy add-role-to-group system:image-puller system:serviceaccounts:rubex-prev -n rubex-dev
|
||||||
oc policy add-role-to-group system:image-puller system:serviceaccounts:rubex-test -n rubex-dev
|
oc policy add-role-to-group system:image-puller system:serviceaccounts:rubex-test -n rubex-dev
|
||||||
|
|
||||||
|
oc login -u admin -p admin
|
||||||
|
oc new-project cicd
|
||||||
|
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-prev
|
||||||
|
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-dev
|
||||||
|
oc policy add-role-to-user edit system:serviceaccount:cicd:jenkins -n rubex-test
|
||||||
|
|
||||||
oc login -u admin -p admin
|
oc login -u admin -p admin
|
||||||
oc project cicd
|
oc project cicd
|
||||||
oc process \
|
oc process \
|
||||||
|
|
Loading…
Reference in a new issue