{ "apiVersion": "tekton.dev/v1alpha1", "kind": "Task", "metadata": { "annotations": { "manifestival": "new" }, "creationTimestamp": "2019-08-19T19:44:39Z", "generation": 1, "name": "appsody-build-task", "namespace": "kabanero", "resourceVersion": "5484", "selfLink": "/apis/tekton.dev/v1alpha1/namespaces/kabanero/tasks/appsody-build-task", "uid": "c7fb8b89-c2b9-11e9-b8b9-a6cda1c9ec9b" }, "spec": { "inputs": { "params": [ { "default": "/workspace/extracted/Dockerfile", "name": "pathToDockerFile" }, { "default": "/workspace/extracted", "name": "pathToContext" }, { "name": "appsody-deploy-file-name" } ], "resources": [ { "name": "git-source", "type": "git" } ] }, "outputs": { "resources": [ { "name": "docker-image", "type": "image" } ] }, "steps": [ { "args": [ "-c", "/setupAndRunExtract.sh" ], "command": [ "/bin/bash" ], "env": [ { "name": "gitsource", "value": "git-source" } ], "image": "appsody/appsody-docker", "name": "assemble-extract-step", "securityContext": { "privileged": true }, "volumeMounts": [ { "mountPath": "/var/run/docker.sock", "name": "docker-socket" } ] }, { "args": [ "--dockerfile=${inputs.params.pathToDockerFile}", "--destination=${outputs.resources.docker-image.url}", "--context=${inputs.params.pathToContext}", "--skip-tls-verify" ], "command": [ "/kaniko/executor" ], "env": [ { "name": "DOCKER_CONFIG", "value": "/builder/home/.docker" } ], "image": "gcr.io/kaniko-project/executor", "name": "build-push-step" }, { "args": [ "-c", "find /workspace/git-source -name ${YAMLFILE} -type f -exec sed -i -e s!\"image: .*$\"!\"image: ${IMG}\"!g {} \\;" ], "command": [ "/bin/bash" ], "env": [ { "name": "IMG", "value": "${outputs.resources.docker-image.url}" }, { "name": "YAMLFILE", "value": "${inputs.params.appsody-deploy-file-name}" } ], "image": "ubuntu", "name": "modify-yaml" }, { "args": [ "-c", "find /workspace/git-source -name ${YAMLFILE} -type f|xargs kubectl apply -f" ], "command": [ "/bin/sh" ], "env": [ { "name": "YAMLFILE", "value": "${inputs.params.appsody-deploy-file-name}" } ], "image": "lachlanevenson/k8s-kubectl", "name": "install-knative" } ], "volumes": [ { "hostPath": { "path": "/var/run/docker.sock", "type": "Socket" }, "name": "docker-socket" } ] } }