-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.yaml
44 lines (44 loc) · 1.37 KB
/
task.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: hello
annotations:
attestagon.io/artifact: "test-image"
spec:
results:
- name: digest
description: the digest of the image
workspaces:
- name: source
description: Holds the context and Dockerfile
mountPath: /var/source
- name: dockerconfig
description: Includes a docker `config.json`
optional: true
mountPath: /kaniko/.docker
steps:
- name: git-clone
image: ubuntu:latest
workingDir: $(workspaces.source.path)
script: |
apt update -y && apt upgrade -y
apt install git -y
git clone https://github.com/ChaosInTheCRD/mic-test.git
- name: build-mic-test
image: golang:1.18.0
workingDir: $(workspaces.source.path)
script: |
cd $(workspaces.source.path)/mic-test
echo "current-directory:"
ls
rm -rf bin/*
go build -o bin/mic-test .
chmod +x bin/mic-test
- name: kaniko
image: gcr.io/kaniko-project/executor:v1.5.1@sha256:c6166717f7fe0b7da44908c986137ecfeab21f31ec3992f6e128fff8a94be8a5
workingDir: $(workspaces.source.path)
args:
- --dockerfile=$(workspaces.source.path)/mic-test/Dockerfile
- --context=$(workspaces.source.path)/mic-test
- --destination=ghcr.io/chaosinthecrd/mic-test
- --digest-file=$(results.digest.path)