Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tekton pipeline #87

Merged

Conversation

raffaelespazzoli
Copy link
Contributor

What does this PR do?

adds a new pipeline. This is a tekton pipeline. This pipeline deploys the basic-spring-boot app.
I have been tried to reproduce the behavior of the basic-spring-boot app.
Given the limite capabilities available in tekton that was not fully possible in some situations (eg human approval).
This is my first experience with tekotn and probably there is a lot of margin for improvement.
Feedback on this PR is very welcome.

How should this be tested?

readme.md

Is there a relevant Issue open for this?

#80

Who would you like to review this?

cc: @redhat-cop/containers-approvers

Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raffaelespazzoli excellent starting point. added some comments

This quickstart can be deployed quickly using Ansible. Here are the steps.

1. Clone [this repo](https://github.com/redhat-cop/container-pipelines)
2. `cd container-pipelines/basic-spring-boot`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be basic-spring-boot-tekton

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

This example demonstrates how to implement a full end-to-end [Tekton](https://tekton.dev/) Pipeline for a Java application in OpenShift Container Platform. This sample demonstrates the following capabilities:

* Deploying a Tekton pipeline via applier
* Building an promoting an application with a tekton pipeline
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raffaelespazzoli there needs to be a prerequisites section that describes how to install Tekton pipelines into a cluster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created prerequisite section


This pipeline defaults to use our [Spring Boot Demo App](https://github.com/redhat-cop/spring-rest).

## Bill of Materials
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like more of a Prerequisites instead of a Bill of Materials

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consolidated in prerequisite section

At this point you should you can run the pipeline by issuing the followinf command:

```shell
tkn pipeline start basic-spring-boot-pipeline -r source=basic-spring-boot-git -s tekton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be separated into its own section as it is applicable for both the automated and manual setup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a separate paragrph

At this point you should you can run the pipeline by issuing the followinf command:

```shell
tkn pipeline start basic-spring-boot-pipeline -r source=basic-spring-boot-git -s tekton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command should also be:

tkn pipeline start basic-spring-boot-pipeline -r basic-spring-boot=basic-spring-boot-git -s tekton

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final set of changes and then we should be good to merge


## Running the pipelines

Once you have deployed the needed infrastructure either with applier or manually, you should you can run the pipeline by issuing the following command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "you should"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Once you have deployed the needed infrastructure either with applier or manually, you should you can run the pipeline by issuing the following command:

```shell
tkn pipeline start basic-spring-boot-pipeline -r basic-spring-boot=basic-spring-boot-git -s tekton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend specifying the namespace either by having the user change into the basic-spring-boot-build project (oc project basic-spring-boot-build) or specify -n basic-spring-boot-build in the command

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also made a mistake in the command i shared to start the pipeline in my first comment:

tkn -n basic-spring-boot-build pipeline start basic-spring-boot-pipeline -r basic-spring-boot-git=basic-spring-boot-git -s tekton

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did both just in case

Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants