You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding conditional steps to release tag and master branch & adding a … (#15)
* Adding conditional steps to release tag and master branch & adding a secret config to openshift applier if pushing to quay
* Updating README.md
* Updating README.md
* Replacing with the correct labs quay repo
Jenkins will spin up an Ansible agent that will run a playbook called OpenShift Applier (https://github.com/redhat-cop/openshift-applier). The `openshift-applier` is used to apply OpenShift objects to an OpenShift Cluster.
153
-
154
-
This agent is going to download the playbook dependencies using Ansible Galaxy and apply the playbook using **environment** as a *filter_tag*. This is going to create the necessary resources for our application deploy in an OpenShift cluster.
155
-
156
-
Once the resources are ready the pipeline is going to patch the DC with the new image and start a rollout deployment.
158
+
If you're pushing from a release tag the build will create a container image and push it to Quay.
157
159
158
160
```
159
-
oc set env dc ${APP_NAME} NODE_ENV=${NODE_ENV} QUARKUS_PROFILE=${QUARKUS_PROFILE}
160
-
oc set image dc/${APP_NAME} ${APP_NAME}=docker-registry.default.svc:5000/${PROJECT_NAMESPACE}/${APP_NAME}:${JENKINS_TAG}
161
-
oc label --overwrite dc ${APP_NAME} stage=${NODE_ENV}
162
-
oc patch dc ${APP_NAME} -p "{\\"spec\\":{\\"template\\":{\\"metadata\\":{\\"labels\\":{\\"version\\":\\"${VERSION}\\",\\"release\\":\\"${RELEASE}\\",\\"stage\\":\\"${NODE_ENV}\\",\\"git-commit\\":\\"${GIT_COMMIT}\\",\\"jenkins-build\\":\\"${JENKINS_TAG}\\"}}}}}"
163
-
oc rollout latest dc/${APP_NAME}
161
+
oc project ${PIPELINES_NAMESPACE} # probs not needed
162
+
oc patch bc ${APP_NAME} -p "{\\"spec\\":{\\"output\\":{\\"to\\":{\\"kind\\":\\"DockerImage\\",\\"name\\":\\"quay.io/rht-labs/${APP_NAME}:${JENKINS_TAG}\\"}}}}"
0 commit comments