From 55256be959a5cf52eb1eeb6bc337f28538add2dd Mon Sep 17 00:00:00 2001 From: Beppe Vanrolleghem Date: Wed, 19 Feb 2020 10:14:59 +0100 Subject: [PATCH] docker laten werken hiermee is zo moeilijk --- .gitignore | 1 + manifests/pipeline/pipelineRun.yaml | 8 ++++---- manifests/tasks/build-and-push.yaml | 6 +++--- manifests/tasks/test-run.yaml | 20 ++++++++++++++++++++ 4 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 .gitignore create mode 100644 manifests/tasks/test-run.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0cffcb3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.json \ No newline at end of file diff --git a/manifests/pipeline/pipelineRun.yaml b/manifests/pipeline/pipelineRun.yaml index b9d714c..da4ccdc 100644 --- a/manifests/pipeline/pipelineRun.yaml +++ b/manifests/pipeline/pipelineRun.yaml @@ -16,15 +16,15 @@ spec: - name: pathToContext value: "." - name: imageUrl-a - value: "gs://BUCKETNAME/server-a" + value: "server-a" - name: imageTag-a - value: "release" + value: "latest" - name: pathToContext-a value: "./serverA" - name: imageUrl-b - value: "gs://BUCKETNAME/server-b" + value: "server-b" - name: imageTag-b - value: "release" + value: "latest" - name: pathToContext-b value: "./serverB" diff --git a/manifests/tasks/build-and-push.yaml b/manifests/tasks/build-and-push.yaml index 2afcf5b..6c4c336 100644 --- a/manifests/tasks/build-and-push.yaml +++ b/manifests/tasks/build-and-push.yaml @@ -22,12 +22,12 @@ spec: steps: - name: build-and-push image: gcr.io/kaniko-project/executor + env: + - name: "DOCKER_CONFIG" + value: "/tekton/home/.docker/" command: - /kaniko/executor args: - "--dockerfile=dockerfile" - "--destination=$(inputs.params.imageUrl):$(inputs.params.imageTag)" - "--context=$(inputs.resources.git-source.path)/$(inputs.params.pathToContext)/" - volumeMounts: - - name: docker-config - mountPath: /kaniko/.docker/ diff --git a/manifests/tasks/test-run.yaml b/manifests/tasks/test-run.yaml new file mode 100644 index 0000000..ce1fc2b --- /dev/null +++ b/manifests/tasks/test-run.yaml @@ -0,0 +1,20 @@ +apiVersion: tekton.dev/v1alpha1 +kind: TaskRun +metadata: + name: test-run +spec: + serviceAccountName: tutorial-service + taskRef: + name: build-and-push + inputs: + resources: + - name: git-source + resourceRef: + name: git + params: + - name: pathToContext + value: /serverA/ #configure: may change according to your source + - name: imageUrl + value: "server-a" + - name: imageTag + value: "latest"