-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from raskyld/initial-alpha-release
Initial alpha release
- Loading branch information
Showing
4 changed files
with
69 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ This project is in its early day and is mostly an effort to | |
participate in the [Hacktoberfest](https://hacktoberfest.com) 2023! | ||
|
||
It's also my first open-source project as a maintainer. | ||
I am just gonna say that if you are interested in the concept or idea | ||
of the project, and wish to work with me on it, you can just drop me | ||
a mail at `[email protected]` so we can get in touch and I can start | ||
structuring the work a bit more ;) | ||
I am just going to say that if you are interested in the concept or idea | ||
of the project, and wish to work with me on it, you can just get | ||
in touch with me on the Tekton Slack, so we can start structuring the project | ||
a bit more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,45 @@ | ||
# Go Tektasker | ||
|
||
> :warning: This is a WIP and the main branch will stay non-functional | ||
> for a while, we are really early in the project ;) | ||
> :wrench: This project is in an **alpha** level of readiness. | ||
<p align="center"> | ||
<a href="https://go-tektasker.nocera.eu"> | ||
<img src="https://go-tektasker.nocera.eu/_astro/go-tektasker.18551fa8.svg"/> | ||
</a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://goreportcard.com/report/github.com/raskyld/go-tektasker"> | ||
<img src="https://goreportcard.com/badge/github.com/raskyld/go-tektasker"/> | ||
</a> | ||
</p> | ||
|
||
A framework for building | ||
[Tekton](https://tekton.dev) | ||
[Tasks](https://tekton.dev/docs/pipelines/tasks/) in Go. | ||
|
||
## :wrench: State of the `main` branch | ||
## Demo | ||
|
||
As of now, the CLI is capable of generating manifests for a list of Go package | ||
and outputting them in a directory or stdout. | ||
[demo-alpha-go-tektasker.webm](https://github.com/raskyld/go-tektasker/assets/32960642/ab00e31e-0c11-4fe0-91bd-16352039926e) | ||
|
||
This is the resulting YAML manifest of running tektasker on the package in | ||
`examples/`: | ||
## Features | ||
|
||
```yaml | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: Task | ||
metadata: | ||
labels: | ||
app.kubernetes.io/version: "0.1" | ||
name: example | ||
spec: | ||
description: | | ||
Package examples is a Tekton Task: | ||
- Generate YAML from Go package. | ||
- Use pure-go code to manipulate params and results. | ||
- Development Environment for a fast DX. | ||
|
||
Print a Hello World sorting people by score. | ||
params: | ||
- description: Message is the message you want to send to your user | ||
name: msg | ||
type: string | ||
- default: | ||
- jeremy | ||
- virginie | ||
description: Names are the names that will be used in the Hello World! | ||
name: names | ||
type: array | ||
- default: '{"jeremy": "10", "virginie": "10"}' | ||
description: Scores maps a name to a score | ||
name: scores | ||
type: string | ||
- default: '{"name": "virginie", "score": "10"}' | ||
description: SingleScore is the score of a single person | ||
name: sscore | ||
type: string | ||
- default: | ||
name: jeremy | ||
score: "10" | ||
description: StrictScore is the score of a single person | ||
name: strictscore | ||
properties: | ||
name: | ||
type: string | ||
score: | ||
type: string | ||
type: object | ||
results: | ||
- description: StructResult is a result that will be marshaled to valid JSON | ||
name: structresult | ||
type: string | ||
- description: ArrayResult is a result that will be marshaled to a valid JSON array | ||
value | ||
name: arrayresult | ||
type: array | ||
workspaces: | ||
- description: first workspace | ||
name: workspace1 | ||
optional: false | ||
readOnly: false | ||
- description: second workspace | ||
name: workspace2 | ||
optional: false | ||
readOnly: true | ||
- description: third workspace | ||
name: workspace3 | ||
optional: true | ||
readOnly: true | ||
``` | ||
## Installation | ||
|
||
## Road-map | ||
See the [installation instructions][install]. | ||
|
||
* Scaffold a simple Go project that will serves as the Task codebase | ||
* Adding `+tektasker:param` on a struct marks it as a | ||
[parameter](https://tekton.dev/docs/pipelines/tasks/#specifying-parameters) | ||
* Adding `+tektasker:result` on a struct marks it as a | ||
[result](https://tekton.dev/docs/pipelines/tasks/#emitting-results) | ||
* Provide some helper functions to Marshal/Unmarshal Results and Parameters | ||
* Generate the YAML manifest of the resulting | ||
[task](https://tekton.dev/docs/pipelines/tasks/#configuring-a-task) | ||
* Build and push the image on the behalf of | ||
the user using [ko](https://github.com/ko-build/ko) | ||
[install]: https://go-tektasker.nocera.eu/general/installation/ | ||
|
||
## Contributing | ||
|
||
See [CONTRIBUTING.md](./CONTRIBUTING.md) | ||
|
||
## Acknowledgements | ||
|
||
- Thanks to [@MariaLetta](https://github.com/MariaLetta) for [Free Gophers Pack](https://github.com/MariaLetta/free-gophers-pack)! 🤩 | ||
- Thanks to [Execore](https://pixabay.com/fr/users/execore-32910697/) for the music used in the demo 🎵 | ||
- Thanks to the *Tekton Authors* (indeed! 😏) | ||
- Thanks to the Kubernetes SIG `apimachinery` and to `kubebuilder` for the libraries this project is using 🚀 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters