From c0fde1b2f15f7bfb48c5d2bac405febec00c7ed6 Mon Sep 17 00:00:00 2001 From: rajatgupta24 Date: Thu, 7 Jul 2022 23:41:30 +0530 Subject: [PATCH] fix: add msg field to pipelineActivity Spec and Steps - Tekton PipelineRun provides the message & this PR will add that Message field to Spec and Steps in the pipelineActivity. - This PR also adds test for 4 testcases: - timeout - cancelled - success - timedout-success related to https://github.com/jenkins-x/jx-ui/issues/23 Signed-off-by: rajatgupta24 --- go.mod | 2 +- go.sum | 4 +- pkg/pipelines/pipelines.go | 24 + pkg/pipelines/pipelines_test.go | 56 + .../testdata/message/cancelled/pr.yaml | 1262 ++++++++++++ .../testdata/message/success/pr.yaml | 960 +++++++++ .../message/timedout-succeeded/pr.yaml | 1749 +++++++++++++++++ .../testdata/message/timeout/pr.yaml | 1346 +++++++++++++ 8 files changed, 5400 insertions(+), 3 deletions(-) create mode 100644 pkg/pipelines/testdata/message/cancelled/pr.yaml create mode 100644 pkg/pipelines/testdata/message/success/pr.yaml create mode 100644 pkg/pipelines/testdata/message/timedout-succeeded/pr.yaml create mode 100644 pkg/pipelines/testdata/message/timeout/pr.yaml diff --git a/go.mod b/go.mod index a7cfee42..9823fe8f 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/jenkins-x-plugins/jx-gitops v0.7.22 github.com/jenkins-x/go-scm v1.11.16 - github.com/jenkins-x/jx-api/v4 v4.3.7 + github.com/jenkins-x/jx-api/v4 v4.5.1 github.com/jenkins-x/jx-helpers/v3 v3.2.16 github.com/jenkins-x/jx-kube-client/v3 v3.0.3 github.com/jenkins-x/jx-logging/v3 v3.0.9 diff --git a/go.sum b/go.sum index 54f1de38..47d4cd27 100644 --- a/go.sum +++ b/go.sum @@ -1058,8 +1058,8 @@ github.com/jenkins-x/jx-api/v4 v4.1.5/go.mod h1:l11kHlFy40UGu9pdhCRxDiJcEgRubSVz github.com/jenkins-x/jx-api/v4 v4.3.3/go.mod h1:l11kHlFy40UGu9pdhCRxDiJcEgRubSVzybWB2jXjLcs= github.com/jenkins-x/jx-api/v4 v4.3.5/go.mod h1:iHK40sCT1ct/C5cIa+Uo+MDFFAjXfnA88MImhPfiTmY= github.com/jenkins-x/jx-api/v4 v4.3.6/go.mod h1:BjLd7lmBB0CpqA1U2IZ2AyEQ2A66U1lDUBz/lsvld3A= -github.com/jenkins-x/jx-api/v4 v4.3.7 h1:SHDH+Z7kN8YBS/LzQTa69u5qWaYxraXIYjPSTmNnad8= -github.com/jenkins-x/jx-api/v4 v4.3.7/go.mod h1:1ZPMGLTfWeDz4CoB+QBScVQM+AjS780osJ4W6mHJWlk= +github.com/jenkins-x/jx-api/v4 v4.5.1 h1:39vflsM69LgOPSF7MdyI+VJH4h78KKDocIlBcPeb3Mo= +github.com/jenkins-x/jx-api/v4 v4.5.1/go.mod h1:1ZPMGLTfWeDz4CoB+QBScVQM+AjS780osJ4W6mHJWlk= github.com/jenkins-x/jx-helpers/v3 v3.0.127/go.mod h1:0U5fcXnqSv5ugx+XMZ2rYT+VU3o+pyJeXJEiNMAVeSU= github.com/jenkins-x/jx-helpers/v3 v3.2.5/go.mod h1:w0isjFV0n85jYJogjTW9cdm8vM/8k1mLhTfLXrb4lCs= github.com/jenkins-x/jx-helpers/v3 v3.2.16 h1:DwN0vxSJHz1L8yaZaJxqYOjDZ0evLpdRosWxW8JvQsI= diff --git a/pkg/pipelines/pipelines.go b/pkg/pipelines/pipelines.go index e2f870ce..71616f1a 100644 --- a/pkg/pipelines/pipelines.go +++ b/pkg/pipelines/pipelines.go @@ -344,6 +344,30 @@ func ToPipelineActivity(pr *v1beta1.PipelineRun, pa *v1.PipelineActivity, overwr } activities.UpdateStatus(pa, false, nil) + + for k := range pr.Status.Conditions { + msg := pr.Status.Conditions[k].GetMessage() + + if strings.Contains(msg, "PipelineRun") { + msg = strings.ReplaceAll(msg, "PipelineRun", "PipelineActivity") + } + + if strings.Contains(msg, pa.Labels["tekton.dev/pipeline"]) { + msg = strings.ReplaceAll(msg, pa.Labels["tekton.dev/pipeline"], pa.Name) + } + + pa.Spec.Message = v1.ActivityMessageType(msg) + } + + k1 := 0 + for k2 := range pr.Status.TaskRuns { + msg := pr.Status.TaskRuns[k2].Status.Conditions[0].Message + + msg = strings.ReplaceAll(msg, "TaskRun", "Stage") + pa.Spec.Steps[k1].Stage.Message = v1.ActivityMessageType(msg) + + k1++ + } } // Humanize splits into words and capitalises diff --git a/pkg/pipelines/pipelines_test.go b/pkg/pipelines/pipelines_test.go index 058c8228..96956ad4 100644 --- a/pkg/pipelines/pipelines_test.go +++ b/pkg/pipelines/pipelines_test.go @@ -273,3 +273,59 @@ func TestPipelineActivityStatus(t *testing.T) { require.Equal(t, v.expectedStatus, pa.Spec.Status.String()) } } + +var activityMessageTestCases = []struct { + description string + folder string + name string + expectedMessage string +}{ + { + description: "Jenkins X PipelineActivity has been successful run and message exists", + folder: "message/success", + name: "rajatgupta24-quickstart-004-pr-1-7", + expectedMessage: `Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0`, + }, + { + description: "Jenkins X PipelineActivity has been timedout and message exists", + folder: "message/timeout", + name: "rajatgupta24-quickstart-004-pr-1-7", + expectedMessage: `PipelineActivity "rajatgupta24-quickstart-004-pr-1-7" failed to finish within "1h0m0s"`, + }, + { + description: "Jenkins X PipelineActivity has been cancelled and message exists", + folder: "message/cancelled", + name: "rajatgupta24-quickstart-004-pr-2-7", + expectedMessage: `PipelineActivity "rajatgupta24-quickstart-004-pr-2-7" was cancelled`, + }, + { + description: "Jenkins X PipelineActivity has two steps, one step that been timedout and other Succeeded", + folder: "message/timedout-succeeded", + name: "rajatgupta24-quickstart-004-pr-2-7", + expectedMessage: `PipelineActivity "rajatgupta24-quickstart-004-pr-2-7" failed to finish within "1m0s"`, + }, +} + +func TestPipelineActivityMessage(t *testing.T) { + for k, v := range activityMessageTestCases { + t.Logf("Running test case %d: %s", k+1, v.description) + prFile := filepath.Join("testdata", v.folder, "pr.yaml") + require.FileExists(t, prFile) + + pr := &v1beta1.PipelineRun{} + err := yamls.LoadFile(prFile, pr) + require.NoError(t, err, "failed to load %s", prFile) + + pa := &v1.PipelineActivity{} + + pa.Name = v.name + pipelines.ToPipelineActivity(pr, pa, false) + + for k2 := range pa.Spec.Steps { + require.NotEqual(t, "", pa.Spec.Steps[k2].Stage.Message) + } + + require.NotEqual(t, "", pa.Spec.Message.String()) + require.Equal(t, v.expectedMessage, pa.Spec.Message.String()) + } +} diff --git a/pkg/pipelines/testdata/message/cancelled/pr.yaml b/pkg/pipelines/testdata/message/cancelled/pr.yaml new file mode 100644 index 00000000..38bad864 --- /dev/null +++ b/pkg/pipelines/testdata/message/cancelled/pr.yaml @@ -0,0 +1,1262 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x-plugins/jx-project.git + lighthouse.jenkins-x.io/job: pr + creationTimestamp: "2022-06-13T20:59:06Z" + generateName: s-x-plugins-jx-project-pr-464-pr- + generation: 3 + labels: + created-by-lighthouse: "true" + event-GUID: 92332760-eb5b-11ec-8ac2-2d35bcf02698 + lighthouse.jenkins-x.io/baseSHA: 05a611975222867c14c5992a4322204b5cb52eae + lighthouse.jenkins-x.io/branch: PR-464 + lighthouse.jenkins-x.io/buildNum: "1655153945931" + lighthouse.jenkins-x.io/context: pr + lighthouse.jenkins-x.io/id: s-x-plugins-jx-project-pr-464-pr-72m49 + lighthouse.jenkins-x.io/job: pr + lighthouse.jenkins-x.io/lastCommitSHA: ec22087260957090cdf327d2669975b24fe03a91 + lighthouse.jenkins-x.io/refs.org: jenkins-x-plugins + lighthouse.jenkins-x.io/refs.pull: "464" + lighthouse.jenkins-x.io/refs.repo: jx-project + lighthouse.jenkins-x.io/type: presubmit + tekton.dev/pipeline: s-x-plugins-jx-project-pr-464-pr-m2z8c + managedFields: + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:annotations: + .: {} + f:lighthouse.jenkins-x.io/cloneURI: {} + f:lighthouse.jenkins-x.io/job: {} + f:generateName: {} + f:labels: + .: {} + f:created-by-lighthouse: {} + f:event-GUID: {} + f:lighthouse.jenkins-x.io/baseSHA: {} + f:lighthouse.jenkins-x.io/branch: {} + f:lighthouse.jenkins-x.io/buildNum: {} + f:lighthouse.jenkins-x.io/context: {} + f:lighthouse.jenkins-x.io/id: {} + f:lighthouse.jenkins-x.io/job: {} + f:lighthouse.jenkins-x.io/lastCommitSHA: {} + f:lighthouse.jenkins-x.io/refs.org: {} + f:lighthouse.jenkins-x.io/refs.pull: {} + f:lighthouse.jenkins-x.io/refs.repo: {} + f:lighthouse.jenkins-x.io/type: {} + f:ownerReferences: + .: {} + k:{"uid":"2b952c54-01a1-4945-8c10-bbfeedcca8cc"}: + .: {} + f:apiVersion: {} + f:controller: {} + f:kind: {} + f:name: {} + f:uid: {} + f:spec: + .: {} + f:params: {} + f:pipelineSpec: + .: {} + f:params: {} + f:tasks: {} + f:workspaces: {} + f:podTemplate: {} + f:serviceAccountName: {} + f:timeout: {} + f:workspaces: {} + manager: lighthouse-tekton-controller + operation: Update + time: "2022-06-13T20:59:06Z" + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:labels: + f:tekton.dev/pipeline: {} + f:status: + .: {} + f:completionTime: {} + f:conditions: {} + f:pipelineSpec: + .: {} + f:params: {} + f:tasks: {} + f:workspaces: {} + f:startTime: {} + f:taskRuns: + .: {} + f:s-x-plugins-jx-project-pr-464-pr-m2z8c-from-build-pack-m5gk2: + .: {} + f:pipelineTaskName: {} + f:status: + .: {} + f:completionTime: {} + f:conditions: {} + f:podName: {} + f:startTime: {} + f:taskSpec: + .: {} + f:params: {} + f:stepTemplate: + .: {} + f:env: {} + f:envFrom: {} + f:name: {} + f:resources: + .: {} + f:requests: + .: {} + f:cpu: {} + f:memory: {} + f:workingDir: {} + f:steps: {} + f:workspaces: {} + manager: controller + operation: Update + time: "2022-06-13T21:35:25Z" + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:spec: + f:status: {} + manager: jx-pipeline-0.1.44 + operation: Update + time: "2022-06-13T21:35:25Z" + name: s-x-plugins-jx-project-pr-464-pr-m2z8c + namespace: jx + ownerReferences: + - apiVersion: lighthouse.jenkins.io/v1alpha1 + controller: true + kind: LighthouseJob + name: s-x-plugins-jx-project-pr-464-pr-72m49 + uid: 2b952c54-01a1-4945-8c10-bbfeedcca8cc + resourceVersion: "268833292" + uid: 1fa77f73-eb58-4a8c-a270-82f5e7005b01 +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + - name: BUILD_ID + value: "1655153945931" + - name: JOB_NAME + value: pr + - name: JOB_SPEC + value: type:presubmit + - name: JOB_TYPE + value: presubmit + - name: PULL_BASE_REF + value: main + - name: PULL_BASE_SHA + value: 05a611975222867c14c5992a4322204b5cb52eae + - name: PULL_NUMBER + value: "464" + - name: PULL_PULL_REF + value: refs/pull/464/head + - name: PULL_PULL_SHA + value: ec22087260957090cdf327d2669975b24fe03a91 + - name: PULL_REFS + value: main:05a611975222867c14c5992a4322204b5cb52eae,464:ec22087260957090cdf327d2669975b24fe03a91:refs/pull/464/head + - name: REPO_NAME + value: jx-project + - name: REPO_OWNER + value: jenkins-x-plugins + - name: REPO_URL + value: https://github.com/jenkins-x-plugins/jx-project.git + pipelineSpec: + params: + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git repository name + name: REPO_NAME + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: git repository name + name: REPO_NAME + type: string + - description: the unique build number + name: BUILD_ID + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: + requests: + cpu: 400m + memory: 600Mi + workingDir: /workspace/source + steps: + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.346 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - image: ghcr.io/jenkins-x/jx-boot:3.2.346 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + - image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + - image: golang:1.17.9 + name: build-make-test + resources: {} + script: | + #!/bin/sh + make test + - image: gcr.io/kaniko-project/executor:v1.6.0-debug + name: build-container-build + resources: {} + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=${DOCKERFILE_PATH:-Dockerfile} --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$REPO_NAME:$VERSION + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + podTemplate: {} + serviceAccountName: tekton-bot + status: Cancelled + timeout: 240h0m0s + workspaces: + - emptyDir: {} + name: output +status: + completionTime: "2022-06-13T21:35:25Z" + conditions: + - lastTransitionTime: "2022-06-13T21:35:25Z" + message: PipelineRun "s-x-plugins-jx-project-pr-464-pr-m2z8c" was cancelled + reason: Cancelled + status: "False" + type: Succeeded + pipelineSpec: + params: + - description: the unique build number + name: BUILD_ID + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the unique build number + name: BUILD_ID + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git repository name + name: REPO_NAME + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: + requests: + cpu: 400m + memory: 600Mi + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.346 + name: git-merge + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.346 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-test + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/bin/sh + make test + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/kaniko-project/executor:v1.6.0-debug + name: build-container-build + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=${DOCKERFILE_PATH:-Dockerfile} --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$REPO_NAME:$VERSION + workingDir: /workspace/source + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + startTime: "2022-06-13T20:59:06Z" + taskRuns: + s-x-plugins-jx-project-pr-464-pr-m2z8c-from-build-pack-m5gk2: + pipelineTaskName: from-build-pack + status: + completionTime: "2022-06-13T21:35:25Z" + conditions: + - lastTransitionTime: "2022-06-13T21:35:25Z" + message: + TaskRun "s-x-plugins-jx-project-pr-464-pr-m2z8c-from-build-pack-m5gk2" + was cancelled + reason: TaskRunCancelled + status: "False" + type: Succeeded + podName: s-x-plugins-jx-project-pr-464-pr-m2z8c-from-build-pack-m5-ksczr + startTime: "2022-06-13T20:59:06Z" + taskSpec: + params: + - description: + git pull reference strings of base and latest in the form + 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: + requests: + cpu: 400m + memory: 600Mi + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.346 + name: git-merge + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.346 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-test + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/bin/sh + make test + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/kaniko-project/executor:v1.6.0-debug + name: build-container-build + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/busybox/sh + source .jx/variables.sh + cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json + /kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=${DOCKERFILE_PATH:-Dockerfile} --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$REPO_NAME:$VERSION + workingDir: /workspace/source + workspaces: + - description: + The git repo will be cloned onto the volume backing this + workspace + mountPath: /workspace + name: output diff --git a/pkg/pipelines/testdata/message/success/pr.yaml b/pkg/pipelines/testdata/message/success/pr.yaml new file mode 100644 index 00000000..2757b232 --- /dev/null +++ b/pkg/pipelines/testdata/message/success/pr.yaml @@ -0,0 +1,960 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x-plugins/jx-registry.git + lighthouse.jenkins-x.io/job: lint + creationTimestamp: "2022-06-15T11:06:34Z" + generateName: x-plugins-jx-registry-pr-8-lint- + generation: 2 + labels: + created-by-lighthouse: "true" + event-GUID: 3424b670-ec9b-11ec-8ede-3a1d48c58fa2 + lighthouse.jenkins-x.io/baseSHA: 7c5c5a87158696c164d556aff77372d701e95197 + lighthouse.jenkins-x.io/branch: PR-8 + lighthouse.jenkins-x.io/buildNum: "1655291194107" + lighthouse.jenkins-x.io/context: lint + lighthouse.jenkins-x.io/id: x-plugins-jx-registry-pr-8-lint-fhcp2 + lighthouse.jenkins-x.io/job: lint + lighthouse.jenkins-x.io/lastCommitSHA: d37fda61b4d258b656faad85eea3564b2e5049a2 + lighthouse.jenkins-x.io/refs.org: jenkins-x-plugins + lighthouse.jenkins-x.io/refs.pull: "8" + lighthouse.jenkins-x.io/refs.repo: jx-registry + lighthouse.jenkins-x.io/type: presubmit + tekton.dev/pipeline: x-plugins-jx-registry-pr-8-lint-dbqqf + managedFields: + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:annotations: + .: {} + f:lighthouse.jenkins-x.io/cloneURI: {} + f:lighthouse.jenkins-x.io/job: {} + f:generateName: {} + f:labels: + .: {} + f:created-by-lighthouse: {} + f:event-GUID: {} + f:lighthouse.jenkins-x.io/baseSHA: {} + f:lighthouse.jenkins-x.io/branch: {} + f:lighthouse.jenkins-x.io/buildNum: {} + f:lighthouse.jenkins-x.io/context: {} + f:lighthouse.jenkins-x.io/id: {} + f:lighthouse.jenkins-x.io/job: {} + f:lighthouse.jenkins-x.io/lastCommitSHA: {} + f:lighthouse.jenkins-x.io/refs.org: {} + f:lighthouse.jenkins-x.io/refs.pull: {} + f:lighthouse.jenkins-x.io/refs.repo: {} + f:lighthouse.jenkins-x.io/type: {} + f:ownerReferences: + .: {} + k:{"uid":"0016a1a8-91c0-4981-b929-a34835760370"}: + .: {} + f:apiVersion: {} + f:controller: {} + f:kind: {} + f:name: {} + f:uid: {} + f:spec: + .: {} + f:params: {} + f:pipelineSpec: + .: {} + f:params: {} + f:tasks: {} + f:workspaces: {} + f:podTemplate: {} + f:serviceAccountName: {} + f:timeout: {} + f:workspaces: {} + manager: lighthouse-tekton-controller + operation: Update + time: "2022-06-15T11:06:34Z" + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:labels: + f:tekton.dev/pipeline: {} + f:status: + .: {} + f:completionTime: {} + f:conditions: {} + f:pipelineSpec: + .: {} + f:params: {} + f:tasks: {} + f:workspaces: {} + f:startTime: {} + f:taskRuns: + .: {} + f:x-plugins-jx-registry-pr-8-lint-dbqqf-jx-secret-lint-fv64p: + .: {} + f:pipelineTaskName: {} + f:status: + .: {} + f:completionTime: {} + f:conditions: {} + f:podName: {} + f:startTime: {} + f:steps: {} + f:taskSpec: + .: {} + f:params: {} + f:stepTemplate: + .: {} + f:env: {} + f:envFrom: {} + f:name: {} + f:resources: {} + f:workingDir: {} + f:steps: {} + f:workspaces: {} + manager: controller + operation: Update + time: "2022-06-15T11:09:56Z" + name: x-plugins-jx-registry-pr-8-lint-dbqqf + namespace: jx + ownerReferences: + - apiVersion: lighthouse.jenkins.io/v1alpha1 + controller: true + kind: LighthouseJob + name: x-plugins-jx-registry-pr-8-lint-fhcp2 + uid: 0016a1a8-91c0-4981-b929-a34835760370 + resourceVersion: "270419726" + uid: cbca9205-e653-43db-98a3-6e1584c4b796 +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + - name: BUILD_ID + value: "1655291194107" + - name: JOB_NAME + value: lint + - name: JOB_SPEC + value: type:presubmit + - name: JOB_TYPE + value: presubmit + - name: PULL_BASE_REF + value: main + - name: PULL_BASE_SHA + value: 7c5c5a87158696c164d556aff77372d701e95197 + - name: PULL_NUMBER + value: "8" + - name: PULL_PULL_REF + value: refs/pull/8/head + - name: PULL_PULL_SHA + value: d37fda61b4d258b656faad85eea3564b2e5049a2 + - name: PULL_REFS + value: main:7c5c5a87158696c164d556aff77372d701e95197,8:d37fda61b4d258b656faad85eea3564b2e5049a2:refs/pull/8/head + - name: REPO_NAME + value: jx-registry + - name: REPO_OWNER + value: jenkins-x-plugins + - name: REPO_URL + value: https://github.com/jenkins-x-plugins/jx-registry.git + pipelineSpec: + params: + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git repository name + name: REPO_NAME + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + tasks: + - name: jx-secret-lint + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - image: golangci/golangci-lint:v1.42.1-alpine + name: make-lint + resources: {} + script: | + #!/bin/sh + golangci-lint run --verbose --deadline 15m0s + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + podTemplate: {} + serviceAccountName: tekton-bot + timeout: 30m0s + workspaces: + - emptyDir: {} + name: output +status: + completionTime: "2022-06-15T11:09:56Z" + conditions: + - lastTransitionTime: "2022-06-15T11:09:56Z" + message: "Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0" + reason: Succeeded + status: "True" + type: Succeeded + pipelineSpec: + params: + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + tasks: + - name: jx-secret-lint + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golangci/golangci-lint:v1.42.1-alpine + name: make-lint + resources: {} + script: | + #!/bin/sh + golangci-lint run --verbose --deadline 15m0s + workingDir: /workspace/source + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + startTime: "2022-06-15T11:06:34Z" + taskRuns: + x-plugins-jx-registry-pr-8-lint-dbqqf-jx-secret-lint-fv64p: + pipelineTaskName: jx-secret-lint + status: + completionTime: "2022-06-15T11:09:56Z" + conditions: + - lastTransitionTime: "2022-06-15T11:09:56Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: x-plugins-jx-registry-pr-8-lint-dbqqf-jx-secret-lint-fv64-vpvmv + startTime: "2022-06-15T11:06:34Z" + steps: + - container: step-git-clone + imageID: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:8bfb6edbd8ce4608af957a3a38444512c14713bc9fc0d60308f228c61be4c83f + name: git-clone + terminated: + containerID: containerd://2efca690307362dbacf30c59b71115d0f160c95545f83f571034c82c631578bf + exitCode: 0 + finishedAt: "2022-06-15T11:06:41Z" + reason: Completed + startedAt: "2022-06-15T11:06:40Z" + - container: step-git-merge + imageID: ghcr.io/jenkins-x/jx-boot@sha256:29453a2fe6dd5ffef6ad564687864ffc1c01637b32cb77c9f86ef9f2dcc8c626 + name: git-merge + terminated: + containerID: containerd://3f3d6b66c8c2371511f4a56dd52121333918bb0027bfeb3482fe5499d3dfecad + exitCode: 0 + finishedAt: "2022-06-15T11:06:44Z" + reason: Completed + startedAt: "2022-06-15T11:06:42Z" + - container: step-make-lint + imageID: docker.io/golangci/golangci-lint@sha256:e32b22eaceaf8872a2cbd0f48ea96cd71a7530f98081914b7b23a795f4e4df1a + name: make-lint + terminated: + containerID: containerd://93a89a85df02f4e99ecf4ca2f51fc3ea23498bdc1243946ec0c369b0f199429c + exitCode: 0 + finishedAt: "2022-06-15T11:09:55Z" + reason: Completed + startedAt: "2022-06-15T11:06:44Z" + taskSpec: + params: + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: + git pull reference strings of base and latest in the form + 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golangci/golangci-lint:v1.42.1-alpine + name: make-lint + resources: {} + script: | + #!/bin/sh + golangci-lint run --verbose --deadline 15m0s + workingDir: /workspace/source + workspaces: + - description: + The git repo will be cloned onto the volume backing this + workspace + mountPath: /workspace + name: output diff --git a/pkg/pipelines/testdata/message/timedout-succeeded/pr.yaml b/pkg/pipelines/testdata/message/timedout-succeeded/pr.yaml new file mode 100644 index 00000000..83c5b64e --- /dev/null +++ b/pkg/pipelines/testdata/message/timedout-succeeded/pr.yaml @@ -0,0 +1,1749 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/rajatgupta24/quickstart-004.git + lighthouse.jenkins-x.io/job: pr + creationTimestamp: "2022-06-29T18:11:02Z" + generateName: atgupta24-quickstart-004-pr-1-pr- + generation: 2 + labels: + created-by-lighthouse: "true" + event-GUID: c9690dd0-f7d6-11ec-991a-c7afea5a422b + lighthouse.jenkins-x.io/baseSHA: 094cb5a1258064cb6df44a2f6dcff695e0c2679a + lighthouse.jenkins-x.io/branch: PR-1 + lighthouse.jenkins-x.io/buildNum: "1656526262794" + lighthouse.jenkins-x.io/context: pr + lighthouse.jenkins-x.io/id: atgupta24-quickstart-004-pr-1-pr-rfktn + lighthouse.jenkins-x.io/job: pr + lighthouse.jenkins-x.io/lastCommitSHA: 0b2650e37009daf3c3e888c915d311c0e69930e8 + lighthouse.jenkins-x.io/refs.org: rajatgupta24 + lighthouse.jenkins-x.io/refs.pull: "1" + lighthouse.jenkins-x.io/refs.repo: quickstart-004 + lighthouse.jenkins-x.io/type: presubmit + tekton.dev/pipeline: atgupta24-quickstart-004-pr-1-pr-qtgrn + name: atgupta24-quickstart-004-pr-1-pr-qtgrn + namespace: jx + ownerReferences: + - apiVersion: lighthouse.jenkins.io/v1alpha1 + controller: true + kind: LighthouseJob + name: atgupta24-quickstart-004-pr-1-pr-rfktn + uid: 59a5baa0-b328-4c8f-8bd0-600ed87dd1b9 + resourceVersion: "187216" + uid: 6b60f16d-c495-4759-8993-85f3ae0bdc4f +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + - name: BUILD_ID + value: "1656526262794" + - name: JOB_NAME + value: pr + - name: JOB_SPEC + value: type:presubmit + - name: JOB_TYPE + value: presubmit + - name: PULL_BASE_REF + value: master + - name: PULL_BASE_SHA + value: 094cb5a1258064cb6df44a2f6dcff695e0c2679a + - name: PULL_NUMBER + value: "1" + - name: PULL_PULL_REF + value: refs/pull/1/head + - name: PULL_PULL_SHA + value: 0b2650e37009daf3c3e888c915d311c0e69930e8 + - name: PULL_REFS + value: master:094cb5a1258064cb6df44a2f6dcff695e0c2679a,1:0b2650e37009daf3c3e888c915d311c0e69930e8:refs/pull/1/head + - name: REPO_NAME + value: quickstart-004 + - name: REPO_OWNER + value: rajatgupta24 + - name: REPO_URL + value: https://github.com/rajatgupta24/quickstart-004.git + pipelineSpec: + params: + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + tasks: + - name: from-build-pack-1 + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git repository name + name: REPO_NAME + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.394 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - image: ghcr.io/jenkins-x/jx-boot:3.2.402 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + - image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + - name: from-build-pack-2 + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: git repository name + name: REPO_NAME + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: the unique build number + name: BUILD_ID + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.394 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - image: ghcr.io/jenkins-x/jx-boot:100 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + - image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + podTemplate: {} + serviceAccountName: tekton-bot + timeout: 1m0s + workspaces: + - emptyDir: {} + name: output +status: + completionTime: "2022-06-29T18:12:02Z" + conditions: + - lastTransitionTime: "2022-06-29T18:12:02Z" + message: + PipelineRun "atgupta24-quickstart-004-pr-1-pr-qtgrn" failed to finish + within "1m0s" + reason: PipelineRunTimeout + status: "False" + type: Succeeded + pipelineSpec: + params: + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + tasks: + - name: from-build-pack-1 + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: git url to clone + name: REPO_URL + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.394 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.402 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + - name: from-build-pack-2 + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: git repository name + name: REPO_NAME + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the unique build number + name: BUILD_ID + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.394 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:100 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + startTime: "2022-06-29T18:11:02Z" + taskRuns: + atgupta24-quickstart-004-pr-1-pr-qtgrn-from-build-pack-1-gf6ks: + pipelineTaskName: from-build-pack-1 + status: + completionTime: "2022-06-29T18:11:22Z" + conditions: + - lastTransitionTime: "2022-06-29T18:11:22Z" + message: All Steps have completed executing + reason: Succeeded + status: "True" + type: Succeeded + podName: atgupta24-quickstart-004-pr-1-pr-qtgrn-from-build-pack-1--6twgh + startTime: "2022-06-29T18:11:03Z" + steps: + - container: step-git-clone + imageID: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:8bfb6edbd8ce4608af957a3a38444512c14713bc9fc0d60308f228c61be4c83f + name: git-clone + terminated: + containerID: containerd://a538a92371774aee2632bc56c5ae0967c780c760edf269b09e6f45a8945ac35f + exitCode: 0 + finishedAt: "2022-06-29T18:11:11Z" + reason: Completed + startedAt: "2022-06-29T18:11:10Z" + - container: step-git-merge + imageID: ghcr.io/jenkins-x/jx-boot@sha256:f9f48fb7d49346ef98619ea4f6e8fac2c2b7f38deab1cff5842aa2ae0f68116c + name: git-merge + terminated: + containerID: containerd://26cc2f071facc10934d0cc0910f3932305e97e22e99b1d87f80552ceaf2980cb + exitCode: 0 + finishedAt: "2022-06-29T18:11:14Z" + reason: Completed + startedAt: "2022-06-29T18:11:12Z" + - container: step-jx-variables + imageID: ghcr.io/jenkins-x/jx-boot@sha256:91347869979d08701be81ed363a39b846fdedb3cb772bb2beccb8b3209c25a5f + name: jx-variables + terminated: + containerID: containerd://9733092175e78c6b6997d8a03c3da4d27c29b171aa16bdc078b22681759249ae + exitCode: 0 + finishedAt: "2022-06-29T18:11:17Z" + reason: Completed + startedAt: "2022-06-29T18:11:14Z" + - container: step-build-make-linux + imageID: docker.io/library/golang@sha256:724abf4dd44985d060f7aa91af5211eb2052491424bd497ba3ddc31f7cee969d + name: build-make-linux + terminated: + containerID: containerd://7b6e68c374ea1e8acc730a7d542e393592044da06a076c14b8873b4419699c55 + exitCode: 0 + finishedAt: "2022-06-29T18:11:21Z" + reason: Completed + startedAt: "2022-06-29T18:11:17Z" + taskSpec: + params: + - description: git url to clone + name: REPO_URL + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: + git pull reference strings of base and latest in the form + 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git repository name + name: REPO_NAME + type: string + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.394 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.402 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + workspaces: + - description: + The git repo will be cloned onto the volume backing this + workspace + mountPath: /workspace + name: output + atgupta24-quickstart-004-pr-1-pr-qtgrn-from-build-pack-2-4kckh: + pipelineTaskName: from-build-pack-2 + status: + completionTime: "2022-06-29T18:12:03Z" + conditions: + - lastTransitionTime: "2022-06-29T18:12:03Z" + message: + TaskRun "atgupta24-quickstart-004-pr-1-pr-qtgrn-from-build-pack-2-4kckh" + failed to finish within "1m0s" + reason: TaskRunTimeout + status: "False" + type: Succeeded + podName: atgupta24-quickstart-004-pr-1-pr-qtgrn-from-build-pack-2--x7w9c + startTime: "2022-06-29T18:11:03Z" + steps: + - container: step-git-clone + imageID: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:8bfb6edbd8ce4608af957a3a38444512c14713bc9fc0d60308f228c61be4c83f + name: git-clone + terminated: + exitCode: 1 + finishedAt: "2022-06-29T18:12:03Z" + reason: TaskRunTimeout + startedAt: "2022-06-29T18:11:08Z" + - container: step-git-merge + imageID: ghcr.io/jenkins-x/jx-boot@sha256:f9f48fb7d49346ef98619ea4f6e8fac2c2b7f38deab1cff5842aa2ae0f68116c + name: git-merge + terminated: + exitCode: 1 + finishedAt: "2022-06-29T18:12:03Z" + reason: TaskRunTimeout + startedAt: "2022-06-29T18:11:08Z" + - container: step-jx-variables + name: jx-variables + terminated: + exitCode: 1 + finishedAt: "2022-06-29T18:12:03Z" + reason: TaskRunTimeout + startedAt: null + - container: step-build-make-linux + imageID: docker.io/library/golang@sha256:724abf4dd44985d060f7aa91af5211eb2052491424bd497ba3ddc31f7cee969d + name: build-make-linux + terminated: + exitCode: 1 + finishedAt: "2022-06-29T18:12:03Z" + reason: TaskRunTimeout + startedAt: "2022-06-29T18:11:09Z" + taskSpec: + params: + - description: the specification of the job + name: JOB_SPEC + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: + git pull reference strings of base and latest in the form + 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.394 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:100 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + workspaces: + - description: + The git repo will be cloned onto the volume backing this + workspace + mountPath: /workspace + name: output diff --git a/pkg/pipelines/testdata/message/timeout/pr.yaml b/pkg/pipelines/testdata/message/timeout/pr.yaml new file mode 100644 index 00000000..b9c6cf02 --- /dev/null +++ b/pkg/pipelines/testdata/message/timeout/pr.yaml @@ -0,0 +1,1346 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + lighthouse.jenkins-x.io/cloneURI: https://github.com/jenkins-x/jx.git + lighthouse.jenkins-x.io/job: pr + creationTimestamp: "2022-06-15T12:29:06Z" + generateName: jenkins-x-jx-pr-8222-pr- + generation: 2 + labels: + created-by-lighthouse: "true" + event-GUID: b8b83910-eca6-11ec-852a-d68f4015f834 + lighthouse.jenkins-x.io/baseSHA: 8d976ac06bb7fac1ad988b99b8996790f84ed17b + lighthouse.jenkins-x.io/branch: PR-8222 + lighthouse.jenkins-x.io/buildNum: "1655296146196" + lighthouse.jenkins-x.io/context: pr + lighthouse.jenkins-x.io/id: jenkins-x-jx-pr-8222-pr-lhgwd + lighthouse.jenkins-x.io/job: pr + lighthouse.jenkins-x.io/lastCommitSHA: 3e2e8e817e93aeb40defbb987a93a6663dbf6950 + lighthouse.jenkins-x.io/refs.org: jenkins-x + lighthouse.jenkins-x.io/refs.pull: "8222" + lighthouse.jenkins-x.io/refs.repo: jx + lighthouse.jenkins-x.io/type: presubmit + tekton.dev/pipeline: jenkins-x-jx-pr-8222-pr-64cr8 + managedFields: + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:annotations: + .: {} + f:lighthouse.jenkins-x.io/cloneURI: {} + f:lighthouse.jenkins-x.io/job: {} + f:generateName: {} + f:labels: + .: {} + f:created-by-lighthouse: {} + f:event-GUID: {} + f:lighthouse.jenkins-x.io/baseSHA: {} + f:lighthouse.jenkins-x.io/branch: {} + f:lighthouse.jenkins-x.io/buildNum: {} + f:lighthouse.jenkins-x.io/context: {} + f:lighthouse.jenkins-x.io/id: {} + f:lighthouse.jenkins-x.io/job: {} + f:lighthouse.jenkins-x.io/lastCommitSHA: {} + f:lighthouse.jenkins-x.io/refs.org: {} + f:lighthouse.jenkins-x.io/refs.pull: {} + f:lighthouse.jenkins-x.io/refs.repo: {} + f:lighthouse.jenkins-x.io/type: {} + f:ownerReferences: + .: {} + k:{"uid":"48bdb3cc-c765-4a60-8b6a-83033b81b38f"}: + .: {} + f:apiVersion: {} + f:controller: {} + f:kind: {} + f:name: {} + f:uid: {} + f:spec: + .: {} + f:params: {} + f:pipelineSpec: + .: {} + f:params: {} + f:tasks: {} + f:workspaces: {} + f:podTemplate: {} + f:serviceAccountName: {} + f:timeout: {} + f:workspaces: {} + manager: lighthouse-tekton-controller + operation: Update + time: "2022-06-15T12:29:06Z" + - apiVersion: tekton.dev/v1beta1 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:labels: + f:tekton.dev/pipeline: {} + f:status: + .: {} + f:completionTime: {} + f:conditions: {} + f:pipelineSpec: + .: {} + f:params: {} + f:tasks: {} + f:workspaces: {} + f:startTime: {} + f:taskRuns: + .: {} + f:jenkins-x-jx-pr-8222-pr-64cr8-from-build-pack-4bfk2: + .: {} + f:pipelineTaskName: {} + f:status: + .: {} + f:completionTime: {} + f:conditions: {} + f:podName: {} + f:startTime: {} + f:steps: {} + f:taskSpec: + .: {} + f:params: {} + f:stepTemplate: + .: {} + f:env: {} + f:envFrom: {} + f:name: {} + f:resources: {} + f:workingDir: {} + f:steps: {} + f:workspaces: {} + manager: controller + operation: Update + time: "2022-06-15T13:29:06Z" + name: jenkins-x-jx-pr-8222-pr-64cr8 + namespace: jx + ownerReferences: + - apiVersion: lighthouse.jenkins.io/v1alpha1 + controller: true + kind: LighthouseJob + name: jenkins-x-jx-pr-8222-pr-lhgwd + uid: 48bdb3cc-c765-4a60-8b6a-83033b81b38f + resourceVersion: "270520671" + uid: 4a3d9803-676d-409f-bebb-43a79aa4024b +spec: + params: + - name: BUILD_ID + value: "" + - name: JOB_NAME + value: "" + - name: JOB_SPEC + value: "" + - name: JOB_TYPE + value: "" + - name: PULL_BASE_REF + value: "" + - name: PULL_BASE_SHA + value: "" + - name: PULL_NUMBER + value: "" + - name: PULL_PULL_REF + value: "" + - name: PULL_PULL_SHA + value: "" + - name: PULL_REFS + value: "" + - name: REPO_NAME + value: "" + - name: REPO_OWNER + value: "" + - name: REPO_URL + value: "" + - name: BUILD_ID + value: "1655296146196" + - name: JOB_NAME + value: pr + - name: JOB_SPEC + value: type:presubmit + - name: JOB_TYPE + value: presubmit + - name: PULL_BASE_REF + value: main + - name: PULL_BASE_SHA + value: 8d976ac06bb7fac1ad988b99b8996790f84ed17b + - name: PULL_NUMBER + value: "8222" + - name: PULL_PULL_REF + value: refs/pull/8222/head + - name: PULL_PULL_SHA + value: 3e2e8e817e93aeb40defbb987a93a6663dbf6950 + - name: PULL_REFS + value: main:8d976ac06bb7fac1ad988b99b8996790f84ed17b,8222:3e2e8e817e93aeb40defbb987a93a6663dbf6950:refs/pull/8222/head + - name: REPO_NAME + value: jx + - name: REPO_OWNER + value: jenkins-x + - name: REPO_URL + value: https://github.com/jenkins-x/jx.git + pipelineSpec: + params: + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + - image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + - image: golangci/golangci-lint:v1.42.1-alpine + name: make-lint + resources: {} + script: | + #!/bin/sh + golangci-lint run --verbose --deadline 15m0s + - image: golang:1.17.9 + name: build-make-test + resources: {} + script: | + #!/bin/sh + make test + - image: 1.17.9-alpine3.15 + name: coverage-report + resources: {} + script: | + #!/bin/sh + make test-coverage + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + podTemplate: {} + serviceAccountName: tekton-bot + timeout: 1h0m0s + workspaces: + - emptyDir: {} + name: output +status: + completionTime: "2022-06-15T13:29:06Z" + conditions: + - lastTransitionTime: "2022-06-15T13:29:06Z" + message: PipelineRun "jenkins-x-jx-pr-8222-pr-64cr8" failed to finish within "1h0m0s" + reason: PipelineRunTimeout + status: "False" + type: Succeeded + pipelineSpec: + params: + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: the unique build number + name: BUILD_ID + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git url to clone + name: REPO_URL + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + tasks: + - name: from-build-pack + params: + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + resources: {} + taskSpec: + metadata: {} + params: + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: git pull reference strings of base and latest in the form 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: git url to clone + name: REPO_URL + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + spec: null + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golangci/golangci-lint:v1.42.1-alpine + name: make-lint + resources: {} + script: | + #!/bin/sh + golangci-lint run --verbose --deadline 15m0s + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-test + resources: {} + script: | + #!/bin/sh + make test + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: 1.17.9-alpine3.15 + name: coverage-report + resources: {} + script: | + #!/bin/sh + make test-coverage + workingDir: /workspace/source + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + mountPath: /workspace + name: output + workspaces: + - name: output + workspace: output + workspaces: + - description: The git repo will be cloned onto the volume backing this workspace + name: output + startTime: "2022-06-15T12:29:06Z" + taskRuns: + jenkins-x-jx-pr-8222-pr-64cr8-from-build-pack-4bfk2: + pipelineTaskName: from-build-pack + status: + completionTime: "2022-06-15T13:29:06Z" + conditions: + - lastTransitionTime: "2022-06-15T13:29:06Z" + message: + TaskRun "jenkins-x-jx-pr-8222-pr-64cr8-from-build-pack-4bfk2" failed + to finish within "1h0m0s" + reason: TaskRunTimeout + status: "False" + type: Succeeded + podName: jenkins-x-jx-pr-8222-pr-64cr8-from-build-pack-4bfk2-pod-jbgn7 + startTime: "2022-06-15T12:29:06Z" + steps: + - container: step-git-clone + imageID: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:8bfb6edbd8ce4608af957a3a38444512c14713bc9fc0d60308f228c61be4c83f + name: git-clone + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: "2022-06-15T12:29:10Z" + - container: step-git-merge + imageID: ghcr.io/jenkins-x/jx-boot@sha256:29453a2fe6dd5ffef6ad564687864ffc1c01637b32cb77c9f86ef9f2dcc8c626 + name: git-merge + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: "2022-06-15T12:29:10Z" + - container: step-jx-variables + imageID: ghcr.io/jenkins-x/jx-boot@sha256:29453a2fe6dd5ffef6ad564687864ffc1c01637b32cb77c9f86ef9f2dcc8c626 + name: jx-variables + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: "2022-06-15T12:29:11Z" + - container: step-build-make-linux + imageID: docker.io/library/golang@sha256:724abf4dd44985d060f7aa91af5211eb2052491424bd497ba3ddc31f7cee969d + name: build-make-linux + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: "2022-06-15T12:29:11Z" + - container: step-make-lint + imageID: docker.io/golangci/golangci-lint@sha256:e32b22eaceaf8872a2cbd0f48ea96cd71a7530f98081914b7b23a795f4e4df1a + name: make-lint + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: "2022-06-15T12:29:11Z" + - container: step-build-make-test + imageID: docker.io/library/golang@sha256:724abf4dd44985d060f7aa91af5211eb2052491424bd497ba3ddc31f7cee969d + name: build-make-test + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: "2022-06-15T12:29:11Z" + - container: step-coverage-report + name: coverage-report + terminated: + exitCode: 1 + finishedAt: "2022-06-15T13:29:06Z" + reason: TaskRunTimeout + startedAt: null + taskSpec: + params: + - default: "" + description: git pull request ref in the form 'refs/pull/$PULL_NUMBER/head' + name: PULL_PULL_REF + type: string + - description: the name of the job which is the trigger context name + name: JOB_NAME + type: string + - default: "" + description: git pull request number + name: PULL_NUMBER + type: string + - default: "" + description: git revision to checkout (branch, tag, sha, ref…) + name: PULL_PULL_SHA + type: string + - description: git repository owner (user or organisation) + name: REPO_OWNER + type: string + - description: the git sha of the base of the pull request + name: PULL_BASE_SHA + type: string + - description: + git pull reference strings of base and latest in the form + 'master:$PULL_BASE_SHA,$PULL_NUMBER:$PULL_PULL_SHA:refs/pull/$PULL_NUMBER/head' + name: PULL_REFS + type: string + - description: git repository name + name: REPO_NAME + type: string + - description: the unique build number + name: BUILD_ID + type: string + - description: the specification of the job + name: JOB_SPEC + type: string + - description: "'the kind of job: postsubmit or presubmit'" + name: JOB_TYPE + type: string + - description: the base git reference of the pull request + name: PULL_BASE_REF + type: string + - description: git url to clone + name: REPO_URL + type: string + stepTemplate: + env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + name: "" + resources: {} + workingDir: /workspace/source + steps: + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.27.0 + name: git-clone + resources: {} + script: | + #!/bin/sh + export SUBDIR="source" + echo "git cloning url: $REPO_URL version $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + git config --global --add user.name ${GIT_AUTHOR_NAME:-jenkins-x-bot} + git config --global --add user.email ${GIT_AUTHOR_EMAIL:-jenkins-x@googlegroups.com} + git config --global credential.helper store + git clone $REPO_URL $SUBDIR + cd $SUBDIR + git fetch origin $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git checkout $(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER + git reset --hard $PULL_PULL_SHA + echo "checked out revision: $PULL_PULL_REF:$(echo $JOB_NAME | tr '[:lower:]' '[:upper:]')-$PULL_NUMBER@$PULL_PULL_SHA to dir: $SUBDIR" + workingDir: /workspace + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: git-merge + resources: {} + script: | + #!/usr/bin/env sh + jx gitops git merge + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: ghcr.io/jenkins-x/jx-boot:3.2.352 + name: jx-variables + resources: + requests: + cpu: 400m + memory: 600Mi + script: | + #!/usr/bin/env sh + jx gitops variables + jx gitops pr variables + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-linux + resources: {} + script: | + #!/bin/sh + make linux + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golangci/golangci-lint:v1.42.1-alpine + name: make-lint + resources: {} + script: | + #!/bin/sh + golangci-lint run --verbose --deadline 15m0s + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: golang:1.17.9 + name: build-make-test + resources: {} + script: | + #!/bin/sh + make test + workingDir: /workspace/source + - env: + - name: HOME + value: /tekton/home + - name: BUILD_ID + value: $(params.BUILD_ID) + - name: JOB_NAME + value: $(params.JOB_NAME) + - name: JOB_SPEC + value: $(params.JOB_SPEC) + - name: JOB_TYPE + value: $(params.JOB_TYPE) + - name: PULL_BASE_REF + value: $(params.PULL_BASE_REF) + - name: PULL_BASE_SHA + value: $(params.PULL_BASE_SHA) + - name: PULL_NUMBER + value: $(params.PULL_NUMBER) + - name: PULL_PULL_REF + value: $(params.PULL_PULL_REF) + - name: PULL_PULL_SHA + value: $(params.PULL_PULL_SHA) + - name: PULL_REFS + value: $(params.PULL_REFS) + - name: REPO_NAME + value: $(params.REPO_NAME) + - name: REPO_OWNER + value: $(params.REPO_OWNER) + - name: REPO_URL + value: $(params.REPO_URL) + envFrom: + - secretRef: + name: jx-boot-job-env-vars + optional: true + image: 1.17.9-alpine3.15 + name: coverage-report + resources: {} + script: | + #!/bin/sh + make test-coverage + workingDir: /workspace/source + workspaces: + - description: + The git repo will be cloned onto the volume backing this + workspace + mountPath: /workspace + name: output