Skip to content

Commit

Permalink
Fix uploading container image to Harbor
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Oct 4, 2019
1 parent 63c840f commit cbe263a
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions docs/part-07/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,24 @@ spec:
items:
- key: .dockerconfigjson
path: config.json
- name: binary-store
- name: shared-storage
emptyDir: {}
steps:
- name: build-and-tar
image: gcr.io/kaniko-project/executor
command:
- /kaniko/executor
args:
- --dockerfile=\$(inputs.params.pathToDockerFile)
- --context=\$(inputs.params.pathToContext)
- --single-snapshot
- --tarPath=/shared-storage/${USER}-app-build.tar
- --no-push
volumeMounts:
- name: docker-config
mountPath: /builder/home/.docker/
- name: shared-storage
mountPath: /shared-storage
- name: build-and-push
image: gcr.io/kaniko-project/executor
env:
Expand All @@ -125,16 +140,15 @@ spec:
- --destination=\$(outputs.resources.builtImage.url)
- --context=\$(inputs.params.pathToContext)
- --single-snapshot
- --tarPath=/binary-store/${USER}-app-build.tar
- --skip-tls-verify
volumeMounts:
- name: docker-config
mountPath: /builder/home/.docker/
- name: binary-store
mountPath: /binary-store
- name: shared-storage
mountPath: /shared-storage
- name: upload-container-content-s3
image: atlassian/pipelines-awscli
command: ["sh", "-c", "aws s3 cp /binary-store/${USER}-app-build.tar s3://${USER}-kops-k8s/"]
command: ["sh", "-c", "aws s3 cp /shared-storage/${USER}-app-build.tar s3://${USER}-kops-k8s/"]
env:
- name: AWS_DEFAULT_REGION
value: "eu-central-1"
Expand All @@ -149,8 +163,8 @@ spec:
name: user-aws-access-keys
key: secret_key
volumeMounts:
- name: binary-store
mountPath: /binary-store
- name: shared-storage
mountPath: /shared-storage
---
apiVersion: tekton.dev/v1alpha1
kind: Pipeline
Expand Down

0 comments on commit cbe263a

Please sign in to comment.