1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-24 08:36:46 +00:00
kyverno/test/cli/test-validating-policy/json-check-dockerfile/payload.json
shuting 637f756994
feat: support json payload via CLI apply command (#12296)
* chore: remove unused code

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* feat: support json in CLI apply command

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: remove not used validation expressions

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: update codegen docs

Signed-off-by: ShutingZhao <shuting@nirmata.com>

* chore: add unit tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

---------

Signed-off-by: ShutingZhao <shuting@nirmata.com>
2025-03-06 08:48:26 +00:00

176 lines
No EOL
4.4 KiB
JSON

{
"MetaArgs": [
{
"Key": "BUILD_PLATFORM",
"DefaultValue": "\"linux/amd64\"",
"ProvidedValue": null,
"Value": "\"linux/amd64\""
},
{
"Key": "BUILDER_IMAGE",
"DefaultValue": "\"golang:1.20.6-alpine3.18\"",
"ProvidedValue": null,
"Value": "\"golang:1.20.6-alpine3.18\""
}
],
"Stages": [
{
"Name": "builder",
"BaseName": "\"golang:1.20.6-alpine3.18\"",
"Platform": "$BUILD_PLATFORM",
"Comment": "",
"SourceCode": "FROM --platform=$BUILD_PLATFORM $BUILDER_IMAGE as builder",
"Location": [
{
"Start": {
"Line": 4,
"Character": 0
},
"End": {
"Line": 4,
"Character": 0
}
}
],
"As": "builder",
"From": {
"Image": "\"golang:1.20.6-alpine3.18\""
},
"Commands": [
{
"Name": "WORKDIR",
"Path": "/"
},
{
"Chmod": "",
"Chown": "",
"DestPath": "./",
"From": "",
"Link": false,
"Name": "COPY",
"SourceContents": null,
"SourcePaths": [
"."
]
},
{
"Args": [
{
"Comment": "",
"Key": "SIGNER_BINARY_LINK",
"Value": "\"https://d2hvyiie56hcat.cloudfront.net/linux/amd64/plugin/latest/notation-aws-signer-plugin.zip\""
}
],
"Name": "ARG"
},
{
"Args": [
{
"Comment": "",
"Key": "SIGNER_BINARY_FILE",
"Value": "\"notation-aws-signer-plugin.zip\""
}
],
"Name": "ARG"
},
{
"CmdLine": [
"wget -O ${SIGNER_BINARY_FILE} ${SIGNER_BINARY_LINK}"
],
"Files": null,
"FlagsUsed": [],
"Name": "RUN",
"PrependShell": true
},
{
"CmdLine": [
"apk update && apk add unzip && unzip -o ${SIGNER_BINARY_FILE}"
],
"Files": null,
"FlagsUsed": [],
"Name": "RUN",
"PrependShell": true
},
{
"CmdLine": [
"GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags=\"-w -s\" -o kyverno-notation-aws ."
],
"Files": null,
"FlagsUsed": [],
"Name": "RUN",
"PrependShell": true
}
]
},
{
"Name": "",
"BaseName": "gcr.io/distroless/static:nonroot",
"Platform": "",
"Comment": "",
"SourceCode": "FROM gcr.io/distroless/static:nonroot",
"Location": [
{
"Start": {
"Line": 20,
"Character": 0
},
"End": {
"Line": 20,
"Character": 0
}
}
],
"From": {
"Image": "gcr.io/distroless/static:nonroot"
},
"Commands": [
{
"Name": "WORKDIR",
"Path": "/"
},
{
"Env": [
{
"Key": "PLUGINS_DIR",
"Value": "/plugins"
}
],
"Name": "ENV"
},
{
"Chmod": "",
"Chown": "",
"DestPath": "plugins/com.amazonaws.signer.notation.plugin/notation-com.amazonaws.signer.notation.plugin",
"From": "builder",
"Link": false,
"Name": "COPY",
"SourceContents": null,
"SourcePaths": [
"notation-com.amazonaws.signer.notation.plugin"
]
},
{
"Chmod": "",
"Chown": "",
"DestPath": "kyverno-notation-aws",
"From": "builder",
"Link": false,
"Name": "COPY",
"SourceContents": null,
"SourcePaths": [
"kyverno-notation-aws"
]
},
{
"CmdLine": [
"/kyverno-notation-aws"
],
"Files": null,
"Name": "ENTRYPOINT",
"PrependShell": false
}
]
}
]
}