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"