...

/

Exploring Build Pack Pipelines

Exploring Build Pack Pipelines

In this lesson we will explore the "pipeline.yaml" file and understand its various components.

As a reminder, we’ll take another quick look at the jenkins-x.yml file.

Press + to interact
cd go-demo-6
cat jenkins-x.yml

The output is as follows.

Press + to interact
buildPack: go

The pipeline is as short as it can be. It tells Jenkins that it should use the pipeline from the build pack go.

We already explored build packs and learned how we could extend them to fit out specific needs. But, we skipped discussing one of the key files in build packs. I intentionally avoided talking about the pipeline.yaml file because it uses the new format introduced in serverless Jenkins X. Given that at the time we explored build packs we did not yet know about the existence of serverless Jenkins X, it would have been too early to discuss new pipelines. Now that you are getting familiar with the serverless flavor, we can go back and explore pipeline.yaml located in each of the build packs.

Press + to interact
open "https://github.com/jenkins-x-buildpacks/jenkins-x-kubernetes"

Open packs followed with the go directory. We can see that pipeline.yaml is one of the build pack files, so let’s take a closer look.

Press + to interact
curl "https://raw.githubusercontent.com/jenkins-x-buildpacks/jenkins-x-kubernetes/master/packs/go/pipeline.yaml"

That pipeline is in the same format used for pipelines in serverless Jenkins X. Pipelines of our projects are referencing that one in the jenkins-x.yml file with the single line buildPack: go that tells the system to use the pipeline from the build pack, instead of ...