From c88e18751d06dcf8743dcc1a8e3bfff3f1faef41 Mon Sep 17 00:00:00 2001 From: Kamesh Date: Mon, 12 Dec 2022 12:04:42 +0530 Subject: [PATCH] add pipeline inputs --- .harness/build_go_helloworld.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.harness/build_go_helloworld.yaml b/.harness/build_go_helloworld.yaml index b1735b7..022c86b 100644 --- a/.harness/build_go_helloworld.yaml +++ b/.harness/build_go_helloworld.yaml @@ -1,8 +1,8 @@ pipeline: name: build go hello-world identifier: build_go_helloworld - projectIdentifier: My_Go_Demos - orgIdentifier: default + projectIdentifier: <+input> + orgIdentifier: <+input> stages: - stage: name: Build @@ -17,7 +17,7 @@ pipeline: name: test identifier: test spec: - connectorRef: ghcrio + connectorRef: <+input> image: docker.io/golang:1.19 shell: Sh command: go test -timeout 30s -v ./... @@ -28,7 +28,7 @@ pipeline: name: build and sign identifier: ko_build_and_sign spec: - connectorRef: DockerHub + connectorRef: <+input> image: kameshsampath/kube-dev-tools:0.1.4 shell: Bash command: |- @@ -36,11 +36,11 @@ pipeline: IMAGE_REF=$(ko build --bare .) cosign sign --key env://COSIGN_PRIVATE_KEY "$IMAGE_REF" envVariables: - KO_DOCKER_REPO: ghcr.io/kameshsampath/go-hello-world + KO_DOCKER_REPO: <+input> GHCR_TOKEN: <+secrets.getValue("account.Github_Access_Token")> - COSIGN_PASSWORD: <+secrets.getValue("cosign_demo_key_password")> - COSIGN_PRIVATE_KEY: <+secrets.getValue("cosign_demo_priv_key")> - COSIGN_PUBLIC_KEY: <+secrets.getValue("cosign_demo_pub_key")> + COSIGN_PASSWORD: <+secrets.getValue("account.cosign_demo_key_password")> + COSIGN_PRIVATE_KEY: <+secrets.getValue("account.cosign_demo_priv_key")> + COSIGN_PUBLIC_KEY: <+secrets.getValue("account.cosign_demo_pub_key")> imagePullPolicy: IfNotPresent description: build the application using ko and sign the image using cosign platform: