{"id":318510,"date":"2021-02-24T09:01:25","date_gmt":"2021-02-24T09:01:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=318510"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=318510","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u0432 CI \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton (\u0432\u043d\u0443\u0442\u0440\u0438 Kubernetes). \u0427\u0430\u0441\u0442\u044c 2\/2"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u0432 CI \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton (\u0427\u0430\u0441\u0442\u044c 2\/2)<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 CI \u0441 <a href=\"https:\/\/tekton.dev\/\" rel=\"nofollow noopener noreferrer\">Tekton<\/a>. \u0412 <a href=\"https:\/\/habr.com\/ru\/post\/543366\/\">\u043f\u0435\u0440\u0432\u043e\u0439<\/a> \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Tekton \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 <a href=\"https:\/\/kind.sigs.k8s.io\/\" rel=\"nofollow noopener noreferrer\">kind<\/a> \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Go (<a href=\"https:\/\/github.com\/arthurk\/tekton-example\" rel=\"nofollow noopener noreferrer\">repo<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0431\u0440\u0430\u0437 Docker \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Go \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0435\u0433\u043e \u0432 <a href=\"https:\/\/hub.docker.com\/\" rel=\"nofollow noopener noreferrer\">DockerHub<\/a>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"dobavlenie-uchetnyh-dannyh-dockerhub\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 DockerHub<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 Docker \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/GoogleContainerTools\/kaniko\" rel=\"nofollow noopener noreferrer\">Kaniko<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b Docker \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Kubernetes, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0434\u0435\u043c\u043e\u043d\u0430 Docker.<\/p>\n<p>  <\/p>\n<p>Kaniko \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0435. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f DockerHub, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0437 \u0434\u043e\u043a\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0435\u0435\u0441\u0442\u0440.<\/p>\n<p>  <\/p>\n<p>\u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0440\u0435\u0442\u0435 Kubernetes. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/04-secret.yaml\" rel=\"nofollow noopener noreferrer\">secret.yaml<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 myusername \u0438 mypassword \u0441\u0432\u043e\u0438\u043c\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 DockerHub:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: v1 kind: Secret metadata:   name: basic-user-pass   annotations:     tekton.dev\/docker-0: https:\/\/index.docker.io\/v1\/ type: kubernetes.io\/basic-auth stringData:     username: myusername     password: mypassword<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e tekton.dev\/docker-0 \u0432 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 Tekton, \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u0440\u0435\u0435\u0441\u0442\u0440\u0443 Docker \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u044d\u0442\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c ServiceAccount, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0435\u043a\u0440\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/05-serviceaccount.yaml\" rel=\"nofollow noopener noreferrer\">serviceaccount.yaml<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: v1 kind: ServiceAccount metadata:   name: build-bot secrets:   - name: basic-user-pass<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u043e\u0431\u0430 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ kubectl apply -f secret.yaml secret\/basic-user-pass created  $ kubectl apply -f serviceaccount.yaml serviceaccount\/build-bot created<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 ServiceAccount (\u043d\u0430\u0437\u0432\u0430\u043d\u043d\u044b\u0439 <code>build-bot<\/code>) \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u0434\u0430\u0447 \u0438\u043b\u0438 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u0432 Tekton, \u0443\u043a\u0430\u0437\u0430\u0432 <code>serviceAccountName<\/code>. \u041c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"sozdanie-zadachi-dlya-sborki-i-otpravki-obraza-docker\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u0430 Docker<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0441\u043e\u0437\u0434\u0430\u0432 \u0437\u0430\u0434\u0430\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0437 Docker.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/06-task-build-push.yaml\" rel=\"nofollow noopener noreferrer\">task-build-push.yaml<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: tekton.dev\/v1beta1 kind: Task metadata:   name: build-and-push spec:   resources:     inputs:       - name: repo         type: git   steps:     - name: build-and-push       image: gcr.io\/kaniko-project\/executor:v1.3.0       env:         - name: DOCKER_CONFIG           value: \/tekton\/home\/.docker       command:         - \/kaniko\/executor         - --dockerfile=Dockerfile         - --context=\/workspace\/repo\/src         - --destination=arthurk\/tekton-test:latest<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435, \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 git \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u043c\u044f \u0432\u0445\u043e\u0434\u0430 \u2014 \u0440\u0435\u043f\u043e) \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u041a\u0430\u043d\u0438\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0435.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 DockerHub \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 arthurk \/ tekton-test \u0441\u0432\u043e\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0442\u0435\u0433\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>Tekton \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <a href=\"https:\/\/github.com\/tektoncd\/pipeline\/blob\/master\/docs\/pipelines.md#specifying-parameters\" rel=\"nofollow noopener noreferrer\">\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0443\u0440\u043e\u043a, \u044f \u0438\u0445 \u043d\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>DOCKER_CONFIG<\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b Kaniko \u043c\u043e\u0433 <a href=\"https:\/\/github.com\/tektoncd\/pipeline\/pull\/706\" rel=\"nofollow noopener noreferrer\">\u043d\u0430\u0439\u0442\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 Docker<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ kubectl apply -f task-build-push.yaml task.tekton.dev\/build-and-push created<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443: \u043b\u0438\u0431\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 TaskRun \u0438 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl, \u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton CLI (tkn).<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043e\u0431\u0430 \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"zapustite-zadachu-s-pomoschyu-kubectl\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl<\/h3>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c TaskRun, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/03-taskrun.yaml\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443<\/a>, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c ServiceAccount (<code>serviceAccountName<\/code>) \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/07-taskrun-build-push.yaml\" rel=\"nofollow noopener noreferrer\">taskrun-build-push.yaml<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: tekton.dev\/v1beta1 kind: TaskRun metadata:   name: build-and-push spec:   serviceAccountName: build-bot   taskRef:     name: build-and-push   resources:     inputs:       - name: repo         resourceRef:           name: arthurk-tekton-example<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0436\u0443\u0440\u043d\u0430\u043b \u043c\u043e\u0434\u0443\u043b\u044f, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0432 \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0438\u043c\u0435\u043d\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 <code>build-and-push<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ kubectl apply -f taskrun-build-push.yaml taskrun.tekton.dev\/build-and-push created  $ kubectl get pods | grep build-and-push build-and-push-pod-c698q   2\/2     Running     0          4s  $ kubectl logs --all-containers build-and-push-pod-c698q --follow {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588478267.3476844,&quot;caller&quot;:&quot;creds-init\/main.go:44&quot;, &quot;msg&quot;:&quot;Credentials initialized.&quot;} {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588478279.2681644,&quot;caller&quot;:&quot;git\/git.go:136&quot;,&quot;msg&quot;:&quot;Successfully cloned https:\/\/github.com\/arthurk\/tekton-example @ 301aeaa8f7fa6ec01218ba6c5ddf9095b24d5d98 (grafted, HEAD, origin\/master) in path \/workspace\/repo&quot;} {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588478279.3249557,&quot;caller&quot;:&quot;git\/git.go:177&quot;,&quot;msg&quot;:&quot;Successfully initialized and updated submodules in path \/workspace\/repo&quot;} INFO[0004] Resolved base name golang:1.14-alpine to golang:1.14-alpine INFO[0004] Retrieving image manifest golang:1.14-alpine INFO[0012] Built cross stage deps: map[] ... INFO[0048] Taking snapshot of full filesystem... INFO[0048] Resolving paths INFO[0050] CMD [&quot;app&quot;]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \/ \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0437 Docker:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ docker run arthurk\/tekton-test:latest hello world<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"zapustite-zadachu-s-pomoschyu-tekton-cli\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton CLI<\/h3>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton CLI \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 TaskRun \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ tkn task start build-and-push --inputresource repo=arthurk-tekton-example --serviceaccount build-bot --showlog Taskrun started: build-and-push-run-ctjvv Waiting for logs to be available... [git-source-arthurk-tekton-example-p9zxz] {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588479279.271127,&quot;caller&quot;:&quot;git\/git.go:136&quot;,&quot;msg&quot;:&quot;Successfully cloned https:\/\/github.com\/arthurk\/tekton-example @ 301aeaa8f7fa6ec01218ba6c5ddf9095b24d5d98 (grafted, HEAD, origin\/master) in path \/workspace\/repo&quot;} [git-source-arthurk-tekton-example-p9zxz] {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588479279.329212,&quot;caller&quot;:&quot;git\/git.go:177&quot;,&quot;msg&quot;:&quot;Successfully initialized and updated submodules in path \/workspace\/repo&quot;}  [build-and-push] INFO[0004] Resolved base name golang:1.14-alpine to golang:1.14-alpine [build-and-push] INFO[0008] Retrieving image manifest golang:1.14-alpine [build-and-push] INFO[0012] Built cross stage deps: map[] ... [build-and-push] INFO[0049] Taking snapshot of full filesystem... [build-and-push] INFO[0049] Resolving paths [build-and-push] INFO[0051] CMD [&quot;app&quot;]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0441 kubectl \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<p>  <\/p>\n<h3 id=\"sozdanie-konveyera\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0438 \u0417\u0430\u0434\u0430\u0447\u0438 (\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u0431\u043e\u0440\u043a\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430), \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043f\u0440\u043e\u0439\u0434\u0443\u0442, \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0431\u0440\u0430\u0437 Docker \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0435\u0433\u043e \u0432 DockerHub.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/08-pipeline.yaml\" rel=\"nofollow noopener noreferrer\">pipeline.yaml<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: tekton.dev\/v1beta1 kind: Pipeline metadata:   name: test-build-push spec:   resources:     - name: repo       type: git   tasks:     # Run application tests     - name: test       taskRef:         name: test       resources:         inputs:           - name: repo      # name of the Task input (see Task definition)             resource: repo  # name of the Pipeline resource      # Build docker image and push to registry     - name: build-and-push       taskRef:         name: build-and-push       runAfter:         - test       resources:         inputs:           - name: repo      # name of the Task input (see Task definition)             resource: repo  # name of the Pipeline resource<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u044d\u0442\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0443. \u0420\u0435\u0441\u0443\u0440\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0445\u043e\u0434\u043e\u043c \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u043c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0432\u043e\u0434: \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 git \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441 \u0440\u0435\u043f\u043e.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u043c\u0435\u0435\u0442 <code>taskRef<\/code> (\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443) \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ kubectl apply -f pipeline.yaml pipeline.tekton.dev\/test-build-push created<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a Task, \u0441\u043e\u0437\u0434\u0430\u0432 TaskRun, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Pipeline, \u0441\u043e\u0437\u0434\u0430\u0432 PipelineRun.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl \u0438\u043b\u0438 Tekton CLI. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043e\u0431\u0430 \u043f\u0443\u0442\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"zapustite-konveyer-s-pomoschyu-kubectl\">\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl<\/h3>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kubectl, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c PipelineRun. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <a href=\"https:\/\/github.com\/arthurk\/tekton-example\/blob\/master\/09-pipelinerun.yaml\" rel=\"nofollow noopener noreferrer\">pipelinerun.yaml<\/a> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: tekton.dev\/v1beta1 kind: PipelineRun metadata:   name: test-build-push-pr spec:   serviceAccountName: build-bot   pipelineRef:     name: test-build-push   resources:   - name: repo     resourceRef:       name: arthurk-tekton-example<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 Pod&#8217;\u044b \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c PiplelineRun \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ kubectl apply -f pipelinerun.yaml pipelinerun.tekton.dev\/test-build-push-pr created  $ kubectl get pods | grep test-build-push-pr test-build-push-pr-build-and-push-gh4f4-pod-nn7k7   0\/2     Completed   0          2m39s test-build-push-pr-test-d2tck-pod-zh5hn             0\/2     Completed   0          2m51s  $ kubectl logs test-build-push-pr-build-and-push-gh4f4-pod-nn7k7 --all-containers --follow INFO[0005] Resolved base name golang:1.14-alpine to golang:1.14-alpine INFO[0005] Retrieving image manifest golang:1.14-alpine ... INFO[0048] Taking snapshot of full filesystem... INFO[0048] Resolving paths INFO[0050] CMD [&quot;app&quot;]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Tekton CLI.<\/p>\n<p>  <\/p>\n<h3 id=\"zapusk-konveyera-s-pomoschyu-tekton-cli\">\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton CLI<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 CLI \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c PipelineRun, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438\u0437 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 Pipeline. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <code>--showlog<\/code>, \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u0437\u0430\u0434\u0430\u0447 (\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ tkn pipeline start test-build-push --resource repo=arthurk-tekton-example --serviceaccount build-bot --showlog  Pipelinerun started: test-build-push-run-9lmfj Waiting for logs to be available... [test : git-source-arthurk-tekton-example-k98k8] {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588483940.4913514,&quot;caller&quot;:&quot;git\/git.go:136&quot;,&quot;msg&quot;:&quot;Successfully cloned https:\/\/github.com\/arthurk\/tekton-example @ 301aeaa8f7fa6ec01218ba6c5ddf9095b24d5d98 (grafted, HEAD, origin\/master) in path \/workspace\/repo&quot;} [test : git-source-arthurk-tekton-example-k98k8] {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588483940.5485842,&quot;caller&quot;:&quot;git\/git.go:177&quot;,&quot;msg&quot;:&quot;Successfully initialized and updated submodules in path \/workspace\/repo&quot;}  [test : run-test] PASS [test : run-test] ok    _\/workspace\/repo\/src    0.006s  [build-and-push : git-source-arthurk-tekton-example-2vqls] {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588483950.2051432,&quot;caller&quot;:&quot;git\/git.go:136&quot;,&quot;msg&quot;:&quot;Successfully cloned https:\/\/github.com\/arthurk\/tekton-example @ 301aeaa8f7fa6ec01218ba6c5ddf9095b24d5d98 (grafted, HEAD, origin\/master) in path \/workspace\/repo&quot;} [build-and-push : git-source-arthurk-tekton-example-2vqls] {&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1588483950.2610846,&quot;caller&quot;:&quot;git\/git.go:177&quot;,&quot;msg&quot;:&quot;Successfully initialized and updated submodules in path \/workspace\/repo&quot;}  [build-and-push : build-and-push] INFO[0003] Resolved base name golang:1.14-alpine to golang:1.14-alpine [build-and-push : build-and-push] INFO[0003] Resolved base name golang:1.14-alpine to golang:1.14-alpine [build-and-push : build-and-push] INFO[0003] Retrieving image manifest golang:1.14-alpine ...<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezyume\">\u0420\u0435\u0437\u044e\u043c\u0435<\/h3>\n<p>  <\/p>\n<p>\u0412 <a href=\"https:\/\/www.arthurkoziel.com\/creating-ci-pipelines-with-tekton-part-1\/\" rel=\"nofollow noopener noreferrer\">\u043f\u0435\u0440\u0432\u043e\u0439<\/a> \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Tekton \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0435\u0435, \u0441\u043e\u0437\u0434\u0430\u0432 TaskRun \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 YAML, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 Tekton CLI tkn.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 Tekton Pipeline, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u0430\u0434\u0430\u0447. \u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e \u0441 GitHub \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437 Docker \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0432 DockerHub.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b <a href=\"https:\/\/github.com\/arthurk\/tekton-example\" rel=\"nofollow noopener noreferrer\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/543856\/\"> https:\/\/habr.com\/ru\/post\/543856\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u0432 CI \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Tekton (\u0427\u0430\u0441\u0442\u044c 2\/2)<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 CI \u0441 <a href=\"https:\/\/tekton.dev\/\" rel=\"nofollow noopener noreferrer\">Tekton<\/a>. \u0412 <a href=\"https:\/\/habr.com\/ru\/post\/543366\/\">\u043f\u0435\u0440\u0432\u043e\u0439<\/a> \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Tekton \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 <a href=\"https:\/\/kind.sigs.k8s.io\/\" rel=\"nofollow noopener noreferrer\">kind<\/a> \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Go (<a href=\"https:\/\/github.com\/arthurk\/tekton-example\" rel=\"nofollow noopener noreferrer\">repo<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0431\u0440\u0430\u0437 Docker \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Go \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0435\u0433\u043e \u0432 <a href=\"https:\/\/hub.docker.com\/\" rel=\"nofollow noopener noreferrer\">DockerHub<\/a>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-318510","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/318510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=318510"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/318510\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=318510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=318510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}