-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancements for the exporting output image digest
- use pod termination message to export the image digest instead of logs - add more logs when index.json is not found - create a container to create the default folder for image output digest dir
- Loading branch information
1 parent
60ce931
commit 5e01e74
Showing
12 changed files
with
341 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineResource | ||
metadata: | ||
name: skaffold-image-leeroy-web-1 | ||
spec: | ||
type: image | ||
params: | ||
- name: url | ||
value: gcr.io/christiewilson-catfactory/leeroy-web # Replace this URL with ${KO_DOCKER_REPO} | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineResource | ||
metadata: | ||
name: skaffold-image-leeroy-web-2 | ||
spec: | ||
type: image | ||
params: | ||
- name: url | ||
value: gcr.io/christiewilson-catfactory/leeroy-web # Replace this URL with ${KO_DOCKER_REPO} | ||
--- | ||
# This demo modifies the cluster (deploys to it) you must use a service | ||
# account with permission to admin the cluster (or make your default user an admin | ||
# of the `default` namespace with default-cluster-admin). | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: default-cluster-admin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: cluster-admin | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: PipelineResource | ||
metadata: | ||
name: skaffold-git | ||
spec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: https://github.com/GoogleContainerTools/skaffold | ||
--- | ||
#Builds an image via kaniko and pushes it to registry. | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: Task | ||
metadata: | ||
name: multiple-build-push-kaniko | ||
spec: | ||
inputs: | ||
resources: | ||
- name: sourcerepo | ||
type: git | ||
outputs: | ||
resources: | ||
- name: builtImage1 | ||
type: image | ||
- name: builtImage2 | ||
type: image | ||
steps: | ||
- name: build-and-push-1 | ||
image: busybox | ||
command: | ||
- /bin/sh | ||
args: | ||
- -ce | ||
- | | ||
set -ex | ||
cat <<EOF > /builder/home/image-outputs/builtImage1/index.json | ||
{ | ||
"schemaVersion": 2, | ||
"manifests": [ | ||
{ | ||
"mediaType": "application/vnd.oci.image.index.v1+json", | ||
"size": 314, | ||
"digest": "sha256:05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5" | ||
} | ||
] | ||
} | ||
EOF | ||
- name: build-and-push-2 | ||
image: busybox | ||
command: | ||
- /bin/sh | ||
args: | ||
- -ce | ||
- | | ||
set -e | ||
cat <<EOF > /builder/home/image-outputs/builtImage2/index.json | ||
{ | ||
"schemaVersion": 2, | ||
"manifests": [ | ||
{ | ||
"mediaType": "application/vnd.oci.image.index.v1+json", | ||
"size": 314, | ||
"digest": "sha256:05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5" | ||
} | ||
] | ||
} | ||
EOF | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
name: multiple-build-push-kaniko-run | ||
spec: | ||
taskRef: | ||
name: multiple-build-push-kaniko | ||
trigger: | ||
type: manual | ||
inputs: | ||
resources: | ||
- name: sourcerepo | ||
resourceRef: | ||
name: skaffold-git | ||
outputs: | ||
resources: | ||
- name: builtImage1 | ||
resourceRef: | ||
name: skaffold-image-leeroy-web-1 | ||
- name: builtImage2 | ||
resourceRef: | ||
name: skaffold-image-leeroy-web-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.