 Hello, welcome to the second video on using pipelines with OpenShift version 3.3. In the last video, we have seen how to create a simple pipeline within the scope of a single project and create an application and deploy it in OpenShift 3.3. In this video, we'll edit that pipeline a little bit to go across the projects. So we'll have a development project where we will do a build and deployment. And we'll have a testing project where we'll just pull the image that was built in the development project and deploy it there. So in order to do that, this testing project would need image pull access from the development project's image stream. Now last time we had a CI CD project where the Jenkins pipeline was running. The pipeline will continue to run at the same place. So we'll have Jenkins running there, and the Jenkins would require edit access to both the development project and the testing project to be able to do a build and deploy in the development and the deployment in the testing project. So now I'm in the CI CD project. I have cleaned up this project to remove the application, my PHP that we used earlier. Let's go to the pipeline and edit this pipeline. So I'm making a few changes here. First, I'll call this first step as stage in development and the deploy as stage deploy in development. I will add another stage called stay deploy in testing. I'll change the name of the build config to my app just to show that we can use any name you want. And while we are working in the development project, we want the Jenkins running in the scope of the CI CD project to initiate a build in the development namespace. So we are going to load the development. And for deploy to QA, I'm adding a couple of steps here. First we'll tag the image stream in the development namespace. The source image stream is my app. We'll pick up the latest one and we'll tag it as my app colon promote to QA. Once the tagging is complete, we will deploy in the testing namespace a deployment configuration with my app and we'll create this deployment configuration using that promote to QA tag. Once the deployment is complete, we'll scale up this application to three instances. So those are the few changes we made to this pipeline. So we have three stages in the pipeline, build in development, deploy in development and then take the same image and deploy in testing. Now let's create the development and testing projects. I'm creating a project with the name development. Now I'm providing access to a service account with name Jenkins in the scope of that is in the scope of CI CD project. This service account is used to run Jenkins application in the CI CD project. So we are giving this Jenkins service account an ID troll to the development project, which means Jenkins service account can initiate the builds and deployments in the development project in the same way. I'll create a project called testing and provide Jenkins service account edit troll to the testing project as well. We also need to provide image puller access to the testing project to be able to pull from the development project. Now let's go back and check on the console. We have the two projects development and testing, the new ones that we added just now. So the development project is just created and it is empty. So in order for the pipeline to work, the pipeline is expecting a build configuration and the deployment configuration here, just like in first video. So I'm going to do the same exacting as what we did in the first video. Add the build configuration, deployment configuration for that my app. I have the service here. I have the route. I have build configuration. I have image stream. I have the deployment configuration. Now let's move on to the testing product. The testing project is also empty. The pipeline is expecting a deployment configuration with the name my app in the testing project as well. And this my app should pull the image that is tagged as promote to QA from the development project. So in order to create the deployment configuration, let's use command line. First, I'll switch through the testing project and I'll type in a command that creates a deployment configuration with the name my app. This is what the pipeline is expecting. And this uses the image my app with the tag promote to QA from the development project's image stream. So this is the image stream from which it will try to pull and deploy the application. When I create this, it will immediately try to start deploying it, but it will fail because there is no my app there with the promote to QA tag. Now I'll create a service and create a route by exposing the service. Let's go back to web console. Here is a service my app and the route for that service. It's trying to do a deployment. I'm going to cancel this build. I'll also make a couple of small changes to this deployment configuration. First, I'll remove this trigger. So whenever there's a config change, it will not automatically trigger a new deployment. And I'll change this image pool policy to always so that it doesn't use the image from cache when Jenkins invokes this deployment configuration to for a new deployment. Now let's switch over to the CI CD project and start a pipeline here. I'll start this pipeline now. It's starting a new build, the build and deployment which is the first stage just got started. This should invoke a new build in the development project. So let's switch over to the development project and see. Look at the bills. There is a new build that got started. Here are the logs. It's trying to download the source code. So this build was started by Jenkins from the CI CD project in the development project. The build is now complete and is triggering a deployment. Let's go back and check in the development project. It's deploying, now it is scaling up to two parts. Now that the scale up is complete, let's try this URL, which was a green rose. Let's go back and look at our pipeline. The deployment of testing is also complete. So let's go and look at the testing project. Here are our three parts. So let's test it again in the testing project. So this testing URL is also pointing to the green part. Now let's go back to our pipeline and actually let's change the code. I'm changing this to blue rose now, commit the changes and we'll initiate the pipeline again. The build in development has started again. The deployment in development is in progress. So now it is doing a rolling deployment. Let us check the application, which shows the blue rose. This is in the development project. Now I'll go to testing, rolling deployment is in progress. Deployment is complete and it shows the blue rose in the testing project as well. So going back to the pipeline, the second build is also complete, all the three stages. So it was a simple example of how you can edit your pipelines to go across different projects. I'll post the build configuration file and the Jenkins file that I used both in the previous video and this video on GitHub and I'll put it along with the blog post that accompanies this video. I hope you have enjoyed this video. Thanks a lot for watching.