Tekton on IBM Cloud — Level 1 Hello World Part: 2

Daniel Butler
4 min readJan 23, 2020

--

Please ensure you have completed part 1 before starting. https://medium.com/@dannyeb/tekton-on-ibm-cloud-level-1-hello-world-part-1-6a7800e9f2d4

In part 1 we created our Tekton pipeline definition, now we need somewhere to execute it. This is where IBM cloud comes in. We will create a Toolchain connected to our GitHub repository containing the pipeline. Then configure a Continuous Delivery Tekton pipeline running on a managed worker to execute it. At this stage, I am making the assumption you have a GitHub repository containing the pipeline definition created in part 1 and an IBM Cloud account. If you do not have an IBM Cloud account create one free here http://ibmcloud.com/

Creating A Toolchain

A toolchain is a set of tool integrations that support development, deployment, and operations tasks. Tekton has been added to the toolchain service so we will use it to manage our pipelines.

To start from the navigation menu select DevOps

Next, ensure your location is set to Dallas because at the time of writing it is the only region the managed Tekton workers are available. Then select create Toolchain.

We will select Build your own Toolchain from the other templates section.

Give your Toolchain a name and leave the rest of the values as default. You can double-check that the region is still set to Dallas. Then hit Create Toolchain.

Now you have a blank Toolchain let's add some tools to it. First, add the GitHub tool so we can connect to our repository containing the pipeline definition.

Follow the prompts to allow Toolchain access to your GitHub account, then fill in the form to point to the repository containing your pipeline definition. Then hit Create Integration.

The only other tool we need to add for now is the Delivery Pipeline. This will be our Tekton Pipeline.

Now give it a name and ensure the Pipeline type is set to Tekton.

Your Toolchain is now complete and we can move onto the next step of configuring Tekton.

Note

If you are using a new free account you may see this prompt. Go ahead and select add service and select the free lite plan, again ensuring the region Dallas is selected.

Configuring Tekton

From the Toolchain select the Delivery Pipeline you just created and you will be brought to the configuration page.

In the Definitions tab select add. Here you will select your GitHub repository you already added to the Toolchain. The branch you wish to use, probably master and the path to your Tekton pipeline definition ie the .tekton folder containing the YAML’s from part 1. Then hit save.

On the Workers tab you should see the managed worker already selected by default. If you do not see the managed workers here please double check you have created everything in the Dallas region.

Finally, we will create a manual trigger. Rename the Trigger to Hello World Trigger. You should see the hello-listener EventListener already selected. If not select it now. Then hit save and your Tekton Pipeline is now configured.

Executing the Tekton Pipeline

Finally, we are ready to execute our first Tekton Pipeline! Navigate back to the Toolchain and this time when you select the Delivery Pipeline it will bring you to the Delivery Pipeline Tekton Dashboard. From here select Run Pipeline and select Hello World Trigger.

After a few seconds, you should see your pipeline running. Click on the run and you should see Hello World output to the logs.

Conclusion

Congratulations you have just created and run your first Tekton pipeline! Now we have the groundwork done I will continue to expand on the hello world project and we will investigate the rest of the features available to use. The next tutorial we will cover parameters.

Level 2: https://medium.com/@dannyeb/tekton-on-ibm-cloud-level-2-parameters-2ebb32c2d329

--

--

Daniel Butler

Software Engineer for IBM. Over 10 years experience building automation solutions. “Automate All The Things!”