From e5e440b30c97b10a0c4c18a2d3869fdf7da2781e Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 27 Jan 2021 10:54:22 +0000 Subject: [PATCH] chore: upgrade pipelines --- .lighthouse/jenkins-x/Kptfile | 11 ----- .lighthouse/jenkins-x/pullrequest.yaml | 33 ++++--------- .lighthouse/jenkins-x/release.yaml | 68 +++++--------------------- 3 files changed, 22 insertions(+), 90 deletions(-) delete mode 100644 .lighthouse/jenkins-x/Kptfile diff --git a/.lighthouse/jenkins-x/Kptfile b/.lighthouse/jenkins-x/Kptfile deleted file mode 100644 index d67db4d..0000000 --- a/.lighthouse/jenkins-x/Kptfile +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: kpt.dev/v1alpha1 -kind: Kptfile -metadata: - name: jenkins-x -upstream: - type: git - git: - commit: 95923d9093f49b0abc4cb65cbb0933af8f48e040 - repo: https://github.com/jenkins-x/jx3-pipeline-catalog - directory: /packs/go-plugin/.lighthouse/jenkins-x - ref: master diff --git a/.lighthouse/jenkins-x/pullrequest.yaml b/.lighthouse/jenkins-x/pullrequest.yaml index 90845b2..42c703f 100755 --- a/.lighthouse/jenkins-x/pullrequest.yaml +++ b/.lighthouse/jenkins-x/pullrequest.yaml @@ -1,8 +1,7 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - annotations: - lighthouse.jenkins-x.io/prependStepsURL: https://raw.githubusercontent.com/jenkins-x/jx3-pipeline-catalog/005e78cf69b643862344397a635736a51dd1bd89/tasks/git-clone/git-clone-pr.yaml + creationTimestamp: null name: pullrequest spec: pipelineSpec: @@ -12,6 +11,7 @@ spec: taskSpec: metadata: {} stepTemplate: + image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go-plugin/pullrequest.yaml@versionStream name: "" resources: requests: @@ -19,32 +19,17 @@ spec: memory: 600Mi workingDir: /workspace/source steps: - - image: gcr.io/jenkinsxio/jx-boot:3.0.773 - name: jx-variables + - image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream + name: "" + resources: {} + - name: jx-variables resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: golang:1.15 - name: build-make-linux + - name: build-make-linux resources: {} - script: | - #!/bin/sh - make linux - - image: golang:1.15 - name: build-make-test + - name: build-make-test resources: {} - script: | - #!/bin/sh - make test - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-container-build + - 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=/workspace/source/${DOCKERFILE_PATH:-Dockerfile} --destination=$DOCKER_REGISTRY/$DOCKER_REGISTRY_ORG/$REPO_NAME:$VERSION podTemplate: {} serviceAccountName: tekton-bot timeout: 240h0m0s diff --git a/.lighthouse/jenkins-x/release.yaml b/.lighthouse/jenkins-x/release.yaml index 0ced168..d10a380 100755 --- a/.lighthouse/jenkins-x/release.yaml +++ b/.lighthouse/jenkins-x/release.yaml @@ -1,8 +1,7 @@ apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - annotations: - lighthouse.jenkins-x.io/prependStepsURL: https://raw.githubusercontent.com/jenkins-x/jx3-pipeline-catalog/005e78cf69b643862344397a635736a51dd1bd89/tasks/git-clone/git-clone.yaml + creationTimestamp: null name: release spec: pipelineSpec: @@ -12,45 +11,24 @@ spec: taskSpec: metadata: {} stepTemplate: + image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go-plugin/release.yaml@versionStream name: "" resources: {} workingDir: /workspace/source steps: - - image: gcr.io/jenkinsxio/jx-release-version:1.0.42 - name: next-version + - image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone.yaml@versionStream + name: "" resources: {} - script: | - #!/usr/bin/env bash - VERSION=$(jx-release-version) - echo $VERSION > VERSION - - image: gcr.io/jenkinsxio/jx-boot:3.0.773 - name: jx-variables + - name: next-version resources: {} - script: | - #!/usr/bin/env sh - jx gitops variables - - image: golang:1.15 - name: release-binary + - name: jx-variables resources: {} - script: | - #!/usr/bin/env sh - source .jx/variables.sh - make release - - image: gcr.io/kaniko-project/executor:debug-v1.3.0 - name: build-and-push-image + - name: release-binary 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=/workspace/source/Dockerfile --destination=gcr.io/$DOCKER_REGISTRY_ORG/$REPO_NAME:$VERSION - - image: jnorwood/helm-docs:v1.4.0 - name: chart-docs + - name: build-and-push-image + resources: {} + - name: chart-docs resources: {} - script: | - #!/bin/ash - if [ -d "/workspace/source/charts/$REPO_NAME" ]; then cd /workspace/source/charts/$REPO_NAME - helm-docs; else echo no charts; fi - image: gcr.io/jenkinsxio/jx-boot:3.0.773 name: release-chart resources: {} @@ -59,30 +37,10 @@ spec: if [ -d "/workspace/source/charts/$REPO_NAME" ]; then source .jx/variables.sh cd /workspace/source/charts/$REPO_NAME make release; else echo no charts; fi - - image: gcr.io/jenkinsxio/jx-changelog:0.0.8 - name: changelog - script: | - #!/usr/bin/env sh - source .jx/variables.sh - - if [ -d "/workspace/source/charts/$REPO_NAME" ]; then - sed -i -e "s/^version:.*/version: $VERSION/" ./charts/$REPO_NAME/Chart.yaml - sed -i -e "s/repository:.*/repository: $DOCKER_REGISTRY\/$DOCKER_REGISTRY_ORG\/$APP_NAME/" ./charts/$REPO_NAME/values.yaml - sed -i -e "s/tag:.*/tag: $VERSION/" ./charts/$REPO_NAME/values.yaml; - else echo no charts; fi - - git commit -a -m "release $VERSION" --allow-empty - git tag -fa v$VERSION -m "Release version $VERSION" - git push origin v$VERSION - - jx changelog create --verbose --header-file=hack/changelog-header.md --version=$VERSION --rev=$PULL_BASE_SHA --output-markdown=changelog.md --update-release=false - - image: gcr.io/jenkinsxio/step-go-releaser:0.0.14 - name: upload-binaries + - name: changelog + resources: {} + - name: upload-binaries resources: {} - script: | - #!/bin/bash - source .jx/variables.sh - make goreleaser - image: gcr.io/jenkinsxio/builder-go:2.1.142-761 name: promote-release resources: {}