mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 20:12:43 +00:00
docker laten werken hiermee is zo moeilijk
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
config.json
|
@@ -16,15 +16,15 @@ spec:
|
|||||||
- name: pathToContext
|
- name: pathToContext
|
||||||
value: "."
|
value: "."
|
||||||
- name: imageUrl-a
|
- name: imageUrl-a
|
||||||
value: "gs://BUCKETNAME/server-a"
|
value: "server-a"
|
||||||
- name: imageTag-a
|
- name: imageTag-a
|
||||||
value: "release"
|
value: "latest"
|
||||||
- name: pathToContext-a
|
- name: pathToContext-a
|
||||||
value: "./serverA"
|
value: "./serverA"
|
||||||
- name: imageUrl-b
|
- name: imageUrl-b
|
||||||
value: "gs://BUCKETNAME/server-b"
|
value: "server-b"
|
||||||
- name: imageTag-b
|
- name: imageTag-b
|
||||||
value: "release"
|
value: "latest"
|
||||||
- name: pathToContext-b
|
- name: pathToContext-b
|
||||||
value: "./serverB"
|
value: "./serverB"
|
||||||
|
|
||||||
|
@@ -22,12 +22,12 @@ spec:
|
|||||||
steps:
|
steps:
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: gcr.io/kaniko-project/executor
|
image: gcr.io/kaniko-project/executor
|
||||||
|
env:
|
||||||
|
- name: "DOCKER_CONFIG"
|
||||||
|
value: "/tekton/home/.docker/"
|
||||||
command:
|
command:
|
||||||
- /kaniko/executor
|
- /kaniko/executor
|
||||||
args:
|
args:
|
||||||
- "--dockerfile=dockerfile"
|
- "--dockerfile=dockerfile"
|
||||||
- "--destination=$(inputs.params.imageUrl):$(inputs.params.imageTag)"
|
- "--destination=$(inputs.params.imageUrl):$(inputs.params.imageTag)"
|
||||||
- "--context=$(inputs.resources.git-source.path)/$(inputs.params.pathToContext)/"
|
- "--context=$(inputs.resources.git-source.path)/$(inputs.params.pathToContext)/"
|
||||||
volumeMounts:
|
|
||||||
- name: docker-config
|
|
||||||
mountPath: /kaniko/.docker/
|
|
||||||
|
20
manifests/tasks/test-run.yaml
Normal file
20
manifests/tasks/test-run.yaml
Normal file
@@ -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"
|
Reference in New Issue
Block a user