Skip to content

Commit

Permalink
add pipeline inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kameshsampath committed Dec 12, 2022
1 parent 6dfe413 commit c88e187
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .harness/build_go_helloworld.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 ./...
Expand All @@ -28,19 +28,19 @@ 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: |-
echo -n "$GHCR_TOKEN" | ko auth login ghcr.io -u kameshsampath --password-stdin
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:
Expand Down

0 comments on commit c88e187

Please sign in to comment.