├── .dockerignore ├── .github ├── pull_request_template.md └── workflows │ ├── nightly-deploy.yml │ └── ruff.yml ├── .gitignore ├── .hugo_build.lock ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── DEVELOPMENT.md ├── Dockerfile ├── LICENSE ├── Makefile ├── OWNERS ├── README.md ├── asciinema ├── README.md ├── pipeline.yaml ├── run.sh ├── scenario.sh └── task.yaml ├── assets ├── css │ └── asciinema-player.css ├── icons │ ├── logo.png │ └── logo.svg ├── js │ ├── anchor.js │ ├── asciinema-player.js │ └── click-to-copy.js └── scss │ ├── _styles_project.scss │ └── _variables_project.scss ├── config.yaml ├── content └── en │ ├── _index.html │ ├── blog │ ├── 2022 │ │ └── graduation │ │ │ ├── banner.png │ │ │ ├── contributions.png │ │ │ ├── index.md │ │ │ └── releases.png │ ├── 2023 │ │ ├── cdcon-gitopscon │ │ │ ├── banner.png │ │ │ └── index.md │ │ ├── distributed-traces-for-testing-with-tekton-pipelines-and-tracetest │ │ │ ├── index.md │ │ │ ├── tekton-dashboard-6.png │ │ │ ├── tracetest-assertions-3.png │ │ │ ├── tracetest-assertions-4.png │ │ │ ├── tracetest-automate-5.png │ │ │ ├── tracetest-dashboard-preview-7.png │ │ │ ├── tracetest-tekton-architecture-1.png │ │ │ ├── tracetest-trace-view-2.png │ │ │ └── tracetest-web-ui-1.png │ │ ├── slsa-2 │ │ │ ├── example.png │ │ │ ├── index.md │ │ │ ├── levels.png │ │ │ ├── p1.png │ │ │ ├── p2.png │ │ │ ├── p3.png │ │ │ ├── p4.png │ │ │ └── provenance.png │ │ └── speeding-up-container-image-builds-in-tekton-pipelines │ │ │ ├── image1.png │ │ │ ├── image2.png │ │ │ ├── image3.png │ │ │ ├── image4.png │ │ │ ├── index.md │ │ │ └── tekton-speed-builds │ │ │ ├── README.md │ │ │ ├── kaniko-basecache │ │ │ ├── image-build-basecache-old.yaml │ │ │ ├── image-build-basecache.yaml │ │ │ ├── kaniko-warmer.yaml │ │ │ ├── pipeline-basecache.yaml │ │ │ └── pvc-basecache.yaml │ │ │ ├── kaniko-cache │ │ │ ├── Dockerfile.cache │ │ │ └── image-build-cache.yaml │ │ │ ├── m2cache │ │ │ ├── image-build-m2cache.yaml │ │ │ └── pvc-m2cache.yaml │ │ │ ├── sample-app │ │ │ ├── Dockerfile │ │ │ ├── mvnw │ │ │ ├── mvnw.cmd │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── demo │ │ │ │ │ └── DemoApplication.java │ │ │ │ └── resources │ │ │ │ ├── application.properties │ │ │ │ ├── static │ │ │ │ ├── favicon.ico │ │ │ │ └── tekton-horizontal-color.png │ │ │ │ └── templates │ │ │ │ └── index.html │ │ │ └── tekton-assets │ │ │ ├── git-clone.yaml │ │ │ ├── image-build.yaml │ │ │ ├── pipeline.yaml │ │ │ └── source-pvc.yaml │ ├── 2025 │ │ └── ghcr-migration │ │ │ └── index.md │ └── _index.md │ ├── community │ └── _index.md │ ├── docs │ ├── Catalog │ │ └── _index.md │ ├── Concepts │ │ ├── _index.md │ │ ├── concept-model.md │ │ ├── concept-resources.png │ │ ├── concept-runs.png │ │ ├── concept-tasks-pipelines.png │ │ ├── overview.md │ │ └── supply-chain-security.md │ ├── Contribute │ │ ├── _index.md │ │ ├── blog-guidelines.md │ │ ├── doc-con-content.md │ │ ├── doc-con-formatting.md │ │ ├── doc-con-writing.md │ │ ├── run-locally.md │ │ ├── samples │ │ │ ├── pipeline1.yaml │ │ │ ├── pipeline2.yaml │ │ │ └── task.yaml │ │ └── vendor-docs.md │ ├── Getting-started │ │ ├── _index.md │ │ ├── pipelines.md │ │ ├── samples │ │ │ ├── build-push-run.yaml │ │ │ ├── build-push.yaml │ │ │ └── provenance.json │ │ ├── supply-chain-security.md │ │ ├── tasks.md │ │ └── triggers.md │ ├── How-to-guides │ │ ├── _index.md │ │ ├── clone-repository.md │ │ └── kaniko-build-push.md │ ├── Installation │ │ ├── _index.md │ │ ├── additional-configs.md │ │ ├── local-installation.md │ │ ├── pipelines.md │ │ └── triggers.md │ └── _index.md │ ├── featured-background.jpeg │ ├── search.md │ └── vendor │ ├── README.md │ ├── disclaimer.md │ ├── google │ ├── pipelines-install.md │ └── registry-authentication.md │ └── redhat │ └── pipelines-install.md ├── docker-compose.yaml ├── go.mod ├── go.sum ├── i18n └── en.toml ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ └── render-codeblock-mermaid.html │ ├── baseof.html │ └── search.html ├── community │ └── list.html ├── docs │ └── baseof.html ├── partials │ ├── banner.html │ ├── community-links.html │ ├── favicons.html │ ├── footer.html │ ├── head.html │ ├── navbar-version-selector-docs.html │ ├── navbar-version-selector-vault.html │ ├── navbar.html │ ├── page-meta-links.html │ ├── privacy-notice.html │ ├── release-selector.html │ ├── scripts.html │ ├── sidebar-tree-docs.html │ ├── sidebar-tree-vault.html │ ├── sidebar.html │ └── tutorial-modal.html └── shortcodes │ ├── blocks │ ├── cover.html │ ├── manifesto.html │ ├── partners-alternate.html │ ├── partners.html │ └── showcase.html │ ├── comment.html │ ├── tab.html │ ├── tabs.html │ └── tutorial.html ├── netlify.toml ├── package.json ├── public └── _redirects ├── requirements.txt ├── roadmap.md ├── runtime.txt ├── static ├── asciinema │ └── demo.cast ├── favicons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── mstile-150x150.png │ ├── safari-pinned-tab.svg │ └── site.webmanifest ├── images │ ├── TriggerFlow.svg │ ├── mental_model.png │ └── tekton-horizontal-color.png └── partner-logos │ ├── cdf.png │ ├── google.png │ └── tekton-friends.png ├── sync ├── Dockerfile ├── README.md ├── config │ ├── README.md │ ├── chains.yaml │ ├── cli.yaml │ ├── dashboard.yaml │ ├── operator.yaml │ ├── pipelines.yaml │ ├── results.yaml │ └── triggers.yaml ├── requirements.txt ├── runtime.txt ├── sync.py ├── test-content │ ├── content.md │ ├── nested │ │ ├── another.md │ │ ├── content.md │ │ └── example.yaml │ ├── tekton.png │ ├── test.txt │ └── unwanted.txt ├── test_sync.py ├── test_versions.py └── versions.py └── templates ├── README.md ├── _index.md.template ├── release-switcher.js.template └── version-switcher.js.template /.dockerignore: -------------------------------------------------------------------------------- 1 | # Ignore node and python module directores when running in a container 2 | 3 | node_modules 4 | .venv 5 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Changes 4 | 5 | 7 | 8 | # Submitter Checklist 9 | 10 | These are the criteria that every PR should meet, please check them off as you 11 | review them: 12 | 13 | - [ ] Includes [docs](https://github.com/tektoncd/community/blob/master/standards.md#principles) (if user facing) 14 | - [ ] Commit messages follow [commit message best practices](https://github.com/tektoncd/community/blob/master/standards.md#commit-messages) 15 | 16 | _See [the contribution guide](https://github.com/tektoncd/website/blob/master/CONTRIBUTING.md) 17 | for more details._ 18 | -------------------------------------------------------------------------------- /.github/workflows/nightly-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Trigger Netlify Build 2 | on: 3 | schedule: 4 | # Run at 3:15AM UTC daily 5 | - cron: '15 3 * * *' 6 | jobs: 7 | build: 8 | name: Request Netlify Webhook 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Curl request 12 | env: 13 | NETLIFY_BUILD_HOOK: ${{ secrets.NETLIFY_BUILD_HOOK }} 14 | run: curl -X POST -d {} $NETLIFY_BUILD_HOOK 15 | -------------------------------------------------------------------------------- /.github/workflows/ruff.yml: -------------------------------------------------------------------------------- 1 | name: Ruff - Python Linter 2 | on: [push, pull_request] 3 | jobs: 4 | ruff: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v3 8 | - uses: chartboost/ruff-action@v1 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node 2 | package-lock.json 3 | node_modules/ 4 | 5 | # Generated content 6 | resources/_gen/ 7 | public/** 8 | ## Allow redirect file. 9 | !public/_redirects 10 | assets/js/version-switcher.js 11 | assets/js/release-switcher.js 12 | 13 | # IDEs 14 | .vscode 15 | **/.idea/ 16 | .coverage 17 | 18 | # Python file for sync 19 | tkn_web_env 20 | **/.venv 21 | **/__pycache__/ 22 | 23 | # Synced docs 24 | content/en/docs/Pipelines 25 | content/en/docs/Triggers 26 | content/en/docs/CLI 27 | content/en/vault/ 28 | content/en/docs/Chains 29 | content/en/docs/Operator 30 | content/en/docs/Dashboard 31 | content/en/docs/Results 32 | sync/.cache 33 | 34 | # Local Netlify folder 35 | .netlify 36 | 37 | # MacOS folders 38 | **/.DS_Store 39 | -------------------------------------------------------------------------------- /.hugo_build.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/.hugo_build.lock -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of 9 | experience, education, socio-economic status, nationality, personal appearance, 10 | race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | - Using welcoming and inclusive language 18 | - Being respectful of differing viewpoints and experiences 19 | - Gracefully accepting constructive criticism 20 | - Focusing on what is best for the community 21 | - Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | - The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | - Trolling, insulting/derogatory comments, and personal or political attacks 28 | - Public or private harassment 29 | - Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | - Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or reject 41 | comments, commits, code, wiki edits, issues, and other contributions that are 42 | not aligned to this Code of Conduct, or to ban temporarily or permanently any 43 | contributor for other behaviors that they deem inappropriate, threatening, 44 | offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at 59 | tekton-code-of-conduct@googlegroups.com. All complaints will be reviewed and 60 | investigated and will result in a response that is deemed necessary and 61 | appropriate to the circumstances. The project team is obligated to maintain 62 | confidentiality with regard to the reporter of an incident. Further details of 63 | specific enforcement policies may be posted separately. 64 | 65 | Project maintainers who do not follow or enforce the Code of Conduct in good 66 | faith may face temporary or permanent repercussions as determined by other 67 | members of the project's leadership. 68 | 69 | ## Attribution 70 | 71 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 72 | version 1.4, available at 73 | https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 74 | 75 | [homepage]: https://www.contributor-covenant.org 76 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the Tekton website 2 | 3 | Thanks for considering contributing to our project! 4 | 5 | **All contributors must comply with 6 | [the code of conduct](./CODE-OF-CONDUCT.md).** 7 | 8 | To get started developing, see our [DEVELOPMENT.md](./DEVELOPMENT.md) and [DOC-CON-MAIN.md](./content/en/doc-con-main.md). 9 | 10 | - The [OWNERS](OWNERS) of this repo are the 11 | [members of the Tekton governing board](https://github.com/tektoncd/community/blob/main/governance.md) 12 | as well as folks from the Linux Foundation who contribute to this project. 13 | 14 | In [the community repo](https://github.com/tektoncd/community) you'll find info 15 | on: 16 | 17 | - [Contacting other contributors](https://github.com/tektoncd/community/blob/main/contact.md) 18 | - [Development standards](https://github.com/tektoncd/community/blob/main/standards.md) 19 | including standards for 20 | [commit messages](https://github.com/tektoncd/community/blob/main/standards.md#commit-messages) 21 | - [Processes](https://github.com/tektoncd/community/blob/main/process.md) like 22 | [reviews](https://github.com/tektoncd/community/blob/main/process.md#reviews) 23 | 24 | You can find details on our automation infrastructure in 25 | [the plumbing repo](https://github.com/tektoncd/plumbing). 26 | -------------------------------------------------------------------------------- /DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | # Developing the Tekton website 2 | 3 | - [Developing the Tekton website](#developing-the-tekton-website) 4 | - [Running in a Docker container](#running-in-a-docker-container) 5 | - [Running Natively](#running-natively) 6 | - [tekton.dev](#tektondev) 7 | 8 | ## Running in a Docker container 9 | 10 | ### Prerequisites 11 | 12 | Install [Docker Compose](https://docs.docker.com/compose/install/). 13 | 14 | ### Setup 15 | 16 | 1. Build the Docker image 17 | 18 | ```bash 19 | docker-compose build 20 | 21 | ``` 22 | 23 | 1. Run the built image 24 | 25 | ```bash 26 | docker-compose up 27 | ``` 28 | 29 | 1. Verify that the website is working 30 | 31 | Open your web browser and type `http://localhost:8888` in the navigation bar. 32 | This opens a local instance of the website, you can now make changes in the 33 | documentation and those changes will immediately show up in the browser after 34 | you save. 35 | 36 | To remove the produced images run: 37 | 38 | ```bash 39 | docker-compose rm 40 | ``` 41 | 42 | ## Running Natively 43 | 44 | ### Prerequisites 45 | 46 | * [python3](https://www.python.org/downloads/) 47 | * [hugo v0.107.0 (EXTENDED VERSION)](https://github.com/gohugoio/hugo/releases/v0.107.0) 48 | * [pip](https://pip.pypa.io/en/stable/installing/) 49 | * [git 1.8.5 or later](https://github.com/git/git/releases) 50 | * [npm v10.9.2](https://nodejs.org/en/) 51 | * [node v22.14.0](https://nodejs.org/en/) 52 | 53 | ### Setup 54 | 55 | 1. Clone the repository 56 | 57 | ```bash 58 | git clone https://github.com/tektoncd/website && cd website 59 | ``` 60 | 61 | 1. Install the required node modules 62 | 63 | ```bash 64 | npm install 65 | ``` 66 | 67 | 1. Install the dependencies for the [sync script](https://github.com/tektoncd/website/blob/master/sync/README.md) 68 | 69 | ```bash 70 | python3 -m venv .venv 71 | source .venv/bin/activate 72 | pip3 install -r requirements.txt 73 | ``` 74 | 75 | 1. Run the sync script 76 | 77 | ```bash 78 | ./sync/sync.py 79 | ``` 80 | 81 | 1. Serve the website locally 82 | 83 | ```bash 84 | npm start 85 | ``` 86 | 87 | 1. Verify that the website is working 88 | 89 | Open your web browser and type `http://localhost:8888` in the navigation bar. 90 | This opens a local instance of the website, you can now make changes in the 91 | documentation and those changes will immediately show up in the browser after 92 | you save. 93 | 94 | The `sync.py` script clones the required repositories to a local cache folder, by default `sync/.cache`. 95 | You can modify content and create commits in your local cache to test changes to the original docs. 96 | 97 | To force and update of the local cache, use `./sync/sync.py --update-cache`. 98 | 99 | ## tekton.dev 100 | 101 | - The latest website is available at [https://tekton.dev/](https://tekton.dev/). 102 | - The old website is available at [https://tekton-old.netlify.app/](https://tekton-old.netlify.app/) and based on the branch [website-old](https://github.com/tektoncd/website/tree/website-old). 103 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM klakegg/hugo:ext-ubuntu as website 2 | RUN apt -y update && apt -y install git build-essential python3-venv python3-pip 3 | COPY . /src 4 | RUN git config --global --add safe.directory /src 5 | RUN npm install 6 | RUN npm install -g netlify-cli 7 | 8 | RUN python3 -m venv .venv 9 | RUN . .venv/bin/activate 10 | RUN pip3 install -r requirements.txt 11 | 12 | ENTRYPOINT ["/usr/bin/netlify"] 13 | CMD ["dev"] 14 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: sync 2 | sync: 3 | git config http.postBuffer 524288000 4 | python3 sync/sync.py --update-cache 5 | 6 | .PHONY: serve 7 | serve: sync 8 | hugo server \ 9 | --baseURL $(URL) \ 10 | --buildDrafts \ 11 | --buildFuture \ 12 | --disableFastRender \ 13 | --ignoreCache \ 14 | --liveReloadPort 8888 \ 15 | --watch 16 | 17 | .PHONY: production-build 18 | production-build: sync 19 | hugo --baseURL $(URL) 20 | 21 | .PHONY: preview-build 22 | preview-build: sync 23 | hugo --baseURL $(DEPLOY_PRIME_URL) 24 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | # The OWNERS file is used by prow to automatically merge approved PRs. 2 | 3 | approvers: 4 | - bobcatfish 5 | - dlorenc 6 | - vdemeester 7 | - kimsterv 8 | - abayer 9 | - lucperkins 10 | - afrittoli 11 | - skaegi 12 | - AlanGreene 13 | - jjasghar 14 | - popcor255 15 | - geriom 16 | - dibyom 17 | 18 | # Alumni ❤️ 19 | # sbwsg 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TektonCD Website 2 | 3 | This repo contains the code behind [the Tekton org's](https://github.com/tektoncd) 4 | website at [tekton.dev](https://tekton.dev). 5 | 6 | For more information on the Tekton Project, see 7 | [the community repo](https://github.com/tektoncd/community). 8 | 9 | For more information on contributing to the website see: 10 | 11 | * [CONTRIBUTING.md](CONTRIBUTING.md) 12 | * [DEVELOPMENT.md](DEVELOPMENT.md) 13 | -------------------------------------------------------------------------------- /asciinema/README.md: -------------------------------------------------------------------------------- 1 | This directory includes the configuration for rendering the asciinema 2 | panel in the tekton.dev homepage. 3 | 4 | A rendered panel (an asciinema cast) has been included at 5 | `../static/asciinema/demo.cast`. To rebuild the cast, run the commands below: 6 | 7 | ```bash 8 | ./run.sh 9 | rm -f ../static/asciinema/demo.cast 10 | mv ./demo.cast ../static/asciinema/demo.cast 11 | ``` 12 | -------------------------------------------------------------------------------- /asciinema/pipeline.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Pipeline 3 | metadata: 4 | name: build-go-app-pipeline 5 | spec: 6 | ... 7 | tasks: 8 | - name: build-go-app-task 9 | taskRef: 10 | name: build-go-app-task 11 | ... 12 | -------------------------------------------------------------------------------- /asciinema/run.sh: -------------------------------------------------------------------------------- 1 | rm -f demo.cast 2 | asciinema rec demo.cast -c "./scenario.sh" -------------------------------------------------------------------------------- /asciinema/scenario.sh: -------------------------------------------------------------------------------- 1 | echo "# See Tekton in action!" | pv -qL 12 2 | echo "# Tekton is available as Kubernetes Custom Resource Definitions " | pv -qL 12 3 | echo "# (CRD) that you can install in your Kubernetes cluster" | pv -qL 12 4 | echo '# And it uses container images to perform operations in your ' | pv -qL 12 5 | echo '# CI/CD pipeline' | pv -qL 12 6 | echo "# Let's say you would like to compile a Go program with Tekton" | pv -qL 12 7 | echo '# First, write a Tekton task:' | pv -qL 12 8 | echo 'cat task.yaml' | pv -qL 12 9 | cat task.yaml | lolcat 10 | echo '' 11 | echo '------------------------' | pv -qL 6 12 | echo '# And apply it to your Kubernetes cluster:' | pv -qL 12 13 | echo 'kubectl apply -f task.yaml' | pv -qL 12 14 | echo '# Next, organize your task into a Tekton pipeline:' | pv -qL 12 15 | echo 'cat pipeline.yaml' | pv -qL 12 16 | cat pipeline.yaml | lolcat 17 | echo '' 18 | echo '------------------------' | pv -qL 6 19 | echo '# And apply it to your Kubernetes cluster as well:' | pv -qL 12 20 | echo 'kubectl apply -f pipeline.yaml' | pv -qL 12 21 | echo '# And it is done :)' | pv -qL 12 22 | echo '# You can run your pipeline manually, or trigger it every time an ' | pv -qL 12 23 | echo '# event arrives, such as one from a GitHub webhook' | pv -qL 12 24 | echo '# Tekton has a dashboard and a CLI as well' | pv -qL 12 25 | echo '# Learn more about Tekton at ' | pv -qL 12 26 | echo '# tekton.dev/docs' | cat | pv -qL 12 | lolcat 27 | -------------------------------------------------------------------------------- /asciinema/task.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: build-go-app-task 5 | spec: 6 | resources: 7 | inputs: 8 | # Some inputs, such as your GitHub repository 9 | ... 10 | steps: 11 | - name: build 12 | image: golang 13 | command: 14 | - go 15 | - build 16 | args: 17 | - /workspace/myapp 18 | -------------------------------------------------------------------------------- /assets/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/assets/icons/logo.png -------------------------------------------------------------------------------- /assets/js/anchor.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | (function ($) { 18 | 'use strict'; 19 | 20 | // Headers' anchor link that shows on hover 21 | $(function () { 22 | // append anchor links to headings in markdown. 23 | var article = document.getElementsByTagName('main')[0]; 24 | if (!article) { 25 | return; 26 | } 27 | var headings = article.querySelectorAll('h1, h2, h3, h4, h5, h6'); 28 | headings.forEach(function (heading) { 29 | if (heading.id) { 30 | var a = document.createElement('a'); 31 | // set visibility: hidden, not display: none to avoid layout change 32 | a.style.visibility = 'hidden'; 33 | // [a11y] hide this from screen readers, etc.. 34 | a.setAttribute('aria-hidden', 'true'); 35 | // material insert_link icon in svg format 36 | a.innerHTML = ' '; 37 | a.href = '#' + heading.id; 38 | heading.insertAdjacentElement('beforeend', a); 39 | heading.addEventListener('mouseenter', function () { 40 | a.style.visibility = 'initial'; 41 | }); 42 | heading.addEventListener('mouseleave', function () { 43 | a.style.visibility = 'hidden'; 44 | }); 45 | } 46 | }); 47 | }); 48 | 49 | }(jQuery)); 50 | -------------------------------------------------------------------------------- /assets/js/click-to-copy.js: -------------------------------------------------------------------------------- 1 | let codeListings = document.querySelectorAll('.highlight > pre'); 2 | 3 | for (let index = 0; index < codeListings.length; index++) 4 | { 5 | const codeSample = codeListings[index].querySelector('code'); 6 | const copyButton = document.createElement("button"); 7 | copyButton.setAttribute('type', 'button'); 8 | copyButton.onclick = function() { copyCode(codeSample); }; 9 | copyButton.classList.add('fas', 'fa-copy'); 10 | 11 | const buttonTooltip = document.createElement('div'); 12 | buttonTooltip.classList.add('c2c-tooltip'); 13 | buttonTooltip.setAttribute('role', 'tooltip'); 14 | buttonTooltip.innerHTML += 'Copy to clipboard'; 15 | 16 | const buttonDiv = document.createElement('div'); 17 | buttonDiv.classList.add('click-to-copy'); 18 | 19 | // Use Popper to create and handle the tooltip behavior. 20 | 21 | const popperInstance = Popper.createPopper(copyButton, buttonTooltip, 22 | { 23 | modifiers: 24 | [ 25 | { 26 | name: 'offset', 27 | options: 28 | { 29 | offset: [0, -48], 30 | }, 31 | }, 32 | ], 33 | }); 34 | 35 | copyButton.addEventListener('click', () => 36 | { 37 | buttonTooltip.innerHTML = 'Copied!'; 38 | }); 39 | 40 | copyButton.addEventListener('mouseenter', () => 41 | { 42 | buttonTooltip.setAttribute('show-tooltip', ''); 43 | 44 | // Enable eventListeners when the code block is on the viewport 45 | 46 | popperInstance.setOptions((options) => ({ 47 | ...options, 48 | modifiers: 49 | [ 50 | ...options.modifiers, 51 | { name: 'eventListeners', enabled: true }, 52 | ], 53 | })); 54 | popperInstance.update(); 55 | }); 56 | 57 | copyButton.addEventListener('mouseleave', () => 58 | { 59 | buttonTooltip.removeAttribute('show-tooltip'); 60 | 61 | // Reset the message in case the button was clicked 62 | buttonTooltip.innerHTML = 'Copy to clipboard'; 63 | 64 | // Disble eventListeners when the code block is NOT on the viewport 65 | 66 | popperInstance.setOptions((options) => ({ 67 | ...options, 68 | modifiers: 69 | [ 70 | ...options.modifiers, 71 | { name: 'eventListeners', enabled: false }, 72 | ], 73 | })); 74 | }); 75 | 76 | buttonDiv.append(copyButton); 77 | buttonDiv.append(buttonTooltip); 78 | codeListings[index].insertBefore(buttonDiv, codeSample); 79 | 80 | } 81 | 82 | function copyCode(codeSample) 83 | { 84 | navigator.clipboard.writeText(codeSample.textContent.trim()); 85 | } 86 | 87 | -------------------------------------------------------------------------------- /assets/scss/_styles_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Styling for privacy notice watermark in privacy-notice.html 3 | */ 4 | #privacy-notice { 5 | background-color: rgba(84, 73, 75, 0.9); 6 | position: fixed; 7 | bottom: 0%; 8 | right: 0%; 9 | width: 500px; 10 | min-height: 10rem; 11 | box-shadow: -8px -8px 8px 0 rgba(0, 0, 0, 0.3), 2px -6px 20px 0 rgba(0, 0, 0, 0.2); 12 | z-index: 1; 13 | } 14 | 15 | /* Styling for version-switcher dropdown */ 16 | 17 | .dropdown-menu { 18 | border: 2px solid $primary; 19 | max-height: 50vh; 20 | overflow-y: auto; 21 | } 22 | 23 | /* 24 | Styling for mobile: 25 | */ 26 | @media only screen and (max-width: $mobile-width) { 27 | #banner-hero-logo { 28 | display: none 29 | } 30 | 31 | #privacy-notice { 32 | width: 100vw; 33 | } 34 | 35 | .td-box .row { 36 | padding-left: 1rem; 37 | padding-right: 1rem; 38 | } 39 | } 40 | 41 | /* Top nav bar background */ 42 | 43 | .td-navbar-cover { 44 | &.navbar-bg-onscroll { 45 | background: $dark !important 46 | } 47 | } 48 | 49 | /* Remove default styles from community page lists */ 50 | 51 | .linkbox { 52 | ul { 53 | list-style-type: none 54 | } 55 | } 56 | 57 | /* Styles for RSS link */ 58 | .td-rss-button { 59 | background-color: $primary !important; 60 | 61 | &:hover { 62 | color: #fff !important; 63 | background-color: darken($primary, 10%) !important; 64 | } 65 | } 66 | 67 | /* Vertical scrolling for large code samples */ 68 | 69 | pre { 70 | max-height: 25em; 71 | overflow-y: auto; 72 | } 73 | 74 | /* Click-to-copy button styles */ 75 | 76 | .highlight { 77 | 78 | position: relative; 79 | 80 | .click-to-copy { 81 | display: block; 82 | text-align: right; 83 | height: 1ex; 84 | } 85 | 86 | pre { 87 | 88 | button { 89 | position: absolute; 90 | color: $light; 91 | border-radius: 3px; 92 | border-width: 0; 93 | background-color: inherit; 94 | box-shadow: 1px 1px $light; 95 | right: 18px !important; 96 | top: 6px; 97 | } 98 | 99 | button:hover { 100 | color: $dark; 101 | background-color: $light; 102 | } 103 | 104 | button:active { 105 | color: $dark; 106 | background-color: $light; 107 | transform: translateY(2px); 108 | } 109 | 110 | .c2c-tooltip { 111 | background: $dark; 112 | color: white; 113 | padding: 2px 4px; 114 | border-radius: 3px; 115 | display: block; 116 | visibility: hidden; 117 | opacity: 0; 118 | transition: visibility 0s, opacity 0.7s linear; 119 | } 120 | 121 | .c2c-tooltip[show-tooltip] { 122 | visibility: visible; 123 | opacity: 1; 124 | } 125 | } 126 | } 127 | 128 | /* Hide releases disclaimer by default, dinamically show it with js */ 129 | 130 | #release-switcher { 131 | visibility: hidden 132 | } 133 | 134 | #nightly-release-li { 135 | visibility: hidden 136 | } 137 | 138 | #lts-release-li { 139 | visibility: hidden 140 | } 141 | 142 | /* Consistent borders around code blocks */ 143 | 144 | pre { 145 | border: 1px solid $light; 146 | } 147 | 148 | 149 | /* Styling for the banner */ 150 | .banner { 151 | color: #fff; 152 | background: linear-gradient(90deg, #b1479a 0%, #6a2c88 100%); 153 | 154 | .banner-main { 155 | max-width: calc(min(1200px - 8em, 80vw)); 156 | margin-left: auto; 157 | margin-right: auto; 158 | margin-bottom: 0; 159 | padding-bottom: calc(max(0.1em, 0.1rem)); 160 | padding-top: calc(max(5em, 5rem)); 161 | } 162 | 163 | @media only screen and (max-width: $mobile-width) { 164 | .banner-main { 165 | padding-top: calc(max(1em, 1rem)); 166 | } 167 | } 168 | 169 | h4 { 170 | font-size: 1.35rem; 171 | margin-top: 0; 172 | margin-bottom: .5rem; 173 | font-weight: 500; 174 | line-height: 1.2; 175 | } 176 | 177 | a { 178 | color: inherit; 179 | text-decoration: underline; 180 | } 181 | } -------------------------------------------------------------------------------- /assets/scss/_variables_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Add styles or override variables from the theme here. 4 | 5 | */ 6 | 7 | /* Primary and secondary colors based on the logo design guide 8 | * https://github.com/cdfoundation/artwork/blob/main/tekton/tekton_brand_guide.pdf 9 | */ 10 | 11 | $primary: #00109F; 12 | $secondary: #B980D0; 13 | $td-fonts-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif; 14 | $td-enable-google-fonts: false; 15 | $light: #929292 !default; 16 | $dark: #333 !default; 17 | $mobile-width: 767px; 18 | 19 | -------------------------------------------------------------------------------- /config.yaml: -------------------------------------------------------------------------------- 1 | baseURL: / 2 | title: Tekton 3 | enableRobotsTXT: true 4 | theme: 5 | - github.com/google/docsy 6 | - github.com/google/docsy/dependencies 7 | enableGitInfo: true 8 | contentDir: content/en 9 | defaultContentLanguage: en 10 | defaultContentLanguageInSubdir: false 11 | enableMissingTranslationPlaceholders: true 12 | disableKinds: 13 | - taxonomy 14 | - taxonomyTerm 15 | pygmentsCodeFences: true 16 | pygmentsUseClasses: false 17 | pygmentsUseClassic: false 18 | pygmentsStyle: manni 19 | enableEmoji: true 20 | ignoreFiles: 21 | - vendor/.* 22 | rss_sections: 23 | - blog 24 | permalinks: 25 | blog: /:section/:year/:month/:day/:slug/ 26 | markup: 27 | defaultMarkdownHandler: goldmark 28 | goldmark: 29 | renderer: 30 | unsafe: true 31 | imaging: 32 | resampleFilter: CatmullRom 33 | quality: 75 34 | anchor: smart 35 | services: 36 | googleAnalytics: 37 | id: G-G2WH79BEEM 38 | languages: 39 | en: 40 | title: Tekton 41 | description: Cloud Native CI/CD 42 | languageName: English 43 | weight: 1 44 | params: 45 | version_menu: Releases 46 | github_repo: https://github.com/tektoncd/website 47 | gcs_engine_id: 013756393218025596041:6eajntqsa6c 48 | ui: 49 | sidebar_menu_compact: false 50 | sidebar_menu_foldable: true 51 | breadcrumb_disable: true 52 | sidebar_search_disable: false 53 | navbar_logo: true 54 | footer_about_disable: false 55 | feedback: 56 | enable: true 57 | yes: 58 | Thanks! Tell us 59 | how we can further improve. 60 | no: Sorry about that. Tell us how we can 62 | further improve. 63 | links: 64 | developer: 65 | - name: GitHub 66 | url: https://github.com/tektoncd 67 | icon: fab fa-github 68 | desc: GitHub organization for the Tekton project 69 | sectionPagesMenu: "docs" 70 | menu: 71 | docs: 72 | - name: "Getting Started" 73 | url: "/docs/getting-started/" 74 | weight: 1 75 | - name: "Installation" 76 | url: "/docs/installation/" 77 | weight: 2 78 | - name: "Concepts" 79 | url: "/docs/concepts/" 80 | weight: 3 81 | - name: "How-to Guides" 82 | url: "/docs/how-to-guides/" 83 | weight: 4 84 | - name: "Tasks and Pipelines" 85 | url: "/docs/pipelines/" 86 | weight: 5 87 | - name: "Triggers and EventListeners" 88 | url: "/docs/triggers/" 89 | weight: 6 90 | - name: "Command-Line Interface" 91 | url: "/docs/cli/" 92 | weight: 7 93 | - name: "Supply Chain Security" 94 | url: "/docs/chains/" 95 | weight: 8 96 | - name: "Operator" 97 | url: "/docs/operator/" 98 | weight: 9 99 | - name: "Dashboard" 100 | url: "/docs/dashboard/" 101 | weight: 10 102 | - name: "Results" 103 | url: "/docs/results/" 104 | weight: 11 105 | - name: "Contribute" 106 | url: "/docs/contribute/" 107 | weight: 100 108 | -------------------------------------------------------------------------------- /content/en/_index.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Tekton" 3 | linkTitle: "Tekton.dev Homepage" 4 | 5 | --- 6 | 7 | {{< blocks/cover title="Cloud Native CI/CD" subtitle="" image_anchor="smart" color="orange" height="med">}} 8 |
9 | }}"> 10 | Documentation 11 | 12 | 13 | GitHub 14 | 15 |
16 | {{< /blocks/cover >}} 17 | 18 | {{% blocks/showcase color="link" %}} 19 | 20 | {{< blocks/section color="danger" >}} 21 | {{% blocks/feature icon="fas fa-globe-asia" title="Standardization" %}} 22 | Tekton standardizes CI/CD tooling and processes across vendors, languages, 23 | and deployment environments. It works well with Jenkins, Jenkins X, Skaffold, 24 | Knative, and many other popular CI/CD tools. 25 | {{% /blocks/feature %}} 26 | 27 | 28 | {{% blocks/feature icon="fas fa-medal" title="Built-in best practices" %}} 29 | Tekton lets you create CI/CD systems quickly, 30 | giving you scalable, serverless, cloud native execution out of the box. 31 | {{% /blocks/feature %}} 32 | 33 | 34 | {{% blocks/feature icon="fas fa-feather" title="Maximum flexibility" %}} 35 | Tekton abstracts the underlying implementation so that you can choose the build, 36 | test, and deploy workflow based on your team's requirements. 37 | {{% /blocks/feature %}} 38 | 39 | 40 | {{< /blocks/section >}} 41 | 42 | 45 | 46 | {{< blocks/partners-alternate color="dark" >}} 47 | 48 | {{< blocks/section color="white" >}} 49 | {{% blocks/feature icon="fas fa-code" title="Install Tekton" %}} 50 | [Get Tekton here](/docs/installation/) 51 | {{% /blocks/feature %}} 52 | 53 | 54 | {{% blocks/feature icon="fab fa-github" title="Contributions welcome" %}} 55 | [Join the Tekton Community](/community/) 56 | {{% /blocks/feature %}} 57 | 58 | 59 | {{% blocks/feature icon="fas fa-chalkboard" title="Try Tekton" %}} 60 | [Get started with Tekton](/docs/getting-started/) 61 | {{% /blocks/feature %}} 62 | 63 | 64 | {{< /blocks/section >}} 65 | 66 | {{% blocks/manifesto color="dark" %}} 67 | -------------------------------------------------------------------------------- /content/en/blog/2022/graduation/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2022/graduation/banner.png -------------------------------------------------------------------------------- /content/en/blog/2022/graduation/contributions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2022/graduation/contributions.png -------------------------------------------------------------------------------- /content/en/blog/2022/graduation/releases.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2022/graduation/releases.png -------------------------------------------------------------------------------- /content/en/blog/2023/cdcon-gitopscon/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/cdcon-gitopscon/banner.png -------------------------------------------------------------------------------- /content/en/blog/2023/cdcon-gitopscon/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Meet with Tekton Community at cdCon + GitOpsCon 2023 3 | linkTitle: Meet with Tekton Community at cdCon + GitOpsCon 2023 4 | date: 2023-04-14 5 | author: "CD Foundation" 6 | description: > 7 | List of talks given by Tekton community members at cdCon + GitOpsCon 2023 8 | --- 9 | {{< imgproc banner Fit 700x500 >}}{{< /imgproc >}} 10 | 11 | The [Continuous Delivery Foundation (CDF)][cdf-website] is happy to host its 12 | fourth flagship event, cdCon, taking place on May 8–9, 2023 in Vancouver, 13 | Canada as [cdCon + GitOpsCon][cdcon-gitopscon-website], co-organized with the 14 | [Cloud Native Computing Foundation (CNCF)][cncf-website], making it the 15 | must-attend event for anyone who is involved in CD, DevOps, and GitOps. 16 | 17 | By combining the two events, cdCon + GitOpsCon aims to bring their communities 18 | together to collaborate and build the future of GitOps and CD. The program 19 | committees reviewed more than 250 submissions and selected over 60 sessions 20 | that will span topics from technical challenges and deep dives, to end-user 21 | stories and introductory content. 22 | 23 | The [cdCon + GitOpsCon program][cdcon-gitopscon-program] contains sessions from 24 | the most widely used CI/CD and GitOps technologies. The Tekton Community will 25 | be there with project updates and various talks from our community members and 26 | users. Here are some of the sessions you don’t want to miss. 27 | 28 | - [Operating Tekton with Secure Defaults][tekton-talk-1] - Christie Wilson Warwick & Wendy Dembowski, Google 29 | - [Tekton Project Update and Roadmap][tekton-talk-2] - Andrea Frittoli, IBM 30 | - [Save Your Pipelines (and Clusters!) with Tekton Results][tekton-talk-3] - Adam Kaplan, Red Hat & Dibyo Mukherjee, Google 31 | - [Tekton Supply Chain Security][tekton-talk-4] - Billy Lynch, Chainguard 32 | 33 | In addition to these sessions, Andrea Frittoli of IBM, a member of the Tekton 34 | Governance Committee and maintainer will take part in [the Graduated Projects 35 | Keynote Panel][graduated-projects-panel], discussing Tekton Community’s 36 | experiences with graduation and sharing his thoughts on why graduation matters 37 | for the community and users of Tekton. 38 | 39 | We look forward to an awesome event and we hope to see you there! 40 | 41 | [cdf-website]: https://cd.foundation 42 | [cncf-website]: https://cncf.io/ 43 | [cdcon-gitopscon-website]: https://events.linuxfoundation.org/cdcon-gitopscon/ 44 | [cdcon-gitopscon-program]: https://events.linuxfoundation.org/cdcon-gitopscon/program/schedule/ 45 | [tekton-talk-1]: https://sched.co/1Jp8P 46 | [tekton-talk-2]: https://sched.co/1KDgj 47 | [tekton-talk-3]: https://sched.co/1JpAX 48 | [tekton-talk-4]: https://sched.co/1KDTf 49 | [graduated-projects-panel]: https://sched.co/1Js9F 50 | -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tekton-dashboard-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tekton-dashboard-6.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-assertions-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-assertions-3.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-assertions-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-assertions-4.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-automate-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-automate-5.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-dashboard-preview-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-dashboard-preview-7.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-tekton-architecture-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-tekton-architecture-1.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-trace-view-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-trace-view-2.png -------------------------------------------------------------------------------- /content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-web-ui-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/distributed-traces-for-testing-with-tekton-pipelines-and-tracetest/tracetest-web-ui-1.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/example.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/levels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/levels.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/p1.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/p2.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/p3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/p3.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/p4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/p4.png -------------------------------------------------------------------------------- /content/en/blog/2023/slsa-2/provenance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/slsa-2/provenance.png -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image1.png -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image2.png -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image3.png -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/image4.png -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/README.md: -------------------------------------------------------------------------------- 1 | # Speed Up Container Image Builds in Tekton Pipelines 2 | 3 | This repo contains example assets to test different ways to improve build speed on Tekton pipelines. 4 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-basecache/image-build-basecache-old.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: image-build 5 | labels: 6 | app.kubernetes.io/version: "0.6" 7 | annotations: 8 | tekton.dev/pipelines.minVersion: "0.17.0" 9 | tekton.dev/categories: Image Build 10 | tekton.dev/tags: image-build 11 | tekton.dev/displayName: "Build and upload container image using Kaniko" 12 | tekton.dev/platforms: "linux/amd64" 13 | spec: 14 | description: >- 15 | This Task builds a simple Dockerfile with kaniko and pushes to a registry. 16 | params: 17 | - name: IMAGE 18 | description: Name (reference) of the image to build. 19 | - name: DOCKERFILE 20 | description: Path to the Dockerfile to build. 21 | default: $(workspaces.source.path)/sample-app/Dockerfile 22 | - name: CONTEXT 23 | description: The build context used by Kaniko. 24 | default: $(workspaces.source.path)/sample-app/ 25 | - name: commit 26 | description: Short Commit SHA. 27 | workspaces: 28 | - name: source 29 | description: Holds the context and Dockerfile 30 | - name: cache 31 | description: Holds Kaniko base images cache 32 | results: 33 | - name: IMAGE_DIGEST 34 | description: Digest of the image just built. 35 | - name: IMAGE_URL 36 | description: URL of the image just built. 37 | steps: 38 | - name: build-and-push 39 | workingDir: $(workspaces.source.path)/sample-app/ 40 | image: gcr.io/kaniko-project/executor:latest 41 | args: 42 | - --dockerfile=$(params.DOCKERFILE) 43 | - --context=$(params.CONTEXT) # The user does not need to care the workspace and the source. 44 | - --destination=$(params.IMAGE):$(params.commit) 45 | - --digest-file=$(results.IMAGE_DIGEST.path) 46 | - --cache=true 47 | - --cache-dir=$(workspaces.cache.path) 48 | # kaniko assumes it is running as root, which means this example fails on platforms 49 | # that default to run containers as random uid (like OpenShift). Adding this securityContext 50 | # makes it explicit that it needs to run as root. 51 | securityContext: 52 | runAsUser: 0 53 | - name: write-url 54 | image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 55 | script: | 56 | set -e 57 | image="$(params.IMAGE):$(params.commit)" 58 | echo -n "${image}" | tee "$(results.IMAGE_URL.path)" 59 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-basecache/image-build-basecache.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: image-build 5 | labels: 6 | app.kubernetes.io/version: "0.6" 7 | annotations: 8 | tekton.dev/pipelines.minVersion: "0.17.0" 9 | tekton.dev/categories: Image Build 10 | tekton.dev/tags: image-build 11 | tekton.dev/displayName: "Build and upload container image using Kaniko" 12 | tekton.dev/platforms: "linux/amd64" 13 | spec: 14 | description: >- 15 | This Task builds a simple Dockerfile with kaniko and pushes to a registry. 16 | params: 17 | - name: IMAGE 18 | description: Name (reference) of the image to build. 19 | - name: DOCKERFILE 20 | description: Path to the Dockerfile to build. 21 | default: $(workspaces.source.path)/sample-app/Dockerfile 22 | - name: CONTEXT 23 | description: The build context used by Kaniko. 24 | default: $(workspaces.source.path)/sample-app/ 25 | - name: commit 26 | description: Short Commit SHA. 27 | workspaces: 28 | - name: source 29 | description: Holds the context and Dockerfile 30 | results: 31 | - name: IMAGE_DIGEST 32 | description: Digest of the image just built. 33 | - name: IMAGE_URL 34 | description: URL of the image just built. 35 | steps: 36 | - name: build-and-push 37 | workingDir: $(workspaces.source.path)/sample-app/ 38 | image: gcr.io/kaniko-project/executor:latest 39 | args: 40 | - --dockerfile=$(params.DOCKERFILE) 41 | - --context=$(params.CONTEXT) # The user does not need to care the workspace and the source. 42 | - --destination=$(params.IMAGE):$(params.commit) 43 | - --digest-file=$(results.IMAGE_DIGEST.path) 44 | - --cache=true 45 | # kaniko assumes it is running as root, which means this example fails on platforms 46 | # that default to run containers as random uid (like OpenShift). Adding this securityContext 47 | # makes it explicit that it needs to run as root. 48 | securityContext: 49 | runAsUser: 0 50 | volumeMounts: 51 | - name: basecache 52 | mountPath: /cache 53 | - name: write-url 54 | image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 55 | script: | 56 | set -e 57 | image="$(params.IMAGE):$(params.commit)" 58 | echo -n "${image}" | tee "$(results.IMAGE_URL.path)" 59 | volumes: 60 | - name: basecache 61 | persistentVolumeClaim: 62 | claimName: basecache-pvc 63 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-basecache/kaniko-warmer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: kaniko-warmer 5 | spec: 6 | containers: 7 | - name: kaniko-warmer 8 | image: gcr.io/kaniko-project/warmer:latest 9 | args: ["--cache-dir=/cache", 10 | "--image=maven", 11 | "--image=eclipse-temurin:19-jdk-alpine"] 12 | volumeMounts: 13 | - name: basecache 14 | mountPath: /cache 15 | restartPolicy: Never 16 | volumes: 17 | - name: basecache 18 | persistentVolumeClaim: 19 | claimName: basecache-pvc 20 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-basecache/pipeline-basecache.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Pipeline 3 | metadata: 4 | name: pipeline-clone-and-build 5 | spec: 6 | params: 7 | - name: git-url 8 | - name: image-name 9 | workspaces: 10 | - name: source 11 | - name: cache 12 | tasks: 13 | - name: git-clone 14 | taskRef: 15 | name: git-clone 16 | params: 17 | - name: url 18 | value: $(params.git-url) 19 | workspaces: 20 | - name: source 21 | workspace: source 22 | - name: image-build 23 | taskRef: 24 | name: image-build 25 | runAfter: 26 | - git-clone 27 | params: 28 | - name: IMAGE 29 | value: $(params.image-name) 30 | - name: commit 31 | value: "$(tasks.git-clone.results.commit)" 32 | workspaces: 33 | - name: source 34 | workspace: source 35 | - name: cache 36 | workspace: cache -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-basecache/pvc-basecache.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: basecache-pvc 5 | spec: 6 | resources: 7 | requests: 8 | storage: 10Gi 9 | volumeMode: Filesystem 10 | accessModes: 11 | - ReadWriteOnce -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-cache/Dockerfile.cache: -------------------------------------------------------------------------------- 1 | FROM maven as build 2 | COPY mvnw . 3 | COPY pom.xml . 4 | RUN mvn dependency:go-offline 5 | COPY src src 6 | RUN mvn package -Dmaven.test.skip=true 7 | 8 | 9 | FROM eclipse-temurin:19-jdk-alpine 10 | COPY --from=build /target/demo-0.0.1-SNAPSHOT.jar app.jar 11 | CMD ["java", "-jar", "app.jar"] 12 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/kaniko-cache/image-build-cache.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: image-build 5 | labels: 6 | app.kubernetes.io/version: "0.6" 7 | annotations: 8 | tekton.dev/pipelines.minVersion: "0.17.0" 9 | tekton.dev/categories: Image Build 10 | tekton.dev/tags: image-build 11 | tekton.dev/displayName: "Build and upload container image using Kaniko" 12 | tekton.dev/platforms: "linux/amd64" 13 | spec: 14 | description: >- 15 | This Task builds a simple Dockerfile with kaniko and pushes to a registry. 16 | params: 17 | - name: IMAGE 18 | description: Name (reference) of the image to build. 19 | - name: DOCKERFILE 20 | description: Path to the Dockerfile to build. 21 | default: $(workspaces.source.path)/sample-app/Dockerfile 22 | - name: CONTEXT 23 | description: The build context used by Kaniko. 24 | default: $(workspaces.source.path)/sample-app/ 25 | - name: commit 26 | description: Short Commit SHA. 27 | workspaces: 28 | - name: source 29 | description: Holds the context and Dockerfile 30 | results: 31 | - name: IMAGE_DIGEST 32 | description: Digest of the image just built. 33 | - name: IMAGE_URL 34 | description: URL of the image just built. 35 | steps: 36 | - name: build-and-push 37 | workingDir: $(workspaces.source.path)/sample-app/ 38 | image: gcr.io/kaniko-project/executor:latest 39 | args: 40 | - --dockerfile=$(params.DOCKERFILE) 41 | - --context=$(params.CONTEXT) # The user does not need to care the workspace and the source. 42 | - --destination=$(params.IMAGE):$(params.commit) 43 | - --digest-file=$(results.IMAGE_DIGEST.path) 44 | - --cache=true 45 | # kaniko assumes it is running as root, which means this example fails on platforms 46 | # that default to run containers as random uid (like OpenShift). Adding this securityContext 47 | # makes it explicit that it needs to run as root. 48 | securityContext: 49 | runAsUser: 0 50 | - name: write-url 51 | image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 52 | script: | 53 | set -e 54 | image="$(params.IMAGE):$(params.commit)" 55 | echo -n "${image}" | tee "$(results.IMAGE_URL.path)" 56 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/m2cache/image-build-m2cache.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: image-build 5 | labels: 6 | app.kubernetes.io/version: "0.6" 7 | annotations: 8 | tekton.dev/pipelines.minVersion: "0.17.0" 9 | tekton.dev/categories: Image Build 10 | tekton.dev/tags: image-build 11 | tekton.dev/displayName: "Build and upload container image using Kaniko" 12 | tekton.dev/platforms: "linux/amd64" 13 | spec: 14 | description: >- 15 | This Task builds a simple Dockerfile with kaniko and pushes to a registry. 16 | params: 17 | - name: IMAGE 18 | description: Name (reference) of the image to build. 19 | - name: DOCKERFILE 20 | description: Path to the Dockerfile to build. 21 | default: $(workspaces.source.path)/sample-app/Dockerfile 22 | - name: CONTEXT 23 | description: The build context used by Kaniko. 24 | default: $(workspaces.source.path)/sample-app/ 25 | - name: commit 26 | description: Short Commit SHA. 27 | workspaces: 28 | - name: source 29 | description: Holds the context and Dockerfile 30 | results: 31 | - name: IMAGE_DIGEST 32 | description: Digest of the image just built. 33 | - name: IMAGE_URL 34 | description: URL of the image just built. 35 | steps: 36 | - name: build-and-push 37 | workingDir: $(workspaces.source.path)/sample-app/ 38 | image: gcr.io/kaniko-project/executor:latest 39 | args: 40 | - --dockerfile=$(params.DOCKERFILE) 41 | - --context=$(params.CONTEXT) # The user does not need to care the workspace and the source. 42 | - --destination=$(params.IMAGE):$(params.commit) 43 | - --digest-file=$(results.IMAGE_DIGEST.path) 44 | - --cache=true 45 | # kaniko assumes it is running as root, which means this example fails on platforms 46 | # that default to run containers as random uid (like OpenShift). Adding this securityContext 47 | # makes it explicit that it needs to run as root. 48 | securityContext: 49 | runAsUser: 0 50 | volumeMounts: 51 | - name: basecache 52 | mountPath: /cache 53 | - name: m2-cache 54 | mountPath: /root/.m2 55 | - name: write-url 56 | image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 57 | script: | 58 | set -e 59 | image="$(params.IMAGE):$(params.commit)" 60 | echo -n "${image}" | tee "$(results.IMAGE_URL.path)" 61 | volumes: 62 | - name: m2-cache 63 | persistentVolumeClaim: 64 | claimName: m2cache-pvc 65 | - name: basecache 66 | persistentVolumeClaim: 67 | claimName: basecache-pvc 68 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/m2cache/pvc-m2cache.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: m2cache-pvc 5 | spec: 6 | resources: 7 | requests: 8 | storage: 10Gi 9 | volumeMode: Filesystem 10 | accessModes: 11 | - ReadWriteOnce -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven as build 2 | COPY mvnw . 3 | COPY pom.xml . 4 | COPY src src 5 | RUN mvn package -Dmaven.test.skip=true 6 | 7 | 8 | FROM eclipse-temurin:19-jdk-alpine 9 | COPY --from=build /target/demo-0.0.1-SNAPSHOT.jar app.jar 10 | CMD ["java", "-jar", "app.jar"] 11 | 12 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.1.3 9 | 10 | 11 | com.example 12 | demo 13 | 0.0.1-SNAPSHOT 14 | demo 15 | Demo app for Tekton 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-maven-plugin 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/java/com/example/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.demo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class DemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(DemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/resources/static/tekton-horizontal-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/resources/static/tekton-horizontal-color.png -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/sample-app/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example Java App 6 | 7 | 19 | 20 | 21 |
22 |
23 | Tekton Logo 24 |
25 |

Hello, Builder!

26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/tekton-assets/git-clone.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: git-clone 5 | labels: 6 | app.kubernetes.io/version: "0.5" 7 | annotations: 8 | tekton.dev/pipelines.minVersion: "0.21.0" 9 | tekton.dev/categories: Git 10 | tekton.dev/tags: git 11 | tekton.dev/displayName: "git clone" 12 | tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" 13 | spec: 14 | description: >- 15 | These Tasks are Git tasks to work with repositories used by other tasks 16 | in your Pipeline. 17 | 18 | The git-clone Task will clone a repo from the provided url into the 19 | output Workspace. By default the repo will be cloned into the root of 20 | your Workspace. You can clone into a subdirectory by setting this Task's 21 | subdirectory param. This Task also supports sparse checkouts. To perform 22 | a sparse checkout, pass a list of comma separated directory patterns to 23 | this Task's sparseCheckoutDirectories param. 24 | workspaces: 25 | - name: source 26 | description: The git repo will be cloned onto the volume backing this Workspace. 27 | params: 28 | - name: url 29 | description: Repository URL to clone from. 30 | type: string 31 | results: 32 | - name: commit 33 | description: The short commit SHA that was fetched by this Task. 34 | - name: url 35 | description: The precise URL that was fetched by this Task. 36 | steps: 37 | - name: clone 38 | image: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.21.0" 39 | env: 40 | - name: PARAM_URL 41 | value: $(params.url) 42 | - name: WORKSPACE_OUTPUT_PATH 43 | value: $(workspaces.source.path) 44 | script: | 45 | #!/usr/bin/env sh 46 | set -eu 47 | 48 | 49 | set -x 50 | 51 | 52 | CHECKOUT_DIR="${WORKSPACE_OUTPUT_PATH}" 53 | 54 | cleandir() { 55 | # Delete any existing contents of the repo directory if it exists. 56 | # 57 | # We don't just "rm -rf ${CHECKOUT_DIR}" because ${CHECKOUT_DIR} might be "/" 58 | # or the root of a mounted volume. 59 | if [ -d "${CHECKOUT_DIR}" ] ; then 60 | # Delete non-hidden files and directories 61 | rm -rf "${CHECKOUT_DIR:?}"/* 62 | # Delete files and directories starting with . but excluding .. 63 | rm -rf "${CHECKOUT_DIR}"/.[!.]* 64 | # Delete files and directories starting with .. plus any other character 65 | rm -rf "${CHECKOUT_DIR}"/..?* 66 | fi 67 | } 68 | 69 | 70 | cleandir 71 | 72 | /ko-app/git-init \ 73 | -url="${PARAM_URL}" \ 74 | -path="${CHECKOUT_DIR}" \ 75 | -submodules="true" \ 76 | -depth="1" 77 | cd "${CHECKOUT_DIR}" 78 | RESULT_SHA="$(git rev-parse --short HEAD)" 79 | EXIT_CODE="$?" 80 | if [ "${EXIT_CODE}" != 0 ] ; then 81 | exit "${EXIT_CODE}" 82 | fi 83 | printf "%s" "${RESULT_SHA}" > "$(results.commit.path)" 84 | printf "%s" "${PARAM_URL}" > "$(results.url.path)" 85 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/tekton-assets/image-build.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: image-build 5 | labels: 6 | app.kubernetes.io/version: "0.6" 7 | annotations: 8 | tekton.dev/pipelines.minVersion: "0.17.0" 9 | tekton.dev/categories: Image Build 10 | tekton.dev/tags: image-build 11 | tekton.dev/displayName: "Build and upload container image using Kaniko" 12 | tekton.dev/platforms: "linux/amd64" 13 | spec: 14 | description: >- 15 | This Task builds a simple Dockerfile with kaniko and pushes to a registry. 16 | params: 17 | - name: IMAGE 18 | description: Name (reference) of the image to build. 19 | - name: DOCKERFILE 20 | description: Path to the Dockerfile to build. 21 | default: $(workspaces.source.path)/sample-app/Dockerfile 22 | - name: CONTEXT 23 | description: The build context used by Kaniko. 24 | default: $(workspaces.source.path)/sample-app/ 25 | - name: commit 26 | description: Short Commit SHA. 27 | workspaces: 28 | - name: source 29 | description: Holds the context and Dockerfile 30 | results: 31 | - name: IMAGE_DIGEST 32 | description: Digest of the image just built. 33 | - name: IMAGE_URL 34 | description: URL of the image just built. 35 | steps: 36 | - name: build-and-push 37 | workingDir: $(workspaces.source.path)/sample-app/ 38 | image: gcr.io/kaniko-project/executor:latest 39 | args: 40 | - --dockerfile=$(params.DOCKERFILE) 41 | - --context=$(params.CONTEXT) # The user does not need to care the workspace and the source. 42 | - --destination=$(params.IMAGE):$(params.commit) 43 | - --digest-file=$(results.IMAGE_DIGEST.path) 44 | # kaniko assumes it is running as root, which means this example fails on platforms 45 | # that default to run containers as random uid (like OpenShift). Adding this securityContext 46 | # makes it explicit that it needs to run as root. 47 | securityContext: 48 | runAsUser: 0 49 | - name: write-url 50 | image: docker.io/library/bash:5.1.4@sha256:b208215a4655538be652b2769d82e576bc4d0a2bb132144c060efc5be8c3f5d6 51 | script: | 52 | set -e 53 | image="$(params.IMAGE):$(params.commit)" 54 | echo -n "${image}" | tee "$(results.IMAGE_URL.path)" 55 | -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/tekton-assets/pipeline.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Pipeline 3 | metadata: 4 | name: pipeline-clone-and-build 5 | spec: 6 | params: 7 | - name: git-url 8 | - name: image-name 9 | workspaces: 10 | - name: source 11 | tasks: 12 | - name: git-clone 13 | taskRef: 14 | name: git-clone 15 | params: 16 | - name: url 17 | value: $(params.git-url) 18 | workspaces: 19 | - name: source 20 | workspace: source 21 | - name: image-build 22 | taskRef: 23 | name: image-build 24 | runAfter: 25 | - git-clone 26 | params: 27 | - name: IMAGE 28 | value: $(params.image-name) 29 | - name: commit 30 | value: "$(tasks.git-clone.results.commit)" 31 | workspaces: 32 | - name: source 33 | workspace: source -------------------------------------------------------------------------------- /content/en/blog/2023/speeding-up-container-image-builds-in-tekton-pipelines/tekton-speed-builds/tekton-assets/source-pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: source-pvc 5 | spec: 6 | resources: 7 | requests: 8 | storage: 10Gi 9 | volumeMode: Filesystem 10 | accessModes: 11 | - ReadWriteOnce -------------------------------------------------------------------------------- /content/en/blog/2025/ghcr-migration/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migration to Github Container Registry 3 | likTitle: Migration to Github Container Registry 4 | date: 2025-04-03 5 | author: "Stanislav Jakuschevskij, IBM" 6 | description: > 7 | How to migrate your images from gcr.io to ghcr.io and why we migrated 8 | --- 9 | 10 | ## Why and How 11 | 12 | Dear Tekton users and contributors, to reduce costs, we've migrated all our releases to the free tier on [ghcr.io/tektoncd](http://ghcr.io/tektoncd). 13 | 14 | All new Tekton releases are exclusively on [ghcr.io/tektoncd](http://ghcr.io/tektoncd). Old releases are also now available on [ghcr.io/tektoncd](http://ghcr.io/tektoncd). 15 | 16 | Please migrate your old releases to ghcr.io immediately since we have limited funding to allocate to gcr.io egress. 17 | 18 | To migrate you need to replace `gcr.io/tekton-releases` with `ghcr.io/tektoncd` in all your images. e.g. 19 | 20 | ```sh 21 | # old 22 | gcr.io/tekton-releases/github/tektoncd/pipeline/cmd/entrypoint:v0.9.2 23 | 24 | # new 25 | ghcr.io/tektoncd/github.com/tektoncd/pipeline/cmd/entrypoint:v0.9.2 26 | ``` 27 | 28 | You could run: 29 | 30 | ```sh 31 | sed -e 's,gcr.io/tekton-releases,ghcr.io/tektoncd,g' 32 | ``` 33 | ## End of Life Releases 34 | 35 | We started enforcing the download of Tekton images from `ghcr.io`. 36 | 37 | Here are the details of what changed: 38 | 39 | - Tekton LTS releases originally released to `gcr.io` will remain available on `gcr.io` until the EOL date. 40 | - The same images are available on `ghcr.io`, so we ask users to please update their manifests and download images from `ghcr.io` to save egress bandwidth costs. 41 | - Any EOL Tekton release will only be available on `ghcr.io`. 42 | - Images on `gcr.io` will be removed from public access over the next few days. 43 | - New releases will only be made on `ghcr.io`, so no action is required. 44 | 45 | Please feel free to reach out to us via [Slack](https://github.com/tektoncd/community/blob/main/contact.md#slack) or our [mailing list](https://github.com/tektoncd/community/blob/main/contact.md#mailing-list) if you have any questions. 46 | 47 | The original info mails were sent on our mailing list and if you're in our google group you can read them [here](https://groups.google.com/g/tekton-dev/c/RoEFXeNZjKE). 48 | -------------------------------------------------------------------------------- /content/en/blog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Blog 3 | menu: 4 | main: 5 | weight: 40 6 | --- 7 | 8 | -------------------------------------------------------------------------------- /content/en/community/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Community 3 | menu: 4 | main: 5 | weight: 30 6 | --- 7 | 8 | Find more information on the [Tekton Community 9 | repository](https://github.com/tektoncd/community). 10 | -------------------------------------------------------------------------------- /content/en/docs/Catalog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Catalog" 3 | linkTitle: "Catalog" 4 | weight: 7 5 | description: > 6 | Reusable Task and Pipeline Resources 7 | --- 8 | 9 | {{% pageinfo %}} 10 | This document is a work in progress. 11 | {{% /pageinfo %}} 12 | 13 | ## Overview 14 | 15 | Tekton provides a number of **tasks**, **pipelines**, and **resources** 16 | that you can reuse in your own workflow. 17 | 18 | [The catalog is available on GitHub](https://github.com/tektoncd/catalog). 19 | -------------------------------------------------------------------------------- /content/en/docs/Concepts/_index.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | This section presents an overview of what the Tekton project is and how some of 12 | its building blocks work. 13 | 14 | -------------------------------------------------------------------------------- /content/en/docs/Concepts/concept-resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/docs/Concepts/concept-resources.png -------------------------------------------------------------------------------- /content/en/docs/Concepts/concept-runs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/docs/Concepts/concept-runs.png -------------------------------------------------------------------------------- /content/en/docs/Concepts/concept-tasks-pipelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/docs/Concepts/concept-tasks-pipelines.png -------------------------------------------------------------------------------- /content/en/docs/Concepts/supply-chain-security.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | Given the increasing complexity of the CI/CD space, with projects that often 12 | have dozens or even hundreds of dependencies, the supply chain has become a 13 | common vector of attacks. Tekton Chains is a security-oriented part of the 14 | Tekton portfolio to help you mitigate security risks. 15 | 16 | Tekton Chains is a tool to generate, store, and sign provenance for artifacts 17 | built with Tekton Pipelines. **Provenance** is metadata containing verifiable 18 | information about software artifacts, describing where, when and how something 19 | is built. 20 | 21 | ## How to secure your Supply Chain 22 | 23 | [Supply chain Levels for Software Artifacts (SLSA)][slsa] provides a set of 24 | guidelines you can follow to make your software more secure. SLSA is organized 25 | into a series of levels, where level 4 represents the ideal state. Go to 26 | [slsa.dev](https://slsa.dev) for more information. 27 | 28 | Tekton Chains implements the SLSA guidelines to help you accomplish SLSA level 29 | 2, by documenting the build process in a tamper resistant format. 30 | 31 | ## How does Tekton Chains work? 32 | 33 | Tekton Chains works by deploying a controller that runs in the background and 34 | monitors TaskRuns. While Tekton Pipelines executes your Tasks, Tekton Chains 35 | watches the operation, once the operation is successfully completed, the Chains 36 | controller generates the provenance for the artifacts produced. 37 | 38 | The provenance records the inputs of your Tasks: source repositories, branches, 39 | other artifacts; and the outputs: container images, packages, etc. This 40 | information is recorded as [in-toto][in-toto] metadata and signed. You can store 41 | the keys to sign the provenance in a Kubernetes secret or by using a supported 42 | key management system: GCP, AWS, Azure, or Vault. You can then upload the 43 | provenance to a specified location. [Getting To SLSA Level 2 with Tekton and 44 | Tekton Chains][blog-post] on the Google Open Source Blog provides more details. 45 | 46 | ```mermaid 47 | graph LR 48 | subgraph TOP[Kubernetes] 49 | direction TB 50 | 51 | subgraph C[Tekton Chains controller] 52 | direction TB 53 | c1(Observe Runs) 54 | c2(Generate Provenance) 55 | c3(Sign Metadata) 56 | end 57 | 58 | subgraph B[Pipelines] 59 | direction LR 60 | subgraph B1[Pipeline] 61 | direction TB 62 | i1[Task] --> f1[Task] 63 | end 64 | 65 | subgraph B2[Pipeline] 66 | direction TB 67 | i2[Task] --> f2[Task] 68 | end 69 | B1 --> B2 70 | end 71 | end 72 | 73 | A[Sources] -.-> B -.-> D[Artifacts] 74 | ``` 75 | 76 | ## Where can I try it? 77 | 78 | - For a hands-on experience, follow the [Getting started with Tekton Chains 79 | tutorial][chains-quickstart]. 80 | - Check the [examples available on the Chain repository][chains-examples]. 81 | 82 | [in-toto]: https://in-toto.io/ 83 | [slsa]: https://slsa.dev/spec/v0.1/levels#what-is-slsa 84 | [chains-quickstart]: /docs/getting-started/supply-chain-security/ 85 | [chains-examples]: https://github.com/tektoncd/chains/tree/main/examples 86 | [blog-post]: /blog/2023/04/19/getting-to-slsa-level-2-with-tekton-and-tekton-chains/ 87 | 88 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/_index.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | If you would like to contribute to Tekton documentation, we’re happy to have your help! 12 | Anyone can contribute, whether you’re new to the project or you’ve been around a long time, 13 | and whether you self-identify as a developer, an end user, or someone who just can’t stand 14 | seeing typos. 15 | 16 | ## Contribution types 17 | 18 | You can request an improvement by filing an issue or update the documentation yourself by 19 | filing a pull request against the relevant [Tekton repository](https://github.com/tektoncd). 20 | 21 | Here's how we handle different types of documentation work: 22 | 23 | - **A quick fix**, such as a typo or a simple clarification, can typically be submitted 24 | directly in a pull request. 25 | - **A larger change**, such as updating an existing page or creating a brand new page, 26 | needs to be tracked by an issue. You can either request the update in the issue, or 27 | submit the update using a pull request linked to the issue. 28 | 29 | ## Contribution process 30 | 31 | **Example:** “I want to update the Smurfcaptor tutorial for Tekton.” 32 | 33 | If you're making a quick fix, such as a typo, or adding a few words of clarification, simply 34 | submit a pull request against the relevant [Tekton repository](https://github.com/tektoncd). 35 | If you're submitting a larger change, also create an issue that describes the new or updated 36 | content and link the pull request to it. 37 | 38 | **Note:** If you're creating a new page, make sure to include its proposed location within the 39 | Tekton documentation set. 40 | 41 | Assign the pull request and if applicable, the accompanying issue to one of the 42 | [Tekton website approvers][approvers]. The pull request then goes through 43 | technical and editorial review, and is published on the Tekton documentation 44 | website. Depending on our current workload, the review may take some time. Once 45 | the review is complete, the pull request is published to the Tekton 46 | documentation site. 47 | 48 | Documentation contributions should be technically accurate and easy to understand. See the rest 49 | of this guide to learn how to produce clear, concise, and informative documentation. 50 | 51 | [approvers]: https://github.com/tektoncd/website/blob/main/OWNERS 52 | 53 | ## Requesting a documentation improvement 54 | 55 | **Example:** "You should document Tekton integration with Smurfcaptor.” 56 | 57 | If you found a problem with Tekton documentation but can't fix it yourself, you can request a 58 | documentation improvement by creating an issue against the relevant [Tekton repository](https://github.com/tektoncd) 59 | 60 | We evaluate the need to determine the scope of the requested content and an estimated delivery 61 | time based on our current workload. We then place the issue in the documentation queue. 62 | 63 | Once a pull request is created that addresses the issue, it goes through technical and editorial 64 | review, and is published on the Tekton documentation website. 65 | 66 | ## Submitting a documentation change 67 | 68 | Submit a documentation change by opening a pull request against the relevant 69 | [Tekton repository](https://github.com/tektoncd). Documentation for each project is stored 70 | in the `docs` directory within the repository. 71 | 72 | Tekton documentation is mirrored on the [Tekton website](https://tekton.dev) with the GitHub 73 | repositories acting as the source of truth. If you are adding a new page to a project's documentation, 74 | you must also [add it to the website's configuration](https://github.com/tektoncd/website/tree/main/sync/config) 75 | so that it's picked up by the synchronization script and appears in the navigation tree in the 76 | "Documentation" section. Depending on the content you're adding, you may also want to add links 77 | to your new page to existing Tekton documentation. 78 | 79 | ## I need help! 80 | 81 | If you're not sure how to address a certain documentation issue, join the 82 | [#docs channel](https://app.slack.com/client/TJ45YV83X/CQYFEE00K) on the Tekton Slack and ask! 83 | 84 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/blog-guidelines.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | If you have an interesting, fun, or practical idea that you want to share with the 12 | world, you can write a blog post about it! 13 | 14 | Blog posts don't have to follow strict writing rules or styles. They are a good 15 | place for you to have fun talking about Tekton. 16 | 17 | This is how: 18 | 19 | ## Set up a local version of the website 20 | 21 | 1. [Fork][] the [documentation repository][docs-repo]. 22 | 23 | 1. Clone the repository to your computer: 24 | 25 | ```bash 26 | git clone https://github.com//website.git 27 | 28 | ``` 29 | 30 | 1. [Install Docker Compose][docker-compose], if it's not already installed on 31 | your computer. 32 | 33 | 1. Change directory to the repository root and run the website server: 34 | 35 | ```bash 36 | cd website 37 | docker-compose up 38 | ``` 39 | And wait for the confirmation message to pop up: 40 | 41 | ``` 42 | ┌─────────────────────────────────────────────────┐ 43 | │ │ 44 | │ ◈ Server now ready on http://localhost:8888 │ 45 | │ │ 46 | └─────────────────────────────────────────────────┘ 47 | ``` 48 | 49 | Keep the server running while you write your post. Press *Ctrl + C* to stop 50 | it. 51 | 52 | 1. Open your browser and go to `http://localhost:8888`. 53 | 54 | ## Draft your blog post 55 | 56 | 1. Create a folder under `content/en/blog//` with a descriptive name. 57 | Lower case, use dashes to separate words. 58 | 59 | 1. Inside the newly created folder, create a file and add a [front matter][] 60 | with the following format: 61 | 62 | ```yaml 63 | --- 64 | title: Title 65 | likTitle: Title 66 | date: 67 | author: "Author name" 68 | description: > 69 | A heading sentence about your post 70 | --- 71 | ``` 72 | 73 | 1. Save the file as `index.md`. As soon as you save it a new blog entry is now 74 | visible on your browser. 75 | 76 | 1. Below the front matter, write to your heart's content. Every time you save, 77 | the server automatically builds the page and shows the changes. 78 | 79 | If you need some inspiration, you can find examples on the [website 80 | repository][blogs-folder]. 81 | 82 | ## Open a PR for review 83 | 84 | 1. After you complete your blog post, open a Pull Request and wait for it to 85 | be reviewed. 86 | 87 | 88 | 1. Your blog post is now public and we are all excited to read it. 89 | Congratulations! 90 | 91 | [docs-repo]: https://github.com/tektoncd/website 92 | [fork]: https://docs.github.com/en/get-started/quickstart/fork-a-repo 93 | [docker-compose]: https://docs.docker.com/get-docker/ 94 | [front matter]: https://gohugo.io/content-management/front-matter/ 95 | [blogs-folder]: https://github.com/tektoncd/website/tree/main/content/en/blog 96 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/doc-con-formatting.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | Tekton documentation uses Markdown to format the content. See the 12 | [CommonMark tutorial](https://commonmark.org/help/) to learn the basics. 13 | 14 | ## Markdown formatting conventions: 15 | 16 | - **Lists** 17 | - Capitalize the first word for each item. 18 | - Don't put a period at the end of each item in lists containing only nouns 19 | or single-word items. 20 | - Use sentence punctuation in any other case. 21 | 22 | - **Code Format** 23 | - Use code formatting when referencing API objects, commands, files and 24 | directories. 25 | - Use angle brackets for placeholders such as variables. For example: 26 | 27 | ``` 28 | kubectl apply -f 29 | ``` 30 | 31 | - **Markdown files** 32 | - Hard-wrap the file lines so they are not longer than 80 characters. 33 | - Use [reference-style links][ref-links] if the URL is too long. There's no 34 | specific URL length, use your best judgment to keep markdown files 35 | readable. 36 | 37 | ## Embed code samples 38 | 39 | You can import code from external files. To do this, use the [`readfile` 40 | shortcode][readfile-shortcode] with the `code` and `lang` options. For example, 41 | the following code embeds the file `samples/task.yaml`: 42 | 43 | ```html 44 | {{}} 45 | ``` 46 | 47 | This is rendered as: 48 | 49 | {{< readfile file="samples/task.yaml" code="true" lang="yaml" >}} 50 | 51 | You can also embed code samples in tabs using the `tabpane` shortcode. For 52 | example, the following code embeds `samples/pipeline1.yaml` and 53 | `samples/pipeline2.yaml` in different tabs: 54 | 55 | ```html 56 | {{}} 57 | {{}} 58 | {{}} 59 | {{}} 60 | 61 | {{}} 62 | {{}} 63 | {{}} 64 | {{}} 65 | ``` 66 | 67 | Rendered as: 68 | 69 | {{< tabs >}} 70 | {{< tab "v1beta1" >}} 71 | {{< readfile file="samples/pipeline1.yaml" code="true" lang="yaml" >}} 72 | {{< /tab >}} 73 | 74 | {{< tab "v1" >}} 75 | {{< readfile file="samples/pipeline2.yaml" code="true" lang="yaml" >}} 76 | {{< /tab >}} 77 | {{< /tabs >}} 78 | 79 | {{% alert title="Warning" color="warning" %}} 80 | The `path` parameter don't support relative paths to parent directories. For 81 | example, `path="../sample.yaml"` does not work. 82 | {{% /alert %}} 83 | 84 | [ref-links]: https://www.markdownguide.org/basic-syntax/#reference-style-links 85 | [readfile-shortcode]: https://www.docsy.dev/docs/adding-content/shortcodes/#include-code-files 86 | 87 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/doc-con-writing.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | “I hate writing!” is a line heard all too often. Documenting a feature can be an intimidating task. 12 | 13 | The most common questions that come up when writing a document are: 14 | 15 | - “Where do I start?” 16 | - “What do I say?” 17 | - “How do I know when I’m done?” 18 | - “Who can I ask for help?” 19 | - “Where can I find writing resources?” 20 | 21 | These and many other questions can form mental barriers that discourage from contributing to 22 | documentation. When we remove or lower these barriers, writing can become an enjoyable, 23 | satisfying activity. 24 | 25 | ## I hate writing! 26 | 27 | That’s fine. Professional writers do, too. We’re just better at hiding it! The first thing to 28 | remember is that writing is an iterative process. Professional writers never produce the perfect 29 | document on their first try. 30 | 31 | Instead, we start with an SFD (Shoddy First Draft), and then edit, edit, edit. The goal is not to 32 | write a perfect document, but to write one that is good enough to convey the information in an 33 | approachable way. This removes the pressure of writing a polished piece and instead lets us focus 34 | on conveying the correct information in the right order and proportion. 35 | 36 | Write an SFD and brainstorm it with others - it really works! 37 | 38 | ## Where do I start? 39 | 40 | Begin by asking yourself, “Who is my audience?” Engineers? Less technical readers, such as 41 | management? Aliens? Once you know your audience, you’ll know how much detail to include, the 42 | tone to use, and who your reviewers will be. 43 | 44 | Next, put yourself in your audience’s shoes and ask, “What do I, as this type of reader, need 45 | to know to use this thing I’m writing about?” Things that are obvious to you may not be obvious 46 | to an outsider. What tasks will the reader need to accomplish? What will they need to know to 47 | accomplish each task? 48 | 49 | Write down headings representing each of those major points or areas. For example, “Installation,” 50 | “Configuration,” “Operation modes,” or “Command-line options.” These major things become the outline 51 | of your document. 52 | 53 | ## What do I say? 54 | 55 | Look at your outline. What does the reader need to know about each of those topics or areas of 56 | interest? For example, if you're writing a procedure, you may also want to include prerequisites - that 57 | is, steps the reader must complete before starting the procedure. What are the possible scenarios when 58 | starting the procedure? What are the possible outcomes? Do the steps differ depending on the starting 59 | scenario and the desired outcome? 60 | 61 | Write down some ideas or sub-topics for each key area. These become the mini table of contents for 62 | each section. Once you have those, your document outline is complete! 63 | 64 | Flesh out one section at a time, keeping the level of detail appropriate to your audience. For example, 65 | if you’re writing a command-line reference, chances are the reader will be an advanced user who needs 66 | to understand the intricacies of each option, including allowed values, the default value, the behavior 67 | resulting from each value, and any exceptions and caveats. 68 | 69 | On the other hand, if you’re documenting a specific feature, start by describing what it does, so that 70 | the reader has context, and describe how to use the feature afterwards. Put the “what” before the “how” 71 | and start simple, then introduce more detail as you go. 72 | 73 | ## Active or passive voice? 74 | 75 | **Always use active voice.** Active voice is much easier to parse and more relatable for the reader than 76 | passive voice. Passive voice sounds stuffy and officious; it reads like a boring legal document or that 77 | college textbook that made you fall asleep. It takes much more brain work to understand and causes the 78 | reader to zone out. 79 | 80 | Consider the following: 81 | 82 | "The files being installed are copied to the destination directory by the installer. The destination 83 | directory is created by the installer before the files are copied." 84 | 85 | And now read the same information in active voice: 86 | 87 | "The installer creates the destination directory, then copies the files to it." 88 | 89 | Night and day, don't you think? 90 | 91 | ## How do I know when I’m done? 92 | 93 | This is the hardest part. When do you stop writing? 94 | 95 | Go over each section and ask yourself again, “would I know how to use this thing based solely on what’s 96 | written?” If so, send your document out for review. Tekton engineers and contributors will confirm the 97 | document’s technical accuracy, while a technical writer will polish the style, tone, and structure of 98 | the document. 99 | 100 | ## How can I learn more? 101 | 102 | Take a look at the [Google Developer Style Guide](https://developers.google.com/style/). It covers 103 | style, tone, grammar, and punctuation. 104 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/run-locally.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | ## Running in a Docker container 12 | 13 | 14 | 1. Install [Docker Compose](https://docs.docker.com/compose/install/). 15 | 16 | 17 | 1. Build the Docker image: 18 | 19 | ```bash 20 | docker-compose build 21 | 22 | ``` 23 | 24 | 1. Run the built image: 25 | 26 | ```bash 27 | docker-compose up 28 | ``` 29 | 30 | 1. Verify that the website is working. Open your web browser and type 31 | `http://localhost:8888` in the navigation bar. This opens a local instance 32 | of the website, you can now make changes in the documentation and those 33 | changes will immediately show up in the browser after you save. 34 | 35 | 1. Hit *Ctrl + C* to stop the container. 36 | 37 | To remove the produced images run: 38 | 39 | ```bash 40 | docker-compose rm 41 | ``` 42 | 43 | ## Running Natively 44 | 45 | ### Prerequisites 46 | 47 | * [python3](https://www.python.org/downloads/) 48 | * [hugo (EXTENDED VERSION)](https://github.com/gohugoio/hugo/releases) 49 | * [pip](https://pip.pypa.io/en/stable/installing/) 50 | * [git 1.8.5 or later](https://github.com/git/git/releases) 51 | * [npm v6.14.5](https://nodejs.org/en/) 52 | * [node v14.3.0](https://nodejs.org/en/) 53 | * [netlify cli](https://cli.netlify.com/getting-started) 54 | * [netlify account](https://app.netlify.com/) 55 | 56 | ### Setup 57 | 58 | 1. Clone the repository 59 | 60 | ```bash 61 | git clone https://github.com/tektoncd/website && cd website 62 | ``` 63 | 64 | 1. Install the required node modules 65 | 66 | ```bash 67 | npm install 68 | ``` 69 | 70 | 1. Install the dependencies for the [sync script](https://github.com/tektoncd/website/blob/master/sync/README.md) 71 | 72 | ```bash 73 | python3 -m venv .venv 74 | source .venv/bin/activate 75 | pip3 install -r requirements.txt 76 | 77 | ``` 78 | 79 | 1. Run the sync script 80 | 81 | ```bash 82 | ./sync/sync.py 83 | ``` 84 | 85 | 1. Serve the website locally 86 | 87 | ```bash 88 | netlify dev 89 | ``` 90 | 91 | 1. Verify that the website is working 92 | 93 | Open your web browser and type `http://localhost:8888` in the navigation bar. 94 | This opens a local instance of the website, you can now make changes in the 95 | documentation and those changes will immediately show up in the browser after 96 | you save. 97 | 98 | The `sync.py` script clones the required repositories to a local cache folder, by default `sync/.cache`. 99 | You can modify content and create commits in your local cache to test changes to the original docs. 100 | 101 | To force and update of the local cache, use `./sync/sync.py --update-cache`. 102 | 103 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/samples/pipeline1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: TaskRun 3 | spec: 4 | taskRef: 5 | name: example-task 6 | bundle: python:3-alpine 7 | 8 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/samples/pipeline2.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1 2 | kind: TaskRun 3 | spec: 4 | taskRef: 5 | resolver: bundles 6 | params: 7 | - name: bundle 8 | value: python:3-alpine 9 | - name: name 10 | value: taskName 11 | - name: kind 12 | value: Task 13 | 14 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/samples/task.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: hello 5 | spec: 6 | steps: 7 | - name: echo 8 | image: alpine 9 | script: | 10 | #!/bin/sh 11 | echo "Hello World" 12 | 13 | -------------------------------------------------------------------------------- /content/en/docs/Contribute/vendor-docs.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | {{% pageinfo %}} 13 | **Important**: Documentation contributions to this website must be licensed 14 | under the [Creative Commons Attribution 4.0 License][ccl4], and the code samples 15 | must be licensed under the [Apache 2.0 License][apache2]. 16 | 17 | [ccl4]: https://creativecommons.org/licenses/by/4.0/ 18 | [apache2]: https://www.apache.org/licenses/LICENSE-2.0 19 | {{% /pageinfo %}} 20 | 21 | {{% readfile "/vendor/README.md" %}} 22 | 23 | -------------------------------------------------------------------------------- /content/en/docs/Getting-started/_index.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | Welcome to Tekton. Tekton is an open-source cloud native CICD (Continuous 12 | Integration and Continuous Delivery/Deployment) solution. Check the [Concepts 13 | section](/docs/concepts/) to learn more about how Tekton works. 14 | 15 | Let's get started! You can go ahead and [create your first task with 16 | Tekton](/docs/getting-started/tasks/). If you prefer, watch the following 17 | videos to learn the basics of how Tekton works before your first hands-on 18 | experience: 19 | 20 | {{< card footer="Tekton for Kubernetes explained">}} 21 | {{< youtube "6oE7jgRuF2o" >}} 22 | {{< /card >}} 23 | 24 | {{< card footer="Tekton CI/CD Pipelines overview">}} 25 | {{< youtube "pW606eBa7og" >}} 26 | {{< /card >}} 27 | 28 | {{< card footer="Tekton Chains: extensibility, automation, and security">}} 29 | {{< youtube "p9K3_xtozzA" >}} 30 | {{< /card >}} 31 | 32 | -------------------------------------------------------------------------------- /content/en/docs/Getting-started/samples/build-push-run.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1 2 | kind: PipelineRun 3 | metadata: 4 | generateName: build-push-run- 5 | spec: 6 | pipelineRef: 7 | name: build-push 8 | params: 9 | - name: image-reference 10 | value: /tekton-test 11 | workspaces: 12 | - name: shared-data 13 | volumeClaimTemplate: 14 | spec: 15 | accessModes: 16 | - ReadWriteOnce 17 | resources: 18 | requests: 19 | storage: 1Gi 20 | 21 | 22 | -------------------------------------------------------------------------------- /content/en/docs/Getting-started/samples/build-push.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1 2 | kind: Pipeline 3 | metadata: 4 | name: build-push 5 | spec: 6 | params: 7 | - name: image-reference 8 | type: string 9 | results: 10 | - name: image-ARTIFACT_OUTPUTS 11 | description: Built artifact. 12 | value: 13 | uri: $(tasks.kaniko-build.results.IMAGE_URL) 14 | digest: sha1:$(tasks.kaniko-build.results.IMAGE_DIGEST) 15 | workspaces: 16 | - name: shared-data 17 | tasks: 18 | - name: dockerfile 19 | taskRef: 20 | name: create-dockerfile 21 | workspaces: 22 | - name: source 23 | workspace: shared-data 24 | - name: kaniko-build 25 | runAfter: ["dockerfile"] 26 | taskRef: 27 | name: kaniko 28 | workspaces: 29 | - name: source 30 | workspace: shared-data 31 | params: 32 | - name: IMAGE 33 | value: $(params.image-reference) 34 | --- 35 | apiVersion: tekton.dev/v1 36 | kind: Task 37 | metadata: 38 | name: create-dockerfile 39 | spec: 40 | workspaces: 41 | - name: source 42 | steps: 43 | - name: add-dockerfile 44 | workingDir: $(workspaces.source.path) 45 | image: bash 46 | script: | 47 | cat < $(workspaces.source.path)/Dockerfile 48 | FROM alpine:3.16 49 | RUN echo "hello world" > hello.log 50 | EOF 51 | --- 52 | apiVersion: tekton.dev/v1 53 | kind: Task 54 | metadata: 55 | name: kaniko 56 | labels: 57 | app.kubernetes.io/version: "0.6" 58 | annotations: 59 | tekton.dev/pipelines.minVersion: "0.17.0" 60 | tekton.dev/categories: Image Build 61 | tekton.dev/tags: image-build 62 | tekton.dev/displayName: "Build and upload container image using Kaniko" 63 | tekton.dev/platforms: "linux/amd64,linux/arm64,linux/ppc64le" 64 | spec: 65 | description: >- 66 | This Task builds a simple Dockerfile with kaniko and pushes to a registry. 67 | This Task stores the image name and digest as results, allowing Tekton Chains to pick up 68 | that an image was built & sign it. 69 | params: 70 | - name: IMAGE 71 | description: Name (reference) of the image to build. 72 | - name: DOCKERFILE 73 | description: Path to the Dockerfile to build. 74 | default: ./Dockerfile 75 | - name: CONTEXT 76 | description: The build context used by Kaniko. 77 | default: ./ 78 | - name: EXTRA_ARGS 79 | type: array 80 | default: [] 81 | - name: BUILDER_IMAGE 82 | description: The image on which builds will run (default is v1.5.1) 83 | default: gcr.io/kaniko-project/executor:v1.5.1@sha256:c6166717f7fe0b7da44908c986137ecfeab21f31ec3992f6e128fff8a94be8a5 84 | workspaces: 85 | - name: source 86 | description: Holds the context and Dockerfile 87 | - name: dockerconfig 88 | description: Includes a docker `config.json` 89 | optional: true 90 | mountPath: /kaniko/.docker 91 | results: 92 | - name: IMAGE_DIGEST 93 | description: Digest of the image just built. 94 | - name: IMAGE_URL 95 | description: URL of the image just built. 96 | steps: 97 | - name: build-and-push 98 | workingDir: $(workspaces.source.path) 99 | image: $(params.BUILDER_IMAGE) 100 | args: 101 | - $(params.EXTRA_ARGS) 102 | - --dockerfile=$(params.DOCKERFILE) 103 | - --context=$(workspaces.source.path)/$(params.CONTEXT) # The user does not need to care the workspace and the source. 104 | - --destination=$(params.IMAGE) 105 | - --digest-file=$(results.IMAGE_DIGEST.path) 106 | # kaniko assumes it is running as root, which means this example fails on platforms 107 | # that default to run containers as random uid (like OpenShift). Adding this securityContext 108 | # makes it explicit that it needs to run as root. 109 | securityContext: 110 | runAsUser: 0 111 | - name: write-url 112 | image: docker.io/library/bash:5.1.4@sha256:c523c636b722339f41b6a431b44588ab2f762c5de5ec3bd7964420ff982fb1d9 113 | script: | 114 | set -e 115 | image="$(params.IMAGE)" 116 | echo -n "${image}" | tee "$(results.IMAGE_URL.path)" 117 | -------------------------------------------------------------------------------- /content/en/docs/How-to-guides/_index.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | This section includes common practical applications of Tekton. 12 | -------------------------------------------------------------------------------- /content/en/docs/Installation/_index.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | This section contains guides to install the latest version of the Tekton 12 | components. For other versions, select the component and version from the 13 | drop-down menu in the top right corner, then navigate to the corresponding 14 | installation document. 15 | 16 | -------------------------------------------------------------------------------- /content/en/docs/Installation/additional-configs.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | {{% readfile "/docs/Pipelines/additional-configs.md" %}} 12 | 13 | --- 14 | {{< card >}} 15 | Source for this document [available on GitHub](https://github.com/tektoncd/pipeline/blob/main/docs/additional-configs.md). 16 | {{< /card >}} 17 | 18 | -------------------------------------------------------------------------------- /content/en/docs/Installation/local-installation.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | There are several tools to run a local Kubernetes cluster on your computer. The 12 | Tekton documentation often includes instructions for either **minikube** or 13 | **kind**. 14 | 15 | See the corresponding [minikube][] and [kind][] documentation to learn how to 16 | install and set up a cluster on your computer. 17 | 18 | You can find some additional resources on the Tekton repositories: 19 | 20 | - Instructions to run both tools with a local registry are available on the 21 | [Pipelines repository][local-setup]. 22 | 23 | - You can find some convenience scripts to run Tekton components with kind on 24 | the [plumbing repository][kind-setup]. 25 | 26 | ## Further reading 27 | 28 | - [Getting started with Tasks][tasks-intro] 29 | 30 | [minikube]: https://minikube.sigs.k8s.io/docs/start/ 31 | [kind]: https://kind.sigs.k8s.io/docs/user/quick-start/ 32 | [kind-setup]: https://github.com/tektoncd/plumbing/tree/main/hack 33 | [local-setup]: https://github.com/tektoncd/pipeline/blob/main/docs/developers/local-setup.md 34 | [tasks-intro]: /docs/getting-started/tasks/ 35 | 36 | -------------------------------------------------------------------------------- /content/en/docs/Installation/pipelines.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | {{< readfile "/docs/Pipelines/install.md" >}} 12 | 13 | --- 14 | {{< card >}} 15 | Source for this document [available on GitHub](https://github.com/tektoncd/pipeline/blob/main/docs/install.md). 16 | {{< /card >}} 17 | 18 | -------------------------------------------------------------------------------- /content/en/docs/Installation/triggers.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | {{% readfile "/docs/Triggers/install.md" %}} 12 | 13 | --- 14 | {{< card >}} 15 | Source for this document [available on GitHub](https://github.com/tektoncd/triggers/blob/main/docs/install.md). 16 | {{< /card >}} 17 | 18 | -------------------------------------------------------------------------------- /content/en/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Welcome to Tekton" 3 | linkTitle: "Documentation" 4 | weight: 1 5 | menu: 6 | main: 7 | weight: 1 8 | --- 9 | 10 | Tekton is a cloud-native solution for building CI/CD systems. It consists of 11 | Tekton Pipelines, which provides the building blocks, and of supporting 12 | components, such as Tekton CLI and Tekton Catalog, that make Tekton a complete 13 | ecosystem. Tekton is part of the [CD Foundation](https://cd.foundation/), a 14 | [Linux Foundation](https://www.linuxfoundation.org/projects/) project. For more 15 | information, see the [Overview of Tekton](/docs/concepts/overview/). 16 | -------------------------------------------------------------------------------- /content/en/featured-background.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/content/en/featured-background.jpeg -------------------------------------------------------------------------------- /content/en/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search 3 | layout: search 4 | 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /content/en/vendor/disclaimer.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | This page includes content about running Tekton with specific platforms and 8 | cloud providers. The accuracy and freshness of this vendor documentation varies 9 | by vendor. 10 | 11 | If you want to contribute with platform-specific documentation, follow the 12 | [vendor contributions guidelines](/docs/contribute/vendor-docs/). 13 | -------------------------------------------------------------------------------- /content/en/vendor/google/pipelines-install.md: -------------------------------------------------------------------------------- 1 | Before you proceed, create or select a project on Google Cloud and [install the 2 | gcloud CLI][gcloud-install] on your computer. 3 | 4 | To install Tekton Pipelines: 5 | 6 | 1. Enable the Google Kubernetes Engine (GKE) API: 7 | 8 | ```bash 9 | gcloud services enable container.googleapis.com 10 | ``` 11 | 12 | 1. Create a cluster with Workload Identity enabled. For example: 13 | 14 | ```bash 15 | gcloud container clusters create tekton-cluster \ 16 | --num-nodes= \ 17 | --region= \ 18 | --workload-pool=.svc.id.goog 19 | ``` 20 | 21 | Where: 22 | 23 | + `` is the cluster location. For example, `us-central1`. 24 | See the documentation about [regional][regional-c] and [zonal][zonal-c] 25 | clusters for more information. 26 | 27 | + `` is the project ID. 28 | 29 | + `` is the number of nodes. 30 | 31 | Workload Identity allows your GKE cluster to access Google Cloud services 32 | using an [Identity Access Management (IAM)][iam-overview] service account. 33 | For example, the [Tekton build and push guide][kaniko-tuto] explains how to 34 | authenticate to Artifact Registry on a cluster with Workload Identity 35 | enabled. 36 | 37 | You can also [enable Workload Idenitity][wi-enable] on an existing cluster. 38 | 39 | 1. Follow the regular Kubernetes installation steps. 40 | 41 | **Private clusters** 42 | 43 | If you are running a [private cluster][private-cluster] and experience [problems 44 | with GKE DNS resolution][gke-issue], allow the port `8443` in your firewall 45 | rules. 46 | 47 | ```bash 48 | gcloud compute firewall-rules update --allow tcp:8443 49 | ``` 50 | 51 | See the documentation about [firewall rules for private 52 | clusters][private-cluster-fw] for more information. 53 | 54 | **Autopilot** 55 | 56 | If you are using [Autopilot mode][autopilot] on your GKE cluster and 57 | experience [some problems][ap-issue], try the following: 58 | 59 | 1. Allow port `8443` in your firewall rules. 60 | 61 | ```bash 62 | gcloud compute firewall-rules update --allow tcp:8443 63 | ``` 64 | 65 | 1. Disable the affinity assistant. 66 | 67 | ```bash 68 | kubectl patch cm feature-flags -n tekton-pipelines \ 69 | -p '{"data":{"disable-affinity-assistant":"true"}}' 70 | ``` 71 | 72 | 1. Increase the ephemeral storage. 73 | 74 | 75 | [location]: https://cloud.google.com/artifact-registry/docs/repositories/repo-locations 76 | [gke-issue]: https://github.com/tektoncd/pipeline/issues/3317#issuecomment-708066087 77 | [gcloud-install]: https://cloud.google.com/sdk/docs/install 78 | [gcloud-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects 79 | [iam-overview]: https://cloud.google.com/iam/docs/overview 80 | [regional-c]: https://cloud.google.com/kubernetes-engine/docs/concepts/regional-clusters 81 | [zonal-c]: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-zonal-cluster 82 | [private-cluster]: https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept 83 | [private-cluster-fw]: https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules 84 | [kaniko-tuto]: /docs/how-to-guides/kaniko-build-push/#container-registry-authentication 85 | [autopilot]: https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview 86 | [ap-issue]: https://github.com/tektoncd/pipeline/issues/3798 87 | [wi-enable]: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#enable-existing-cluster 88 | 89 | -------------------------------------------------------------------------------- /content/en/vendor/google/registry-authentication.md: -------------------------------------------------------------------------------- 1 | **GKE Workload Identity** 2 | 3 | If you are running your Pipelines on Google Kubernetes Engine (GKE), [create a 4 | cluster with Workload Identity enabled][wi-create] or [enable Workload Identity 5 | on an existing cluster][wi-enable]. This allows you to to run your pipeline and 6 | push images to [Artifact Registry][ar-overview] without authentication 7 | credentials. If you are using Workload Identity, **skip step 2** when you [run 8 | your pipeline](#run-your-pipeline). 9 | 10 | Set up an Artifact Registry repository: 11 | 12 | 1. Enable the Artifact Registry API: 13 | 14 | ```bash 15 | gcloud services enable artifactregistry.googleapis.com 16 | ``` 17 | 18 | 1. Create a Docker repository to push the image to: 19 | 20 | ```bash 21 | gcloud artifacts repositories create \ 22 | --repository-format=docker \ 23 | --location=us-central1 --description="Docker repository" 24 | ``` 25 | 26 | Replace: 27 | 28 | - `` with the name of your repository. 29 | - `` with the name of your preferred [location][]. For example, 30 | `us-central1`. 31 | 32 | Configure the GKE cluster to allow the Pipeline to push images to Artifact 33 | Registry: 34 | 35 | 1. Create a Kubernetes Service Account: 36 | 37 | ```bash 38 | kubectl create serviceaccount 39 | ``` 40 | 41 | Where `` is the name of the service account. For example, `tekton-sa`. 42 | 43 | 1. Create a Google Service Account with the same name: 44 | 45 | ```bash 46 | gcloud iam service-accounts create 47 | ``` 48 | 49 | 1. Grant the Google Service Account permissions to push to the Artifact 50 | Registry container repository: 51 | 52 | ```bash 53 | gcloud artifacts repositories add-iam-policy-binding \ 54 | --location \ 55 | --member=serviceAccount:build-robot@.iam.gserviceaccount.com \ 56 | --role=roles/artifactregistry.reader \ 57 | --role=roles/artifactregistry.writer 58 | ``` 59 | 60 | Where 61 | 62 | - `` is the name of the [repository][ar-repos]. 63 | - `` is the repository [repository location][location]. 64 | - `` is the [project id][project-id]. 65 | 66 | 1. Set up the Workload Identity mappings on the Kubernetes cluster: 67 | 68 | ```bash 69 | kubectl annotate serviceaccount \ 70 | \ 71 | iam.gke.io/gcp-service-account=build-robot@.iam.gserviceaccount.com 72 | ``` 73 | 74 | 1. Set up Workload Identity mappings for the Google Service Account: 75 | 76 | ```bash 77 | gcloud iam service-accounts add-iam-policy-binding \ 78 | --role roles/iam.workloadIdentityUser \ 79 | --member "serviceAccount:.svc.id.goog[default/]" \ 80 | build-robot@.iam.gserviceaccount.com 81 | ``` 82 | 83 | This creates two service accounts, an [IAM service account][iam-account] and a 84 | [Kubernetes service account][k8s-account], and "links" them. Workload Identity 85 | allows workloads in your GKE cluster to impersonate IAM service accounts to 86 | access Google Cloud services. 87 | 88 | **Use Docker authentication** 89 | 90 | If you prefer to use Docker authentication to push your image to Artifact 91 | Registry, there are two options: 92 | 93 | - [Use the gcloud credential helper][gcloud-auth]. 94 | - [Use the Standalone Docker credential helper][standalone-auth]. 95 | 96 | In both cases your credentials are saved to a Docker configuration file in your 97 | user home directory: `$HOME/.docker/config.json`. Use this file to follow the 98 | "General Authentication" instructions. 99 | 100 | [workload-identity]: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity 101 | [wi-create]: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#enable_on_cluster 102 | [wi-enable]: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#enable-existing-cluster 103 | [location]: https://cloud.google.com/artifact-registry/docs/repositories/repo-locations 104 | [ar-repos]: https://cloud.google.com/artifact-registry/docs/repositories/create-repos 105 | [project-id]: https://cloud.google.com/resource-manager/docs/creating-managing-projects 106 | [iam-account]: https://cloud.google.com/iam/docs/service-accounts 107 | [k8s-account]: https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/ 108 | [gcloud-auth]: https://cloud.google.com/artifact-registry/docs/docker/authentication#gcloud-helper 109 | [standalone-auth]: https://cloud.google.com/artifact-registry/docs/docker/authentication#standalone-helper 110 | [ar-overview]: https://cloud.google.com/artifact-registry/docs/overview 111 | 112 | -------------------------------------------------------------------------------- /content/en/vendor/redhat/pipelines-install.md: -------------------------------------------------------------------------------- 1 | To install Tekton Pipelines on OpenShift, you must first apply the `anyuid` 2 | security context constraint to the `tekton-pipelines-controller` service 3 | account. This is required to run the webhook Pod. See [Security Context 4 | Constraints][security-con] for more information. 5 | 6 | 1. Log on as a user with `cluster-admin` privileges. The following example 7 | uses the default `system:admin` user: 8 | 9 | ```bash 10 | oc login -u system:admin 11 | ``` 12 | 13 | 1. Set up the namespace (project) and configure the service account: 14 | 15 | ```bash 16 | oc new-project tekton-pipelines 17 | oc adm policy add-scc-to-user anyuid -z tekton-pipelines-controller 18 | oc adm policy add-scc-to-user anyuid -z tekton-pipelines-webhook 19 | ``` 20 | 1. Install Tekton Pipelines: 21 | 22 | Because OpenShift uses random user id (and user id range per namespace) for pods, we need to remove the `securityContext.runAsUser` and `securityContext.runAsGroup` from any container from the release.yaml. 23 | You will need to have [`yq`](https://mikefarah.gitbook.io/yq/) installed for this to work. Another way would be to download the yaml, search and replace (here replace with nothing) in your favourite editor. 24 | 25 | ```bash 26 | curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.notags.yaml | yq 'del(.spec.template.spec.containers[].securityContext.runAsUser, .spec.template.spec.containers[].securityContext.runAsGroup)' | oc apply -f - 27 | ``` 28 | 29 | 30 | See the [OpenShift CLI documentation][openshift-cli] for more information on 31 | the `oc` command. 32 | 33 | 1. Monitor the installation using the following command until all components 34 | show a `Running` status: 35 | 36 | ```bash 37 | oc get pods --namespace tekton-pipelines --watch 38 | ``` 39 | 40 | **Note:** Hit CTRL + C to stop monitoring. 41 | 42 | Congratulations! You have successfully installed Tekton Pipelines on your 43 | OpenShift environment. 44 | 45 | To run OpenShift 4.x on your laptop (or desktop), take a look at [Red Hat 46 | CodeReady Containers](https://github.com/code-ready/crc). 47 | 48 | [openshift-cli]: https://docs.openshift.com/container-platform/4.3/cli_reference/openshift_cli/getting-started-cli.html 49 | [security-con]: https://docs.openshift.com/container-platform/4.3/authentication/managing-security-context-constraints.html 50 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.3" 2 | 3 | services: 4 | 5 | site: 6 | image: tekton/website 7 | build: 8 | context: . 9 | ports: 10 | - '8888:8888' 11 | volumes: 12 | - /src/content/en/docs/Chains/ 13 | - /src/content/en/docs/CLI/ 14 | - /src/content/en/docs/Dashboard/ 15 | - /src/content/en/docs/Operator/ 16 | - /src/content/en/docs/Pipelines/ 17 | - /src/content/en/docs/Results/ 18 | - /src/content/en/docs/Triggers/ 19 | - /src/content/en/vault/ 20 | - /src/node_modules/ 21 | - /src/sync/.cache/ 22 | - .:/src/ 23 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/tektoncd/website 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/google/docsy v0.6.0 // indirect 7 | github.com/google/docsy/dependencies v0.6.0 // indirect 8 | ) 9 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/FortAwesome/Font-Awesome v0.0.0-20210804190922-7d3d774145ac/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 2 | github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 3 | github.com/google/docsy v0.3.0 h1:wR0e0xJ6qIj/RPq2AP1Ufm44BCak9Sl72H2BWNAc/JA= 4 | github.com/google/docsy v0.3.0/go.mod h1:opkofZo7WlNw+/pjrHSC2nAHJHQ6Xnms9vtL/htBvds= 5 | github.com/google/docsy v0.4.0 h1:Eyt2aiDC1fnw/Qq/9xnIqUU5n5Yyk4c8gX3nBDdTv/4= 6 | github.com/google/docsy v0.4.0/go.mod h1:vJjGkHNaw9bO42gpFTWwAUzHZWZEVlK46Kx7ikY5c7Y= 7 | github.com/google/docsy v0.5.1 h1:D/ZdFKiE29xM/gwPwQzmkyXhcbQGkReRS6aGrF7lnYk= 8 | github.com/google/docsy v0.5.1/go.mod h1:maoUAQU5H/d+FrZIB4xg1EVWAx7RyFMGSDJyWghm31E= 9 | github.com/google/docsy v0.5.2-0.20221111165106-246a2e1e80ce h1:Zb4tKQCf5Pwsw+/Hjg9JpYcoFGadF340Y6Nv1QC8mes= 10 | github.com/google/docsy v0.5.2-0.20221111165106-246a2e1e80ce/go.mod h1:maoUAQU5H/d+FrZIB4xg1EVWAx7RyFMGSDJyWghm31E= 11 | github.com/google/docsy v0.6.0 h1:43bVF18t2JihAamelQjjGzx1vO2ljCilVrBgetCA8oI= 12 | github.com/google/docsy v0.6.0/go.mod h1:VKKLqD8PQ7AglJc98yBorATfW7GrNVsn0kGXVYF6G+M= 13 | github.com/google/docsy/dependencies v0.3.0/go.mod h1:2zZxHF+2qvkyXhLZtsbnqMotxMukJXLaf8fAZER48oo= 14 | github.com/google/docsy/dependencies v0.4.0/go.mod h1:2zZxHF+2qvkyXhLZtsbnqMotxMukJXLaf8fAZER48oo= 15 | github.com/google/docsy/dependencies v0.5.1/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= 16 | github.com/google/docsy/dependencies v0.6.0 h1:BFXDCINbp8ZuUGl/mrHjMfhCg+b1YX+hVLAA5fGW7Pc= 17 | github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= 18 | github.com/twbs/bootstrap v4.6.1+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 19 | github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 20 | -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Previous" 7 | 8 | [ui_pager_next] 9 | other = "Next" 10 | 11 | [ui_read_more] 12 | other = "Read more" 13 | 14 | [ui_search] 15 | other = "Search this site…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "in" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = """ 24 | The Linux Foundation®. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. 25 | For a list of trademarks of The Linux Foundation, please see our [Trademark Usage page](https://www.linuxfoundation.org/trademark-usage). 26 | Linux is a registered trademark of Linus Torvalds. [Privacy Policy](https://www.linuxfoundation.org/privacy/) and [Terms of Use](https://www.linuxfoundation.org/terms/). 27 | """ 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "By" 32 | [post_created] 33 | other = "Created" 34 | [post_last_mod] 35 | other = "Last modified" 36 | [post_edit_this] 37 | other = "Edit this page" 38 | [post_create_issue] 39 | other = "Create documentation issue" 40 | [post_create_project_issue] 41 | other = "Create project issue" 42 | [post_posts_in] 43 | other = "Posts in" 44 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main"}} 2 |
3 |
4 |

Not found

5 |

Oops! This page doesn't exist. Try going back to our home page.

6 |
7 |
8 | {{ end }} 9 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-codeblock-mermaid.html: -------------------------------------------------------------------------------- 1 |
2 | {{- .Inner }} 3 |
4 | 5 | {{ .Page.Store.Set "hasMermaid" true -}} 6 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "head.html" . }} 5 | {{ if eq .Kind "home" }} 6 | {{ $cssAsciinema := "css/asciinema-player.css" }} 7 | {{ $cssAsciinema := resources.Get $cssAsciinema | toCSS (dict "enableSourceMap" false) | postCSS | minify | fingerprint }} 8 | 9 | {{ end }} 10 | 11 | 12 |
13 | {{ partial "navbar.html" . }} 14 | {{ partial "banner.html" . }} 15 |
16 |
17 |
18 | {{ block "main" . }}{{ end }} 19 |
20 | {{ partial "footer.html" . }} 21 |
22 | {{ partial "privacy-notice.html" }} 23 | {{ partialCached "scripts.html" . }} 24 | 25 | 26 | -------------------------------------------------------------------------------- /layouts/_default/search.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |
5 | 6 |
7 | {{ with .Site.Params.gcs_engine_id }} 8 | 19 | 20 | {{ end }} 21 |
22 |
23 | 24 | {{ end }} -------------------------------------------------------------------------------- /layouts/community/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 3 | 4 |
5 |
6 | 7 |

Welcome to the Tekton Community!

8 |

Our mission is to be the industry-standard, cloud-native CI/CD 9 | platform components and ecosystem.

10 |
11 |
12 |
13 | 14 | {{ partial "community-links.html" . }} 15 | 16 |
17 | {{ .Content }} 18 |
19 | 20 | {{ end }} 21 | -------------------------------------------------------------------------------- /layouts/docs/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "head.html" . }} 5 | 6 | 7 |
8 | {{ partial "navbar.html" . }} 9 | {{ partial "banner.html" . }} 10 |
11 |
12 |
13 |
14 | 17 | 22 |
23 | {{ partial "version-banner.html" . }} 24 | {{ if strings.Contains .Page.RelPermalink "/docs/" -}} 25 | {{ partial "release-selector.html" }} 26 | {{ end -}} 27 | {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} 28 | {{ block "main" . }}{{ end }} 29 |
30 |
31 |
32 | {{ partial "footer.html" . }} 33 |
34 | {{ partial "scripts.html" . }} 35 | 36 | 37 | -------------------------------------------------------------------------------- /layouts/partials/banner.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/community-links.html: -------------------------------------------------------------------------------- 1 | 105 | -------------------------------------------------------------------------------- /layouts/partials/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | {{ $links := .Site.Params.links }} 2 |
3 |
4 |
5 |
6 | {{ with $links }} 7 | {{ with index . "user"}} 8 | {{ template "footer-links-block" . }} 9 | {{ end }} 10 | {{ end }} 11 |
12 |
13 | {{ with $links }} 14 | {{ with index . "developer"}} 15 | {{ template "footer-links-block" . }} 16 | {{ end }} 17 | {{ end }} 18 |
19 |
20 | © {{ now.Year}} {{ T "footer_all_rights_reserved" | markdownify}} 21 | {{ if not .Site.Params.ui.footer_about_disable }} 22 | {{ with .Site.GetPage "about" }}

{{ .Title }}

{{ end }} 23 | {{ end }} 24 |
25 |
26 |
27 |
28 | {{ define "footer-links-block" }} 29 |
    30 | {{ range . }} 31 |
  • 32 | 33 | 34 | 35 |
  • 36 | {{ end }} 37 |
38 | {{ end }} 39 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ hugo.Generator }} 4 | {{ if eq (getenv "HUGO_ENV") "production" }} 5 | 6 | {{ else }} 7 | 8 | {{ end }} 9 | {{ range .AlternativeOutputFormats -}} 10 | 11 | {{ end -}} 12 | {{ partialCached "favicons.html" . }} 13 | {{ if .IsHome }}{{ .Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}Tekton{{ end }} 14 | {{- template "_internal/opengraph.html" . -}} 15 | {{- template "_internal/google_news.html" . -}} 16 | {{- template "_internal/schema.html" . -}} 17 | {{- template "_internal/twitter_cards.html" . -}} 18 | {{ if eq (getenv "HUGO_ENV") "production" }} 19 | {{ template "_internal/google_analytics.html" . }} 20 | {{ end }} 21 | {{ partialCached "head-css.html" . "asdf" }} 22 | 25 | {{ partial "hooks/head-end.html" . }} 26 | -------------------------------------------------------------------------------- /layouts/partials/navbar-version-selector-docs.html: -------------------------------------------------------------------------------- 1 | {{ $jsVerSwitcher := resources.Get "js/version-switcher.js" }} 2 | {{ $jsVerSwitcher := $jsVerSwitcher | fingerprint }} 3 | 4 | 19 | -------------------------------------------------------------------------------- /layouts/partials/navbar-version-selector-vault.html: -------------------------------------------------------------------------------- 1 | {{ $jsVerSwitcher := resources.Get "js/version-switcher.js" }} 2 | {{ $jsVerSwitcher := $jsVerSwitcher | minify | fingerprint }} 3 | 4 | 21 | -------------------------------------------------------------------------------- /layouts/partials/navbar.html: -------------------------------------------------------------------------------- 1 | {{ $cover := .HasShortcode "blocks/cover" }} 2 | 43 | -------------------------------------------------------------------------------- /layouts/partials/page-meta-links.html: -------------------------------------------------------------------------------- 1 | {{ if .Path }} 2 | {{ $gh_repo := ($.Param "github_repo") }} 3 | {{ $gh_subdir := ($.Param "github_subdir") }} 4 | {{ $gh_project_repo := ($.Param "github_project_repo") }} 5 | {{ if $gh_repo }} 6 |
7 | {{ $editURL := printf "%s/edit/main/content/%s" $gh_repo .Path }} 8 | {{ if $gh_project_repo }} 9 | {{ $filename := .File.LogicalName }} 10 | {{ if and $gh_project_repo (eq $filename "_index.md") }} 11 | {{ $filename = "README.md" }} 12 | {{ end }} 13 | {{ $editURL = printf "%s/edit/main/docs/%s" $gh_project_repo $filename }} 14 | {{ else if and ($gh_subdir) (.Site.Language.Lang) }} 15 | {{ $editURL = printf "%s/edit/main/%s/content/%s/%s" $gh_repo $gh_subdir ($.Site.Language.Lang) $.Path }} 16 | {{ else if .Site.Language.Lang }} 17 | {{ $editURL = printf "%s/edit/main/content/%s/%s" $gh_repo ($.Site.Language.Lang) .Path }} 18 | {{ else if $gh_subdir }} 19 | {{ $editURL = printf "%s/edit/main/%s/content/%s" $gh_repo $gh_subdir $.Path }} 20 | {{ end }} 21 | {{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (htmlEscape ($.Title | default $.LinkTitle ))}} 22 | {{ T "post_edit_this" }} 23 | {{ T "post_create_issue" }} 24 |
25 | {{ end }} 26 | {{ end }} -------------------------------------------------------------------------------- /layouts/partials/privacy-notice.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

This website uses cookies

5 |

6 | We use analytics and cookies to understand site traffic and offer 7 | you a better browsing experience. Learn more about our privacy policy. 8 |

9 | 10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /layouts/partials/release-selector.html: -------------------------------------------------------------------------------- 1 | {{ $jsRelSwitcher := resources.Get "js/release-switcher.js" }} 2 | {{ $jsRelSwitcher := $jsRelSwitcher | fingerprint }} 3 | 4 | 20 | 21 | -------------------------------------------------------------------------------- /layouts/partials/scripts.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | {{ $jsBase := resources.Get "js/base.js" }} 7 | {{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }} 8 | {{ $jsAnchor := resources.Get "js/anchor.js" }} 9 | {{ $js := (slice $jsBase $jsSearch $jsAnchor) | resources.Concat "js/main.js" }} 10 | {{ if .Site.IsServer }} 11 | 12 | {{ else }} 13 | {{ $js := $js | minify | fingerprint }} 14 | 15 | {{ end }} 16 | 17 | {{ $c2cJS := resources.Get "js/click-to-copy.js" | minify | fingerprint }} 18 | 19 | 20 | {{ if .Page.Store.Get "hasMermaid" }} 21 | 28 | {{ end }} 29 | 30 | {{ partial "hooks/body-end.html" . }} 31 | -------------------------------------------------------------------------------- /layouts/partials/sidebar-tree-docs.html: -------------------------------------------------------------------------------- 1 | {{/* Render documentation nav from definition in config file */}} 2 | 3 |
4 | {{ if not .Site.Params.ui.sidebar_search_disable -}} 5 | 10 | {{ else -}} 11 |
12 | 17 |
18 |
19 | {{ end -}} 20 | 21 | 67 |
68 | -------------------------------------------------------------------------------- /layouts/partials/sidebar.html: -------------------------------------------------------------------------------- 1 | {{/* The "active" toggle here may delay rendering, so we only cache this side bar menu for bigger sites. 2 | */}}{{ $sidebarCacheLimit := cond (isset .Site.Params.ui "sidebar_cache_limit") .Site.Params.ui.sidebar_cache_limit 2000 -}} 3 | {{ $shouldCache := ge (len .Site.Pages) $sidebarCacheLimit -}} 4 | {{ $sidebarCacheTypeRoot := cond (isset .Site.Params.ui "sidebar_cache_type_root") .Site.Params.ui.sidebar_cache_type_root false -}} 5 | {{ $isDocs := (strings.Contains .RelPermalink "docs/") }} 6 | {{ $isVault := (strings.Contains .RelPermalink "vault/") }} 7 | {{ if $shouldCache -}} 8 | {{ $mid := printf "m-%s" (.RelPermalink | anchorize) }} 9 | 22 | {{ partialCached "sidebar-tree.html" . .FirstSection.RelPermalink }} 23 | {{ else -}} 24 | {{ if $isDocs -}} 25 | {{ partial "sidebar-tree-docs.html" . }} 26 | {{- else if $isVault -}} 27 | {{ partial "sidebar-tree-vault.html" . }} 28 | {{- else -}} 29 | {{ partial "sidebar-tree.html" . }} 30 | {{- end }} 31 | {{- end }} 32 | -------------------------------------------------------------------------------- /layouts/partials/tutorial-modal.html: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /layouts/shortcodes/blocks/cover.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $blockID := printf "td-cover-block-%d" .Ordinal }} 3 | {{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }} 4 | {{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }} 5 | {{ $col_id := .Get "color" | default "dark" }} 6 | {{ $image_anchor := .Get "image_anchor" | default "smart" }} 7 | {{ $logo_anchor := .Get "logo_anchor" | default "smart" }} 8 | {{/* Height can be one of: auto, min, med, max, full. */}} 9 | {{ $height := .Get "height" | default "max" }} 10 | {{ with $promo_image }} 11 | {{ $promo_image_big := (.Fill (printf "1920x1080 %s" $image_anchor)) }} 12 | {{ $promo_image_small := (.Fill (printf "960x540 %s" $image_anchor)) }} 13 | 14 | 15 | 29 | {{ end }} 30 |
31 |
32 | 33 |
34 |
35 |
36 | {{ with .Get "title" }}

{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}{{ end }}{{ $title | html }}

{{ end }} 37 | {{ with .Get "subtitle" }}

{{ . | html }}

{{ end }} 38 |
39 | {{ .Inner | markdownify}} 40 |
41 |
42 |
43 |
44 |
45 |
46 | -------------------------------------------------------------------------------- /layouts/shortcodes/blocks/manifesto.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $col_id := .Get "color" | default .Ordinal }} 3 | {{ $height := .Get "height" | default "auto" }} 4 | {{/* Height can be one of: auto, min, med, max, full. */}} 5 | 6 |
7 |
8 |
9 |
10 | cd.foundation 11 |
12 |
13 |
14 |
15 |
16 |
17 |

Tekton is a Graduated Continuous Delivery 18 | Foundation project and follows 20 | the OpenSSF best practices.

21 |
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /layouts/shortcodes/blocks/partners-alternate.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $col_id := .Get "color" | default .Ordinal }} 3 | {{ $height := .Get "height" | default "auto" }} 4 |
5 |
6 |
7 |
8 | tekton friends 9 |
10 |
11 |
12 |
13 |
14 |
15 |

Tekton is a collaborative project where members of the ecosystem contribute together to make CI/CD easier for everyone. 16 | See the individuals and organizations 17 | that are involved in the Tekton project. 18 |

19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /layouts/shortcodes/blocks/partners.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $col_id := .Get "color" | default .Ordinal }} 3 | {{ $height := .Get "height" | default "auto" }} 4 | {{ $type := .Get "type" | default "" }} 5 | 6 |
7 |
8 |
9 |
10 |

created by

11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |

in partnership with

21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 | 29 |
30 |
31 | 32 |
33 |
34 |
35 |
36 | 37 |
38 |
39 | 40 |
41 |
42 | 43 |
44 |
45 |
46 |
47 | -------------------------------------------------------------------------------- /layouts/shortcodes/blocks/showcase.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $col_id := .Get "color" | default .Ordinal }} 3 | {{ $height := .Get "height" | default "auto" }} 4 | {{/* Height can be one of: auto, min, med, max, full. */}} 5 | 6 |
7 |
8 |
9 |
10 |
11 |
12 |

Tekton is a powerful and flexible

13 |

open-source framework for creating CI/CD systems,

14 |

allowing developers to

15 |

build, test, and deploy

16 |

across cloud providers and on-premise systems.

17 | Get started with Tekton. 18 |
19 |
20 |
21 | {{ $jsAsciinema := resources.Get "js/asciinema-player.js" }} 22 | {{ $jsAsciinema := $jsAsciinema | minify | fingerprint }} 23 | 24 | 25 |
26 |
27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /layouts/shortcodes/comment.html: -------------------------------------------------------------------------------- 1 | {{ if .Inner }}{{ end }} 2 | -------------------------------------------------------------------------------- /layouts/shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if and (not .IsNamedParams) (.Get 0) }} 3 | {{ .Scratch.Set "header" (.Get 0) }} 4 | {{ else }} 5 | {{ .Scratch.Set "header" (default (printf "Tab %v" ( add $.Ordinal 1)) (.Get "header")) }} 6 | {{ end }} 7 | {{ $header := (.Scratch.Get "header") }} 8 | 9 | 10 | {{ $tab := dict "header" $header }} 11 | {{ with $.Get "lang" }} 12 | {{ $tab = merge $tab (dict "language" ($.Get "lang")) }} 13 | {{ end }} 14 | {{ with $.Get "highlight" }} 15 | {{ $tab = merge $tab (dict "highlight" ($.Get "highlight")) }} 16 | {{ end }} 17 | {{ with $.Get "code" }} 18 | {{ $tab = merge $tab (dict "code" ($.Get "code")) }} 19 | {{ end }} 20 | {{ with $.Get "disabled" }} 21 | {{ $tab = merge $tab (dict "disabled" ($.Get "disabled")) }} 22 | {{ end }} 23 | {{ with $.Inner }} 24 | 26 | {{ $tab = merge $tab (dict "content" $.Inner ) }} 27 | {{ end }} 28 | 29 | 30 | {{ with .Parent }} 31 | {{- $.Parent.Scratch.SetInMap "tabs" (printf "%v" $.Ordinal) $tab -}} 32 | {{ end }} 33 | -------------------------------------------------------------------------------- /layouts/shortcodes/tabs.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 3 | 4 | {{ with .Get "langEqualsHeader" }} 5 | {{ if ne ( printf "%T" . ) "bool" }} 6 | {{- errorf "shortcode tabpane: parameter 'langEqualsHeader' must be either true or false" -}} 7 | {{ end }} 8 | {{ end }} 9 | 10 | {{ with .Get "code" }} 11 | {{ if ne ( printf "%T" . ) "bool" }} 12 | {{- errorf "shortcode tabpane: parameter 'code' must be either true or false" -}} 13 | {{ end }} 14 | {{ end }} 15 | 16 | {{ with .Get "persistLang" }} 17 | {{ if ne ( printf "%T" . ) "bool" }} 18 | {{- errorf "shortcode tabpane: parameter 'persistLang' must be either true or false" -}} 19 | {{ end }} 20 | {{ end }} 21 | 22 | 23 | {{- $langPane := default "" ($.Get "lang") -}} 24 | {{- $hloptionsPane := default "" ($.Get "highlight") -}} 25 | {{- $codePane := default false ($.Get "code") -}} 26 | {{- $langEqualsHeader := default false ($.Get "langEqualsHeader") -}} 27 | {{- $persistLang := default true ($.Get "persistLang") -}} 28 | {{- $disabled := false -}} 29 | {{- $activeSet := false -}} 30 | 31 | 32 | {{- .Inner -}} 33 | 34 | 75 | 76 | {{ $activeSet = false }} 77 | 78 | 79 |
80 | {{- range $index, $element := $.Scratch.Get "tabs" -}} 81 | 82 | {{- $lang := $langPane -}} 83 | {{- if $langEqualsHeader -}} 84 | {{- $lang = $element.header -}} 85 | {{end}} 86 | {{- with $element.language -}} 87 | {{- $lang = $element.language -}} 88 | {{- end -}} 89 | 90 | {{- $disabled := false -}} 91 | {{- with $element.disabled -}} 92 | {{- $disabled = . }} 93 | {{- end -}} 94 | 95 | {{- $hloptions := $hloptionsPane -}} 96 | {{- with $element.highlight -}} 97 | {{- $hloptions = $element.highlight -}} 98 | {{- end -}} 99 | 100 | {{- $code := $codePane -}} 101 | {{- with $element.code -}} 102 | {{ if ne ( printf "%T" . ) "bool" }} 103 | {{- errorf "shortcode tab: parameter 'code' must be either true or false" -}} 104 | {{ end }} 105 | {{- $code = . }} 106 | {{- end -}} 107 | 108 | {{- $tabid := printf "tabs-%v-%v-tab" $.Ordinal $index | anchorize -}} 109 | {{- $entryid := printf "tabs-%v-%v" $.Ordinal $index | anchorize -}} 110 | 111 |
113 | {{ if $code }} 114 | {{- highlight (trim (index . "content") "\n") $lang $hloptions -}} 115 | {{- else -}} 116 | {{- index . "content" -}} 117 | {{- end -}} 118 |
119 | 120 | {{ if not $disabled }} 121 | {{ $activeSet = true }} 122 | {{ end }} 123 | 124 | {{ end }} 125 |
126 | -------------------------------------------------------------------------------- /layouts/shortcodes/tutorial.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 10 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "public" 3 | command = "make production-build" 4 | 5 | [build.environment] 6 | HUGO_VERSION = "0.107.0" 7 | 8 | [context.production.environment] 9 | HUGO_ENV = "production" 10 | 11 | [context.deploy-preview] 12 | HUGO_ENV = "staging" 13 | command = "make preview-build" 14 | 15 | [context.branch-deploy] 16 | command = "make preview-build" 17 | 18 | [dev] 19 | command = "make serve URL=http://localhost:8888/" 20 | framework = "hugo" 21 | targetPort = 1313 22 | 23 | [[plugins]] 24 | package = "netlify-plugin-checklinks" 25 | 26 | [plugins.inputs] 27 | todoPatterns = ["load", "fragment"] 28 | checkExternal = false 29 | followSourceMaps = true 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tekton-docs", 3 | "version": "1.0.0", 4 | "description": "Tekton documentation", 5 | "main": "none.js", 6 | "scripts": { 7 | "start": "netlify dev" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/tektoncd/website.git" 12 | }, 13 | "author": "", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/tektoncd/website/issues" 17 | }, 18 | "homepage": "https://tekton.dev/", 19 | "devDependencies": { 20 | "autoprefixer": "^10.4.0", 21 | "netlify-cli": "^19.1.4", 22 | "postcss": "^8.3.7", 23 | "postcss-cli": "^9.1.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /public/_redirects: -------------------------------------------------------------------------------- 1 | # Chains predicate docs. 2 | /predicate/chains/* https://github.com/tektoncd/chains/tree/main/docs/predicate/:splat 3 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | sync/requirements.txt -------------------------------------------------------------------------------- /roadmap.md: -------------------------------------------------------------------------------- 1 | # Tekton Website 2022 Roadmap 2 | 3 | We are continually working to improve the user experience on the Tekton website. 4 | 5 | The following is a (non-comprehensive) list of things we are working on or 6 | planning to work on in 2022: 7 | 8 | - Use a single framework for all the introductory tutorials. Probably 9 | [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/), which is available 10 | for Windows, Mac, and Linux. 11 | 12 | - Update Katakoda tutorials or look for a feasible alternative and try to keep 13 | the content close to what the tutorials cover. 14 | 15 | - Reorder the main navigation panel to a structure that follows a logical order 16 | instead of the current one. 17 | 18 | - Update link in [tekton.dev](https://tekton.dev) to take users to the "Getting 19 | started" section, since the interactive tutorial are currently out of date. 20 | 21 | - Work on a solution to communicate the status: alpha, beta, stable, or 22 | deprecated; of the components. 23 | 24 | - Update the website theme to the latest version of Docsy. 25 | 26 | - Come up with a solution to avoid content drifting as the components are 27 | updated. Try to keep the how-to always up-to-date. 28 | 29 | 30 | ## Updates to documentation structure 31 | 32 | This structure is intended to make the documentation more friendly for newcomers 33 | without disrupting the current content too much. We hope to reorganize the 34 | current documentation and create new content, the site will look close to the 35 | following (see also the [content 36 | guidelines](https://tekton.dev/docs/contribute/doc-con-content/) to learn what 37 | to expect from each type of document): 38 | 39 | - **Installation** (*tutorials*) - Basic installation steps for several 40 | components, to be used as a prerequisite for getting started. Link to the 41 | installation readmes for further information about setup. 42 | 43 | - Pipelines 44 | - Triggers 45 | - CLI 46 | - Operator 47 | 48 | - **Getting Started** (*tutorials*) - Guides for newcomers. Mostly "Hello World" 49 | tutorials for every component. 50 | 51 | - Getting started with Tasks 52 | - Getting started with Pipelines 53 | - Getting started with Triggers 54 | - Getting started with Tekton CLI 55 | 56 | - **Concepts** (*explanations*) - Details about how things work. Rationale 57 | behind implementation decisions and anything else worth explaining. 58 | 59 | - Tekton Overview 60 | - Pipelines 61 | - Triggers 62 | 63 | - **How-to guides** (*how-to*) - Real-life examples. 64 | 65 | - Build and deploy a container with Tekton. 66 | - Setup Tekton Triggers with GitHub 67 | - Pushing container containers images to a Registry. 68 | - Using (cloud provider) storage with Tekton. 69 | - Cloning private repositories. 70 | - (New ideas and contributions are welcome) 71 | 72 | - **Reference** (*reference*) - Detailed documentation about every component. 73 | Mostly the current documents. 74 | 75 | - Pipelines 76 | - Triggers 77 | - CLI 78 | - Operator 79 | - Dashboard 80 | - Result 81 | - Chains 82 | - API docs (organize APIs for every project) 83 | 84 | - **Contribute to documentation** (*how-to*) 85 | 86 | - Run the site locally 87 | - Content guidelines 88 | - Formatting conventions 89 | - Tips and tricks for good writing 90 | 91 | 92 | ## Announcements 93 | 94 | We're working to add support for announcements using the blog feature of the 95 | Docsy template. A blog post will be published for each release of a Tekton 96 | component describing the new features, changes, and bug fixes in that release. 97 | See [issue 218](https://github.com/tektoncd/website/issues/218). 98 | 99 | ## Community page 100 | 101 | Create a "Community" page using the community page feature of the Docsy 102 | template. The page will display content from the 103 | [tektoncd/community](https://github.com/tektoncd/community) repo. See [issue 104 | 217](https://github.com/tektoncd/website/issues/217). 105 | 106 | ## Versioned URLs for the /docs folder 107 | 108 | Right now, the website provides an unversioned URL to current release docs in 109 | the /docs folder and versioned URLs to previous release docs in the /vault 110 | folder. However, any links to docs for a given release pointing to the /docs 111 | folder become irrelevant as soon as a new release is out. To remedy this, we 112 | want to implement versioned URLs for the /docs folder as well. 113 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | 3.8 2 | -------------------------------------------------------------------------------- /static/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /static/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/favicon.ico -------------------------------------------------------------------------------- /static/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /static/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/favicons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/favicons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#333333", 17 | "background_color": "#333333", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /static/images/mental_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/images/mental_model.png -------------------------------------------------------------------------------- /static/images/tekton-horizontal-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/images/tekton-horizontal-color.png -------------------------------------------------------------------------------- /static/partner-logos/cdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/partner-logos/cdf.png -------------------------------------------------------------------------------- /static/partner-logos/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/partner-logos/google.png -------------------------------------------------------------------------------- /static/partner-logos/tekton-friends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/static/partner-logos/tekton-friends.png -------------------------------------------------------------------------------- /sync/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7 2 | 3 | WORKDIR /app 4 | # Only copy specific values instead of the entire directory. 5 | # We're primarily trying to avoid pulling in config/, since it's confusing that 6 | # it will not be used. 7 | COPY sync.py sync.py 8 | COPY requirements.txt requirements.txt 9 | 10 | RUN pip install -r requirements.txt 11 | 12 | ENTRYPOINT [ "python3", "sync.py" ] 13 | -------------------------------------------------------------------------------- /sync/README.md: -------------------------------------------------------------------------------- 1 | # Sync and Version 2 | 3 | This directory includes scripts to manage multiple versions of 4 | documentation from the different Tekton projects. 5 | The `sync` script pulls content from a project, the `versions` 6 | script adds a new version to the `sync` config. 7 | 8 | ## `sync` 9 | 10 | This `sync` script allows synchronizing contents from specified Tekton 11 | repositories to this repository. 12 | 13 | To run this script locally, set up a Python 3 environment and execute 14 | the script: 15 | 16 | ```bash 17 | python3 -m venv .venv 18 | source .venv/bin/activate 19 | pip3 install -r requirements.txt 20 | ./sync/sync.py 21 | ``` 22 | 23 | **Note:** Follow [these steps](../DEVELOPMENT.md) to run the entire website locally. 24 | 25 | ### Usage of Sync 26 | 27 | ```bash 28 | USAGE: sync.py [flags] 29 | flags: 30 | 31 | sync.py: 32 | -c,--config: Config directory 33 | (default: 'config') 34 | 35 | Try --helpfull to get a list of all flags. 36 | ``` 37 | 38 | ### Configuring Directories 39 | 40 | The config directory should include the configuration for syncing/curating contents from 41 | specific Tekton repositories. 42 | 43 | See `pipelines.yaml` and `triggers.yaml` for more instructions. These two 44 | YAML files control the synchronization/curation from the `tektoncd/pipeline` 45 | and `tektoncd/triggers` repositories respectively. 46 | 47 | The YAML files here are used by the scripts in `../sync`. 48 | 49 | The yaml sync file requires the following schema 50 | 51 | ```yaml 52 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 53 | # contents of various versions from its source of truth (usually a GitHub 54 | # repository of a Tekton component, such as tektoncd/pipelines) to 55 | # content/ (for the lastest version) and vault/ (for earlier versions). 56 | 57 | # The name of the component. 58 | # sync.py will use this value to build directories in content/ and vault/. This is used to for the list on the redenred web website. 59 | component: Foobar 60 | # The GitHub repository where documentation resides. 61 | repository: https://github.com/tektoncd/foobar 62 | # The link to the GitHub tag page. 63 | archive: https://github.com/tektoncd/foobar/tags 64 | # The tags (versions) of contents to sync. 65 | # Note that sync.py and related script reads tags in the order specified in 66 | # the following list; the first entry in tags will automatically become the 67 | # latest version of contents. 68 | # To add a new version, append to the list as below 69 | #- name: v0.8.2 70 | # displayName: v0.8.x 71 | # files: 72 | # - myfiles.md: myfiles.md 73 | tags: 74 | # The name of a tag or branch in the GitHub repository. 75 | - name: master 76 | # The name to display on tekton.dev. 77 | # sync.py will use this value in the version switcher and other places. 78 | displayName: master 79 | # Dict of folders to sync 80 | files: 81 | foo.md : bar.md 82 | ``` 83 | 84 | ### Mental Model 85 | 86 | This is a quick diagram that will help you develop a mental model on how the sync works. 87 | 88 | ![logical flow of the sync program](../static/images/mental_model.png) 89 | 90 | ## Running with Docker 91 | 92 | To build the docker file 93 | 94 | **Note: If you trying running the container without supplying a config directory it will fail. Only copy specific values instead of the entire directory. We're primarily trying to avoid pulling in config/, since it's confusing thatit will not be used.** 95 | 96 | ```bash 97 | # You must cd into the correct directory to build the image 98 | docker build -t tekton/web sync/. 99 | ``` 100 | 101 | ## `versions` 102 | 103 | The `versions` script can be used to add a new version or remove an unwanted 104 | one from the `sync` configurations. 105 | It was designed to be integrated in the release process of Tekton projects. 106 | 107 | To run this script locally, set up a Python 3 environment and execute 108 | the script: 109 | 110 | ```bash 111 | python3 -m venv .venv 112 | source .venv/bin/activate 113 | pip3 install -r requirements.txt 114 | ./sync/versions.py add --project 115 | ``` 116 | 117 | **Note:** Follow [these steps](../DEVELOPMENT.md) to run the entire website locally. 118 | 119 | ## Usage of Versions 120 | 121 | The script provides online help via the `--help` flag. 122 | Use `[command] --help` for help on the specific command (`add` or `rm`). 123 | 124 | ```bash 125 | $ ./sync/versions.py 126 | Usage: versions.py [OPTIONS] COMMAND [ARGS]... 127 | 128 | Options: 129 | --help Show this message and exit. 130 | 131 | Commands: 132 | add add a new version in the config for the specified project 133 | rm remove a version from the config for the specified project 134 | ``` 135 | 136 | ## Examples 137 | 138 | Adding a new version to the pipeline project: 139 | 140 | ```bash 141 | ./sync/versions.py add v0.18.0 --project pipeline 142 | ``` 143 | 144 | Adding a new minor to the triggers project, and remove the old one: 145 | 146 | ```bash 147 | ./sync/versions.py add v0.9.1 --project triggers 148 | ./sync/versions.py rm v0.9.0 --project triggers 149 | ``` 150 | -------------------------------------------------------------------------------- /sync/config/README.md: -------------------------------------------------------------------------------- 1 | # Website sync configuration 2 | 3 | This directory includes the configuration for syncing/curating contents from 4 | specific Tekton repositories to the Tekton website. 5 | 6 | The configuration is structure as follows: 7 | 8 | ```yaml 9 | # The name of the component. 10 | # sync.py will use this value to build directories in content/ and vault/. 11 | component: 12 | # The GitHub repository where documentation resides. 13 | repository: https://github.com/tektoncd/ 14 | # The directory in the GitHub repository where contents reside. 15 | archive: https://github.com/tektoncd//tags 16 | # The tags (versions) of contents to sync. 17 | # Note that sync.py and related script reads tags in the order specified in 18 | # the following list; the first entry in tags will automatically become the 19 | # latest version of contents. 20 | # To add a new version, append to the list as below 21 | tags: 22 | - name: vX.Y.Z # The first tag in the least is considered latest 23 | displayName: vX.Y.Z 24 | folders: 25 | docs: 26 | target: '' # optional, default value '' 27 | index: README.md # optional, if _index.md exists 28 | include: ['*.md'] # optional, default value ['*'] 29 | exclude: ['not_in.md'] # optional, default value [] 30 | header: # optional, no header added if not set 31 | See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 32 | other: 33 | target: 'other' # optional, default value '' 34 | index: README.md # optional, if _index.md exists 35 | include: ['*.md'] # optional, default value ['*'] 36 | exclude: ['not_in.md'] # optional, default value [] 37 | header: # optional, no header added if not set 38 | See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 39 | - name: vX.Z.Z # The first tag in the least is considered latest 40 | displayName: vX.Z.Z 41 | folders: 42 | docs: 43 | target: '' # optional, default value '' 44 | index: README.md # optional, if _index.md exists 45 | include: ['*.md'] # optional, default value ['*'] 46 | exclude: ['not_in.md'] # optional, default value [] 47 | header: # optional, no header added if not set 48 | See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 49 | ``` 50 | 51 | See `pipelines.yaml` for more inline instructions. 52 | These two YAML files control the synchronization/curation from the `tektoncd/pipeline` 53 | and `tektoncd/triggers` repositories respectively. 54 | 55 | The YAML files here are used by the scripts in `../sync`. 56 | 57 | ## Subdirectory configuration 58 | 59 | Each doc folder should have its own `folders` config. For example, to configure 60 | all Markdown files in a repo with the following folder structure: 61 | 62 | ```text 63 | docs 64 | ├── subdir 65 | │ └── README.md 66 | └── README.md 67 | ``` 68 | 69 | The `folders` config should look like: 70 | 71 | ```yaml 72 | folders: 73 | docs: 74 | index: README.md 75 | include: ['*.md'] 76 | docs/subdir: 77 | target: subdir 78 | index: README.md 79 | include: ['*.md'] 80 | ``` -------------------------------------------------------------------------------- /sync/config/chains.yaml: -------------------------------------------------------------------------------- 1 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 2 | # contents of various versions from its source of truth (usually a GitHub 3 | # repository of a Tekton component, such as tektoncd/pipelines) to 4 | # content/ (for the lastest version) and vault/ (for earlier versions). 5 | 6 | # The name of the component. 7 | # sync.py will use this value to build directories in content/ and vault/. 8 | component: Chains 9 | # The GitHub repository where documentation resides. 10 | repository: https://github.com/tektoncd/chains 11 | # The link to the GitHub tag page. 12 | archive: https://github.com/tektoncd/chains/tags 13 | # The tags (versions) of contents to sync. 14 | # Note that sync.py and related script reads tags in the order specified in 15 | # the following list; the first entry in tags will automatically become the 16 | # latest version of contents. 17 | # To add a new version, append to the list as below 18 | # - name: vX.Y.Z 19 | # displayName: vX.Y.Z 20 | # folders: 21 | # docs: 22 | # target: '' # optional, default value '' 23 | # index: README.md # optional, if _index.md exists 24 | # include: ['*.md'] # optional, default value ['*'] 25 | # exclude: ['not_in.md'] # optional, default value [] 26 | # header: # optional, no header added if not set 27 | # See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 28 | tags: 29 | - name: main 30 | displayName: main 31 | # Dict of folders to sync 32 | folders: 33 | ".": 34 | index: README.md 35 | include: 36 | - README.md 37 | - tekton_chains-color.png 38 | docs: 39 | include: ['*.md'] 40 | docs/tutorials: 41 | include: ['*.md'] -------------------------------------------------------------------------------- /sync/config/dashboard.yaml: -------------------------------------------------------------------------------- 1 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 2 | # contents of various versions from its source of truth (usually a GitHub 3 | # repository of a Tekton component, such as tektoncd/pipelines) to 4 | # content/ (for the lastest version) and vault/ (for earlier versions). 5 | 6 | # The name of the component. 7 | # sync.py will use this value to build directories in content/ and vault/. 8 | component: Dashboard 9 | # The GitHub repository where documentation resides. 10 | repository: https://github.com/tektoncd/dashboard 11 | # The link to the GitHub tag page. 12 | archive: https://github.com/tektoncd/dashboard/tags 13 | # The tags (versions) of contents to sync. 14 | # Note that sync.py and related script reads tags in the order specified in 15 | # the following list; the first entry in tags will automatically become the 16 | # latest version of contents. 17 | # To add a new version, append to the list as below 18 | # - name: vX.Y.Z 19 | # displayName: vX.Y.Z 20 | # folders: 21 | # docs: 22 | # target: '' # optional, default value '' 23 | # index: README.md # optional, if _index.md exists 24 | # include: ['*.md'] # optional, default value ['*'] 25 | # exclude: ['not_in.md'] # optional, default value [] 26 | # header: # optional, no header added if not set 27 | # See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 28 | tags: 29 | - name: release-v0.57.x-lts 30 | displayName: v0.57.x-LTS 31 | folders: 32 | docs: 33 | index: README.md 34 | include: ['*.jpg', '*.md', '*.svg'] 35 | - name: release-v0.54.x-lts 36 | displayName: v0.54.x-LTS 37 | folders: 38 | docs: 39 | index: README.md 40 | include: ['*.jpg', '*.md', '*.svg'] 41 | - name: release-v0.52.x-lts 42 | displayName: v0.52.x-LTS 43 | folders: 44 | docs: 45 | index: README.md 46 | include: ['*.jpg', '*.md', '*.svg'] 47 | - name: release-v0.49.x-lts 48 | displayName: v0.49.x-LTS 49 | folders: 50 | docs: 51 | index: README.md 52 | include: ['*.jpg', '*.md', '*.svg'] 53 | - name: main 54 | displayName: main 55 | folders: 56 | docs: 57 | index: README.md 58 | include: ['*.jpg', '*.md', '*.svg'] 59 | -------------------------------------------------------------------------------- /sync/config/operator.yaml: -------------------------------------------------------------------------------- 1 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 2 | # contents of various versions from its source of truth (usually a GitHub 3 | # repository of a Tekton component, such as tektoncd/pipelines) to 4 | # content/ (for the lastest version) and vault/ (for earlier versions). 5 | 6 | # The name of the component. 7 | # sync.py will use this value to build directories in content/ and vault/. 8 | component: Operator 9 | # The GitHub repository where documentation resides. 10 | repository: https://github.com/tektoncd/operator 11 | # The link to the GitHub tag page. 12 | archive: https://github.com/tektoncd/operator/tags 13 | # The tags (versions) of contents to sync. 14 | # Note that sync.py and related script reads tags in the order specified in 15 | # the following list; the first entry in tags will automatically become the 16 | # latest version of contents. 17 | # To add a new version, append to the list as below 18 | # - name: vX.Y.Z 19 | # displayName: vX.Y.Z 20 | # # supportEnds is not used anywhere. 21 | # # supportEnds can be used to remove(manually) outdated versions from docs 22 | # supportEnds: YYYY-MM-DD 23 | # folders: 24 | # docs: 25 | # target: '' # optional, default value '' 26 | # index: README.md # optional, if _index.md exists 27 | # include: ['*.md'] # optional, default value ['*'] 28 | # exclude: ['not_in.md'] # optional, default value [] 29 | # header: # optional, no header added if not set 30 | # See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 31 | tags: 32 | - name: release-v0.75.x 33 | displayName: v0.75.x-LTS 34 | supportEnds: "2026-02-18" # YYYY-MM-DD 35 | # Dict of folders to sync 36 | folders: 37 | docs: 38 | index: README.md 39 | include: ['*.md'] 40 | exclude: 41 | - TektonOperator.md 42 | - name: release-v0.74.x 43 | displayName: v0.74.x-LTS 44 | supportEnds: "2025-11-22" # YYYY-MM-DD 45 | # Dict of folders to sync 46 | folders: 47 | docs: 48 | index: README.md 49 | include: ['*.md'] 50 | exclude: 51 | - TektonOperator.md 52 | - name: release-v0.73.x 53 | displayName: v0.73.x-LTS 54 | supportEnds: "2025-10-01" # YYYY-MM-DD 55 | # Dict of folders to sync 56 | folders: 57 | docs: 58 | index: README.md 59 | include: ['*.md'] 60 | exclude: 61 | - TektonOperator.md 62 | - name: release-v0.71.x 63 | displayName: v0.71.x-LTS 64 | supportEnds: "2025-06-06" # YYYY-MM-DD 65 | # Dict of folders to sync 66 | folders: 67 | docs: 68 | index: README.md 69 | include: ['*.md'] 70 | exclude: 71 | - TektonOperator.md 72 | - name: main 73 | # The name to display on tekton.dev. 74 | # helper.py will use this value in the version switcher and other places. 75 | displayName: main 76 | # Dict of folders to sync 77 | folders: 78 | docs: 79 | index: README.md 80 | include: ['*.md'] 81 | exclude: 82 | - TektonOperator.md 83 | -------------------------------------------------------------------------------- /sync/config/pipelines.yaml: -------------------------------------------------------------------------------- 1 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 2 | # contents of various versions from its source of truth (usually a GitHub 3 | # repository of a Tekton component, such as tektoncd/pipelines) to 4 | # content/ (for the lastest version) and vault/ (for earlier versions). 5 | 6 | # The name of the component. 7 | # sync.py will use this value to build directories in content/ and vault/. 8 | component: Pipelines 9 | # The GitHub repository where documentation resides. 10 | repository: https://github.com/tektoncd/pipeline 11 | # The link to the GitHub tag page. 12 | archive: https://github.com/tektoncd/pipeline/tags 13 | # The tags (versions) of contents to sync. 14 | # Note that sync.py and related script reads tags in the order specified in 15 | # the following list; the first entry in tags will automatically become the 16 | # latest version of contents. 17 | # To add a new version, append to the list as below 18 | # - name: vX.Y.Z 19 | # displayName: vX.Y.Z 20 | # folders: 21 | # docs: 22 | # target: '' # optional, default value '' 23 | # index: README.md # optional, if _index.md exists 24 | # include: ['*.md'] # optional, default value ['*'] 25 | # exclude: ['not_in.md'] # optional, default value [] 26 | # header: # optional, no header added if not set 27 | # See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 28 | tags: 29 | - name: release-v0.63.x 30 | displayName: v0.63.x 31 | # Dict of folders to sync 32 | folders: 33 | docs: 34 | index: README.md 35 | include: ['*.md'] 36 | exclude: 37 | - api-spec.md 38 | - tutorial.md 39 | - name: release-v0.62.x 40 | displayName: v0.62.x-LTS 41 | # Dict of folders to sync 42 | folders: 43 | docs: 44 | index: README.md 45 | include: ['*.md'] 46 | exclude: 47 | - api-spec.md 48 | - tutorial.md 49 | - name: release-v0.59.x 50 | displayName: v0.59.x-LTS 51 | # Dict of folders to sync 52 | folders: 53 | docs: 54 | index: README.md 55 | include: ['*.md'] 56 | exclude: 57 | - api-spec.md 58 | - tutorial.md 59 | - name: release-v0.56.x 60 | displayName: v0.56.x-LTS 61 | folders: 62 | docs: 63 | index: README.md 64 | include: ['*.md'] 65 | exclude: 66 | - api-spec.md 67 | - tutorial.md 68 | - name: main 69 | # The name to display on tekton.dev. 70 | # sync.py will use this value in the version switcher and other places. 71 | displayName: main 72 | # Dict of folders to sync 73 | folders: 74 | docs: 75 | index: README.md 76 | include: ['*.md'] 77 | exclude: 78 | - api-spec.md 79 | - tutorial.md 80 | -------------------------------------------------------------------------------- /sync/config/results.yaml: -------------------------------------------------------------------------------- 1 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 2 | # contents of various versions from its source of truth (usually a GitHub 3 | # repository of a Tekton component, such as tektoncd/pipelines) to 4 | # content/ (for the lastest version) and vault/ (for earlier versions). 5 | 6 | # The name of the component. 7 | # sync.py will use this value to build directories in content/ and vault/. 8 | component: Results 9 | # The GitHub repository where documentation resides. 10 | repository: https://github.com/tektoncd/results 11 | # The link to the GitHub tag page. 12 | archive: https://github.com/tektoncd/results/tags 13 | # The tags (versions) of contents to sync. 14 | # Note that sync.py and related script reads tags in the order specified in 15 | # the following list; the first entry in tags will automatically become the 16 | # latest version of contents. 17 | # To add a new version, append to the list as below 18 | # - name: vX.Y.Z 19 | # displayName: vX.Y.Z 20 | # folders: 21 | # docs: 22 | # target: '/' # optional, default value '/' 23 | # index: README.md # optional, if _index.md exists 24 | # include: ['*.md'] # optional, default value ['*'] 25 | # exclude: ['not_in.md'] # optional, default value [] 26 | # header: # optional, no header added if not set 27 | # See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 28 | tags: 29 | - name: main 30 | # The name to display on tekton.dev. 31 | # sync.py will use this value in the version switcher and other places. 32 | displayName: main 33 | # Dict of folders to sync 34 | folders: 35 | docs: 36 | index: README.md 37 | include: ['README.md', '*.png'] 38 | docs/api: 39 | target: api 40 | index: README.md 41 | include: ['README.md'] 42 | docs/watcher: 43 | target: watcher 44 | index: README.md 45 | include: ['README.md'] -------------------------------------------------------------------------------- /sync/config/triggers.yaml: -------------------------------------------------------------------------------- 1 | # Each YAML file under sync/ configures how sync/sync.py synchronizes 2 | # contents of various versions from its source of truth (usually a GitHub 3 | # repository of a Tekton component, such as tektoncd/pipelines) to 4 | # content/ (for the lastest version) and vault/ (for earlier versions). 5 | 6 | # The name of the component. 7 | # sync.py will use this value to build directories in content/ and vault/. 8 | component: Triggers 9 | # The GitHub repository where documentation resides. 10 | repository: https://github.com/tektoncd/triggers 11 | # The link to the GitHub tag page. 12 | archive: https://github.com/tektoncd/triggers/tags 13 | # The tags (versions) of contents to sync. 14 | # Note that sync.py and related script reads tags in the order specified in 15 | # the following list; the first entry in tags will automatically become the 16 | # latest version of contents. 17 | # To add a new version, append to the list as below 18 | # - name: vX.Y.Z 19 | # displayName: vX.Y.Z 20 | # folders: 21 | # docs: 22 | # target: '' # optional, default value '' 23 | # index: README.md # optional, if _index.md exists 24 | # include: ['*.md'] # optional, default value ['*'] 25 | # exclude: ['not_in.md'] # optional, default value [] 26 | # header: # optional, no header added if not set 27 | # See https://www.docsy.dev/docs/adding-content/navigation/#section-menu 28 | tags: 29 | - name: release-v0.27.x 30 | displayName: v0.27.x-LTS 31 | # Dict of folders to sync 32 | folders: 33 | docs: 34 | index: README.md 35 | include: ['*.md'] 36 | docs/getting-started: 37 | target: getting-started 38 | include: 39 | - create-ingress.yaml 40 | - name: release-v0.26.x 41 | displayName: v0.26.x-LTS 42 | # Dict of folders to sync 43 | folders: 44 | docs: 45 | index: README.md 46 | include: ['*.md'] 47 | docs/getting-started: 48 | target: getting-started 49 | include: 50 | - create-ingress.yaml 51 | - name: release-v0.25.x 52 | displayName: v0.25.x-LTS 53 | # Dict of folders to sync 54 | folders: 55 | docs: 56 | index: README.md 57 | include: ['*.md'] 58 | docs/getting-started: 59 | target: getting-started 60 | include: 61 | - create-ingress.yaml 62 | - name: release-v0.24.x 63 | displayName: v0.24.x-LTS 64 | # Dict of folders to sync 65 | folders: 66 | docs: 67 | index: README.md 68 | include: ['*.md'] 69 | docs/getting-started: 70 | target: getting-started 71 | include: 72 | - create-ingress.yaml 73 | - name: main 74 | # The name to display on tekton.dev. 75 | # helper.py will use this value in the version switcher and other places. 76 | displayName: main 77 | # Dict of folders to sync 78 | folders: 79 | docs: 80 | index: README.md 81 | include: ['*.md'] 82 | exclude: ['triggers-api.md'] 83 | docs/getting-started: 84 | target: getting-started 85 | include: 86 | - create-ingress.yaml 87 | - create-webhook.yaml 88 | -------------------------------------------------------------------------------- /sync/requirements.txt: -------------------------------------------------------------------------------- 1 | wget==3.2 2 | wheel>=0.36.0 3 | ruamel.yaml==0.16.12 4 | google-cloud-storage==1.23.0 5 | Jinja2==3.1.6 6 | google-auth==1.14.0 7 | urlopen==1.0.0 8 | markdown==3.1.1 9 | coverage==5.3 10 | flake8==3.8.3 11 | click>=7.1.2 12 | gitpython>=3.1.11 13 | gitdb-speedups>=0.1.0 14 | beautifulsoup4==4.9.3 15 | -------------------------------------------------------------------------------- /sync/runtime.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/runtime.txt -------------------------------------------------------------------------------- /sync/test-content/content.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/content.md -------------------------------------------------------------------------------- /sync/test-content/nested/another.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/nested/another.md -------------------------------------------------------------------------------- /sync/test-content/nested/content.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/nested/content.md -------------------------------------------------------------------------------- /sync/test-content/nested/example.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/nested/example.yaml -------------------------------------------------------------------------------- /sync/test-content/tekton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/tekton.png -------------------------------------------------------------------------------- /sync/test-content/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/test.txt -------------------------------------------------------------------------------- /sync/test-content/unwanted.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tektoncd/website/415c01674c37be598e4ab9fd25fb52375b9926ef/sync/test-content/unwanted.txt -------------------------------------------------------------------------------- /sync/test_versions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright 2020 The Tekton Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import copy 18 | import os 19 | import tempfile 20 | import unittest 21 | 22 | from click.testing import CliRunner 23 | from ruamel.yaml import YAML 24 | 25 | import versions 26 | 27 | test_config_string = """ 28 | # This is a test config 29 | component: test 30 | repository: https://foo.bar/org/test 31 | archive: https://foo.bar/tags 32 | tags: 33 | - name: foo 34 | displayName: foo 35 | folders: 36 | docs: 37 | include: ['*'] 38 | - name: bar 39 | displayName: bar 40 | folders: 41 | docs: 42 | include: ['*'] 43 | """ 44 | 45 | test_config2_string = """ 46 | # This is a test config 47 | component: test2 48 | repository: https://foo.bar/org/test2 49 | archive: https://foo.bar/tags2 50 | tags: 51 | - name: foo 52 | displayName: foo 53 | folders: 54 | docs: 55 | include: ['*'] 56 | """ 57 | 58 | test_config_string_new = """ 59 | # This is a test config 60 | component: test 61 | repository: https://foo.bar/org/test 62 | archive: https://foo.bar/tags 63 | tags: 64 | - name: new 65 | displayName: new 66 | folders: 67 | docs: 68 | include: ['*'] 69 | - name: foo 70 | displayName: foo 71 | folders: 72 | docs: 73 | include: ['*'] 74 | - name: bar 75 | displayName: bar 76 | folders: 77 | docs: 78 | include: ['*'] 79 | """ 80 | 81 | yaml = YAML() 82 | test_config = { 83 | 'filename': 'test.yaml', 84 | 'content': yaml.load(test_config_string) 85 | } 86 | test_config_new = { 87 | 'filename': 'test.yaml', 88 | 'content': yaml.load(test_config_string_new) 89 | } 90 | test_config2 = { 91 | 'filename': 'test.yaml', 92 | 'content': yaml.load(test_config2_string) 93 | } 94 | test_configs = [test_config, test_config2] 95 | 96 | 97 | class TestVersions(unittest.TestCase): 98 | 99 | def test_select_config(self): 100 | expected = test_config 101 | actual = versions.select_config(test_configs, 'test') 102 | self.assertEqual(actual, expected) 103 | 104 | def test_select_config_missing(self): 105 | actual = versions.select_config(test_configs, 'missing') 106 | self.assertIsNone(actual) 107 | 108 | def test_add_version(self): 109 | self.maxDiff = None 110 | expected = test_config_new 111 | actual = versions.add_version(copy.deepcopy(test_config), 'new') 112 | self.assertEqual(actual, expected) 113 | 114 | def test_rm_version(self): 115 | self.maxDiff = None 116 | expected = test_config 117 | actual = versions.rm_version(copy.deepcopy(test_config_new), 'new') 118 | self.assertEqual(actual, expected) 119 | 120 | def test_rm_version_missing(self): 121 | version = 'missing' 122 | self.assertRaisesRegex( 123 | versions.VersionNotFoundError, f'Version {version} not found in', 124 | versions.rm_version, test_config, version) 125 | 126 | def test_add_remove(self): 127 | self.maxDiff = None 128 | config_filename = 'test.yaml' 129 | expected_after_add = test_config_new['content'] 130 | expected_after_rm = test_config['content'] 131 | runner = CliRunner() 132 | 133 | # write to config file 134 | with tempfile.TemporaryDirectory() as tmpdirname: 135 | with open(os.path.join(tmpdirname, config_filename), 'w+') as config_file: 136 | config_file.write(test_config_string) 137 | 138 | # Test adding a version 139 | runner.invoke(versions.versions, ['add', 'new', 140 | '--config-folder', tmpdirname, 141 | '--project', 'test']) 142 | # read the result 143 | with open(os.path.join(tmpdirname, config_filename), 'r') as result: 144 | actual = yaml.load(result.read()) 145 | 146 | self.assertEqual(actual, expected_after_add) 147 | 148 | # Test removing a version 149 | runner.invoke(versions.versions, ['rm', 'new', 150 | '--config-folder', tmpdirname, 151 | '--project', 'test']) 152 | # read the result 153 | with open(os.path.join(tmpdirname, config_filename), 'r') as result: 154 | actual = yaml.load(result.read()) 155 | 156 | self.assertEqual(actual, expected_after_rm) 157 | -------------------------------------------------------------------------------- /sync/versions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright 2020 The Tekton Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import click 18 | import copy 19 | import logging 20 | import os 21 | import sync 22 | import sys 23 | 24 | 25 | DEFAULT_CONFIG_FOLDER = os.path.join(os.path.dirname( 26 | os.path.abspath(__file__)), 'config') 27 | 28 | 29 | class VersionNotFoundError(Exception): 30 | pass 31 | 32 | 33 | @click.group() 34 | def versions(): 35 | pass 36 | 37 | 38 | @versions.command() 39 | @click.option('--config-folder', default=DEFAULT_CONFIG_FOLDER, 40 | help='the folder that contains the config files') 41 | @click.option('--project', required=True, 42 | help='the tekton project name') 43 | @click.argument('version') 44 | def add(config_folder, project, version): 45 | """ add a new version in the config for the specified project """ 46 | command(add_version, config_folder, project, version) 47 | 48 | 49 | @versions.command() 50 | @click.option('--config-folder', default=DEFAULT_CONFIG_FOLDER, 51 | help='the folder that contains the config files') 52 | @click.option('--project', required=True, 53 | help='the tekton project name') 54 | @click.argument('version') 55 | def rm(config_folder, project, version): 56 | """ remove a version from the config for the specified project """ 57 | command(rm_version, config_folder, project, version) 58 | 59 | 60 | def command(cmd_fn, config_folder, project, version): 61 | configs = load_config(config_folder) 62 | config = select_config(configs, project) 63 | if not config: 64 | raise Exception(f'Cound not find a config for {project} in {configs}') 65 | try: 66 | cmd_fn(config, version) 67 | sync.save_config(configs) 68 | except VersionNotFoundError as e: 69 | logging.error(f'Could not update config for {project}: {e}') 70 | sys.exit(1) 71 | 72 | 73 | def select_config(configs, project): 74 | """ returns the first config that matches the project """ 75 | for c in configs: 76 | if c['content']['repository'].endswith(f'/{project}'): 77 | return c 78 | return None 79 | 80 | 81 | def add_version(config, version): 82 | tags = config['content']['tags'] 83 | new_tag = copy.deepcopy(tags[0]) 84 | new_tag['name'] = version 85 | new_tag['displayName'] = version 86 | config['content']['tags'] = [new_tag] 87 | config['content']['tags'].extend(tags) 88 | return config 89 | 90 | 91 | def rm_version(config, version): 92 | for idx, tag in enumerate(config['content']['tags']): 93 | logging.info(f'{idx}, {tag}') 94 | if version == tag['name']: 95 | del config['content']['tags'][idx] 96 | return config 97 | raise VersionNotFoundError(f'Version {version} not found in {config}') 98 | 99 | 100 | def load_config(config_folder): 101 | """ wrapper around sync.load_config that takes an input folder """ 102 | config_files = sync.get_files_in_path(config_folder, ".yaml") 103 | return sync.load_config(config_files) 104 | 105 | 106 | if __name__ == '__main__': 107 | versions() 108 | -------------------------------------------------------------------------------- /templates/README.md: -------------------------------------------------------------------------------- 1 | This directory includes the templates for dynamically generated pages, 2 | such as the documentation vault and the version switcher. 3 | 4 | At this moment the templates here are used to support the versioning of 5 | Tekton documentation, as the built-in system does not apply well to the 6 | structure of the Tekton project. The templates here are used by the scripts 7 | in `../sync`. 8 | -------------------------------------------------------------------------------- /templates/_index.md.template: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Tekton Documentation Vault" 3 | linkTitle: "Vault" 4 | cascade: 5 | - type: "docs" 6 | --- 7 | 8 | This section keeps the documentation of past versions of Tekton components. 9 | To see the latest documentation, [visit tekton.dev/docs](/docs). 10 | 11 | {% for component_version in component_versions %} 12 | ## {{ component_version['name'] }} 13 | 14 | {% for tag in component_version['tags'][1:] %} 15 | * [{{ component_version['name'] }} {{ tag['displayName'] }}](/vault/{{ component_version['name']|lower }}-{{ tag['displayName']|lower }}) 16 | {% endfor %} 17 | {% endfor %} 18 | -------------------------------------------------------------------------------- /templates/release-switcher.js.template: -------------------------------------------------------------------------------- 1 | if (typeof componentVersions === 'undefined') { 2 | const componentVersions = JSON.parse('{{ component_versions_json }}'); 3 | } 4 | 5 | const getComponentReleases = () => { 6 | const pathName = window.location.pathname; 7 | const componentVersionStr = pathName.split("/")[2]; 8 | const componentRawName = componentVersionStr.split("-")[0]; 9 | let latestVersion; 10 | let nightlyVersion; 11 | let latestLTS; 12 | let componentName; 13 | 14 | componentVersions.forEach((componentVersion) => { 15 | if (componentVersion.name.toLowerCase() === componentRawName) { 16 | componentName = componentVersion.name; 17 | const versions = componentVersion.tags; 18 | latestVersion = versions[0].displayName; 19 | if (versions.length > 1) { 20 | nightlyVersion = versions[versions.length - 1].displayName; 21 | } 22 | versions.forEach((version) => { 23 | if (version.displayName.toLowerCase().includes('lts') && !latestLTS) { 24 | latestLTS = version.displayName; 25 | } 26 | }); 27 | } 28 | }); 29 | return { 30 | name: componentName, 31 | latest: latestVersion, 32 | nightly: nightlyVersion, 33 | lts: latestLTS, 34 | }; 35 | }; 36 | 37 | const findReleases = () => { 38 | const componentReleases = getComponentReleases(); 39 | 40 | const releasesNode = document.getElementById('release-switcher'); 41 | const latestNode = document.getElementById('latest-release-li'); 42 | const nightlyLiNode = document.getElementById('nightly-release-li'); 43 | const nightlyNode = document.getElementById('nightly-release-link'); 44 | const ltsLiNode = document.getElementById('lts-release-li'); 45 | const ltsNode = document.getElementById('lts-release-link'); 46 | 47 | if (componentReleases.name) { 48 | let nightlyURL = `/vault/${componentReleases.name}-${componentReleases.nightly}`; 49 | let ltsURL = `/vault/${componentReleases.name}-${componentReleases.lts}`; 50 | releasesNode.style.visibility = 'visible'; 51 | latestNode.innerText = `Documentation for ${componentReleases.name}-${componentReleases.latest}`; 52 | if (componentReleases.nightly) { 53 | nightlyLiNode.style.visibility = 'visible'; 54 | nightlyNode.setAttribute('href', nightlyURL.toLowerCase()); 55 | } 56 | if (componentReleases.lts) { 57 | ltsLiNode.style.visibility = 'visible'; 58 | ltsURL = (componentReleases.lts == componentReleases.latest) ? '#' : ltsURL.toLowerCase(); 59 | ltsNode.setAttribute('href', ltsURL); 60 | } 61 | } 62 | }; 63 | --------------------------------------------------------------------------------