mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 03:52:44 +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
|
||||
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"
|
||||
|
||||
|
@@ -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/
|
||||
|
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