1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00

Update templating to use $(…) instead of ${…}

Starting from 0.7.0, the later is not supported anymore.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
This commit is contained in:
Vincent Demeester 2019-09-24 14:41:58 +02:00 committed by tekton-robot
parent 55aaaadc75
commit 328b67800f
17 changed files with 90 additions and 90 deletions

View File

@ -22,19 +22,19 @@ spec:
name: argocd-env-secret # used for authentication (username/password or auth token)
steps:
- name: login
image: argoproj/argocd:${inputs.params.argocd-version}
image: argoproj/argocd:$(inputs.params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- if [ -z $ARGOCD_AUTH_TOKEN ]; then
yes | argocd login $ARGOCD_SERVER --username=$ARGOCD_USERNAME --password=$ARGOCD_PASSWORD;
fi
- name: sync
image: argoproj/argocd:${inputs.params.argocd-version}
image: argoproj/argocd:$(inputs.params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- argocd app sync ${inputs.params.application-name} --revision ${inputs.params.revision} ${inputs.params.flags}
- argocd app sync $(inputs.params.application-name) --revision $(inputs.params.revision) $(inputs.params.flags)
- name: wait
image: argoproj/argocd:${inputs.params.argocd-version}
image: argoproj/argocd:$(inputs.params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- argocd app wait ${inputs.params.application-name} --health ${inputs.params.flags}
- argocd app wait $(inputs.params.application-name) --health $(inputs.params.flags)

View File

@ -28,7 +28,7 @@ spec:
- name: build
image: ${inputs.params.BUILDER_IMAGE}
workingDir: /workspace/source
command: ['buildah', 'bud', '--tls-verify=${inputs.params.TLSVERIFY}', '--layers', '-f', '${inputs.params.DOCKERFILE}', '-t', '${outputs.resources.image.url}', '.']
command: ['buildah', 'bud', '--tls-verify=$(inputs.params.TLSVERIFY)', '--layers', '-f', '$(inputs.params.DOCKERFILE)', '-t', '$(outputs.resources.image.url)', '.']
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers
@ -38,7 +38,7 @@ spec:
- name: push
image: ${inputs.params.BUILDER_IMAGE}
workingDir: /workspace/source
command: ['buildah', 'push', '--tls-verify=${inputs.params.TLSVERIFY}', '${outputs.resources.image.url}', 'docker://${outputs.resources.image.url}']
command: ['buildah', 'push', '--tls-verify=$(inputs.params.TLSVERIFY)', '$(outputs.resources.image.url)', 'docker://$(outputs.resources.image.url)']
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers

View File

@ -30,8 +30,8 @@ spec:
command: ["buildctl", "--debug", "--addr=${inputs.params.BUILDKIT_DAEMON_ADDRESS}", "build",
"--progress=plain",
"--frontend=dockerfile.v0",
"--opt", "filename=${inputs.params.DOCKERFILE}",
"--opt", "filename=$(inputs.params.DOCKERFILE)",
"--local", "context=.", "--local", "dockerfile=.",
"--output", "type=image,name=${outputs.resources.image.url},push=true",
"--output", "type=image,name=$(outputs.resources.image.url),push=true",
"--export-cache", "type=inline",
"--import-cache", "type=registry,ref=${outputs.resources.image.url}"]
"--import-cache", "type=registry,ref=$(outputs.resources.image.url)"]

View File

@ -37,18 +37,18 @@ spec:
args:
- "-c"
- >
chown -R "${inputs.params.USER_ID}:${inputs.params.GROUP_ID}" "/builder/home" &&
chown -R "${inputs.params.USER_ID}:${inputs.params.GROUP_ID}" "/layers" &&
chown -R "${inputs.params.USER_ID}:${inputs.params.GROUP_ID}" "/cache" &&
chown -R "${inputs.params.USER_ID}:${inputs.params.GROUP_ID}" "/workspace/source"
chown -R "$(inputs.params.USER_ID):$(inputs.params.GROUP_ID)" "/builder/home" &&
chown -R "$(inputs.params.USER_ID):$(inputs.params.GROUP_ID)" "/layers" &&
chown -R "$(inputs.params.USER_ID):$(inputs.params.GROUP_ID)" "/cache" &&
chown -R "$(inputs.params.USER_ID):$(inputs.params.GROUP_ID)" "/workspace/source"
volumeMounts:
- name: "layers-dir"
mountPath: /layers
- name: "${inputs.params.CACHE}"
- name: "$(inputs.params.CACHE)"
mountPath: /cache
- name: detect
image: ${inputs.params.BUILDER_IMAGE}
image: $(inputs.params.BUILDER_IMAGE)
imagePullPolicy: Always
command: ["/lifecycle/detector"]
args:
@ -60,7 +60,7 @@ spec:
mountPath: /layers
- name: restore
image: ${inputs.params.BUILDER_IMAGE}
image: $(inputs.params.BUILDER_IMAGE)
imagePullPolicy: Always
command: ["/lifecycle/restorer"]
args:
@ -68,26 +68,26 @@ spec:
- "-layers=/layers"
- "-path=/cache"
volumeMounts:
- name: "${inputs.params.CACHE}"
- name: "$(inputs.params.CACHE)"
mountPath: /cache
- name: "layers-dir"
mountPath: /layers
- name: analyze
image: ${inputs.params.BUILDER_IMAGE}
image: $(inputs.params.BUILDER_IMAGE)
imagePullPolicy: Always
command: ["/lifecycle/analyzer"]
args:
- "-layers=/layers"
- "-helpers=${inputs.params.USE_CRED_HELPERS}"
- "-helpers=$(inputs.params.USE_CRED_HELPERS)"
- "-group=/layers/group.toml"
- "${outputs.resources.image.url}"
- "$(outputs.resources.image.url)"
volumeMounts:
- name: "layers-dir"
mountPath: /layers
- name: build
image: ${inputs.params.BUILDER_IMAGE}
image: $(inputs.params.BUILDER_IMAGE)
imagePullPolicy: Always
command: ["/lifecycle/builder"]
args:
@ -100,21 +100,21 @@ spec:
mountPath: /layers
- name: export
image: ${inputs.params.BUILDER_IMAGE}
image: $(inputs.params.BUILDER_IMAGE)
imagePullPolicy: Always
command: ["/lifecycle/exporter"]
args:
- "-app=/workspace/source"
- "-layers=/layers"
- "-helpers=${inputs.params.USE_CRED_HELPERS}"
- "-helpers=$(inputs.params.USE_CRED_HELPERS)"
- "-group=/layers/group.toml"
- "${outputs.resources.image.url}"
- "$(outputs.resources.image.url)"
volumeMounts:
- name: "layers-dir"
mountPath: /layers
- name: cache
image: ${inputs.params.BUILDER_IMAGE}
image: $(inputs.params.BUILDER_IMAGE)
imagePullPolicy: Always
command: ["/lifecycle/cacher"]
args:
@ -122,7 +122,7 @@ spec:
- "-group=/layers/group.toml"
- "-path=/cache"
volumeMounts:
- name: "${inputs.params.CACHE}"
- name: "$(inputs.params.CACHE)"
mountPath: /cache
- name: "layers-dir"
mountPath: /layers

View File

@ -25,9 +25,9 @@ spec:
command:
- conftest
- test
- ${inputs.params.files}
- $(inputs.params.files)
- -p
- ${inputs.params.policy}
- $(inputs.params.policy)
- -o
- ${inputs.params.output}
- $(inputs.params.output)
- $(inputs.params.args)

View File

@ -28,22 +28,22 @@ spec:
resources:
- name: source
type: git
targetPath: src/${inputs.params.package}
targetPath: src/$(inputs.params.package)
steps:
- name: build
image: golang:${inputs.params.version}
workingdir: /workspace/src/${inputs.params.package}
image: golang:$(inputs.params.version)
workingdir: /workspace/src/$(inputs.params.package)
command:
- /bin/bash
args:
- -c
- "go build ${inputs.params.flags} ${inputs.params.packages}"
- "go build $(inputs.params.flags) $(inputs.params.packages)"
env:
- name: GOPATH
value: /workspace
- name: GOOS
value: "${inputs.params.GOOS}"
value: "$(inputs.params.GOOS)"
- name: GOARCH
value: "${inputs.params.GOARCH}"
value: "$(inputs.params.GOARCH)"
- name: GO111MODULE
value: "${inputs.params.GO111MODULE}"
value: "$(inputs.params.GO111MODULE)"

View File

@ -25,22 +25,22 @@ spec:
resources:
- name: source
type: git
targetPath: src/${inputs.params.package}
targetPath: src/$(inputs.params.package)
steps:
- name: lint
image: golangci/golangci-lint:${inputs.params.version}
workingdir: /workspace/src/${inputs.params.package}
image: golangci/golangci-lint:$(inputs.params.version)
workingdir: /workspace/src/$(inputs.params.package)
command:
- /bin/bash
args:
- -c
- "golangci-lint run ${inputs.params.flags}"
- "golangci-lint run $(inputs.params.flags)"
env:
- name: GOPATH
value: /workspace
- name: GOOS
value: "${inputs.params.GOOS}"
value: "$(inputs.params.GOOS)"
- name: GOARCH
value: "${inputs.params.GOARCH}"
value: "$(inputs.params.GOARCH)"
- name: GO111MODULE
value: "${inputs.params.GO111MODULE}"
value: "$(inputs.params.GO111MODULE)"

View File

@ -28,22 +28,22 @@ spec:
resources:
- name: source
type: git
targetPath: src/${inputs.params.package}
targetPath: src/$(inputs.params.package)
steps:
- name: unit-test
image: golang:${inputs.params.version}
workingdir: /workspace/src/${inputs.params.package}
image: golang:$(inputs.params.version)
workingdir: /workspace/src/$(inputs.params.package)
command:
- /bin/bash
args:
- -c
- "go test ${inputs.params.flags} ${inputs.params.packages}"
- "go test $(inputs.params.flags) $(inputs.params.packages)"
env:
- name: GOPATH
value: /workspace
- name: GOOS
value: "${inputs.params.GOOS}"
value: "$(inputs.params.GOOS)"
- name: GOARCH
value: "${inputs.params.GOARCH}"
value: "$(inputs.params.GOARCH)"
- name: GO111MODULE
value: "${inputs.params.GO111MODULE}"
value: "$(inputs.params.GO111MODULE)"

View File

@ -27,16 +27,16 @@ spec:
- compile
- com.google.cloud.tools:jib-maven-plugin:build
- -Duser.home=/builder/home
- -Dimage=${outputs.resources.image.url}
workingDir: /workspace/source/${inputs.params.DIRECTORY}
- -Dimage=$(outputs.resources.image.url)
workingDir: /workspace/source/$(inputs.params.DIRECTORY)
volumeMounts:
- name: ${inputs.params.CACHE}
- name: $(inputs.params.CACHE)
mountPath: /builder/home/.m2
subPath: m2-cache
- name: ${inputs.params.CACHE}
- name: $(inputs.params.CACHE)
mountPath: /builder/home/.cache
subPath: jib-cache
volumes:
- name: empty-dir-volume
emptyDir: {}
emptyDir: {}

View File

@ -31,6 +31,6 @@ spec:
value: /builder/home/.docker
command:
- /kaniko/executor
- --dockerfile=${inputs.params.DOCKERFILE}
- --context=/workspace/source/${inputs.params.CONTEXT} # The user does not need to care the workspace and the source.
- --destination=${outputs.resources.image.url}
- --dockerfile=$(inputs.params.DOCKERFILE)
- --context=/workspace/source/$(inputs.params.CONTEXT) # The user does not need to care the workspace and the source.
- --destination=$(outputs.resources.image.url)

View File

@ -24,6 +24,6 @@ spec:
args:
- deploy
- --service
- ${inputs.params.service}
- $(inputs.params.service)
- --image
- ${inputs.resources.image.url}
- $(inputs.resources.image.url)

View File

@ -24,7 +24,7 @@ spec:
command:
- kubeval
- -d
- ${inputs.params.files}
- $(inputs.params.files)
- -o
- ${inputs.params.output}
- $(inputs.params.output)
- $(inputs.params.args)

View File

@ -31,12 +31,12 @@ spec:
command:
- /makisu-internal/makisu
- build
- --push=${inputs.params.PUSH_REGISTRY}
- --push=$(inputs.params.PUSH_REGISTRY)
- --registry-config=/registry-config
- --modifyfs=true
- --tag=${outputs.resources.image.url}
- --tag=$(outputs.resources.image.url)
- --registry-config=/registry-config/registry.yaml
- ${inputs.params.CONTEXTPATH}
- $(inputs.params.CONTEXTPATH)
env:
- name: DOCKER_CONFIG
value: /builder/home/.docker
@ -46,4 +46,4 @@ spec:
volumes:
- name: registry-config
secret:
secretName: ${inputs.params.REGISTRY_SECRET}
secretName: $(inputs.params.REGISTRY_SECRET)

View File

@ -16,5 +16,5 @@ spec:
image: quay.io/openshift-pipeline/openshift-cli:0.5.0
command: ["/usr/local/bin/oc"]
args:
- "--kubeconfig /workspace/${inputs.resources.cluster.name}/kubeconfig --context ${inputs.resources.cluster.name}"
- "${inputs.params.ARGS}"
- "--kubeconfig /workspace/$(inputs.resources.cluster.name)/kubeconfig --context $(inputs.resources.cluster.name)"
- "$(inputs.params.ARGS)"

View File

@ -13,4 +13,4 @@ spec:
image: quay.io/openshift-pipeline/openshift-cli:0.5.0
command: ["/usr/local/bin/oc"]
args:
- "${inputs.params.ARGS}"
- "$(inputs.params.ARGS)"

View File

@ -50,31 +50,31 @@ spec:
args:
- -c
- |
if [ -z ${inputs.params.OW_PROJECT_URL} ]; then
OW_ACTION_CODE="${inputs.params.OW_ACTION_CODE}"
if [ -z $(inputs.params.OW_PROJECT_URL) ]; then
OW_ACTION_CODE="$(inputs.params.OW_ACTION_CODE)"
else
TEMPDIR="knative-"$((1 + RANDOM % 100))
TEMPFILE=`basename "${inputs.params.OW_PROJECT_URL}"`
TEMPFILE=`basename "$(inputs.params.OW_PROJECT_URL)"`
mkdir $TEMPDIR
cd $TEMPDIR
wget -O $TEMPFILE "${inputs.params.OW_PROJECT_URL}"
if [ "${inputs.params.OW_ACTION_BINARY}" = true ]; then
wget -O $TEMPFILE "$(inputs.params.OW_PROJECT_URL)"
if [ "$(inputs.params.OW_ACTION_BINARY)" = true ]; then
OW_ACTION_CODE=`base64 $TEMPFILE | tr -d '[:space:]'`
else
OW_ACTION_CODE=`cat $TEMPFILE`
fi
cd ..
fi
cat <<EOF >> ${inputs.params.DOCKERFILE}
ENV __OW_RUNTIME_DEBUG "${inputs.params.OW_RUNTIME_DEBUG}"
ENV __OW_RUNTIME_PLATFORM "${inputs.params.OW_RUNTIME_PLATFORM}"
ENV __OW_ACTION_NAME "${inputs.params.OW_ACTION_NAME}"
ENV __OW_ACTION_CODE "${OW_ACTION_CODE}"
ENV __OW_ACTION_MAIN "${inputs.params.OW_ACTION_MAIN}"
ENV __OW_ACTION_BINARY "${inputs.params.OW_ACTION_BINARY}"
ENV __OW_HTTP_METHODS "${inputs.params.OW_HTTP_METHODS}"
ENV __OW_ACTION_RAW "${inputs.params.OW_ACTION_RAW}"
ENV __OW_PROJECT_URL "${inputs.params.OW_PROJECT_URL}"
cat <<EOF >> $(inputs.params.DOCKERFILE)
ENV __OW_RUNTIME_DEBUG "$(inputs.params.OW_RUNTIME_DEBUG)"
ENV __OW_RUNTIME_PLATFORM "$(inputs.params.OW_RUNTIME_PLATFORM)"
ENV __OW_ACTION_NAME "$(inputs.params.OW_ACTION_NAME)"
ENV __OW_ACTION_CODE "$(OW_ACTION_CODE)"
ENV __OW_ACTION_MAIN "$(inputs.params.OW_ACTION_MAIN)"
ENV __OW_ACTION_BINARY "$(inputs.params.OW_ACTION_BINARY)"
ENV __OW_HTTP_METHODS "$(inputs.params.OW_HTTP_METHODS)"
ENV __OW_ACTION_RAW "$(inputs.params.OW_ACTION_RAW)"
ENV __OW_PROJECT_URL "$(inputs.params.OW_PROJECT_URL)"
EOF
- name: update-dockerfile-for-tekton
image: ubuntu
@ -84,12 +84,12 @@ spec:
- -i
- -e
- 's/COPY ./COPY .\/runtime-git/g'
- ${inputs.params.DOCKERFILE}
- $(inputs.params.DOCKERFILE)
- name: build-openwhisk-nodejs-runtime
image: "gcr.io/kaniko-project/executor:latest"
command:
- /kaniko/executor
args:
- --dockerfile=${inputs.params.DOCKERFILE}
- --dockerfile=$(inputs.params.DOCKERFILE)
- --destination=${outputs.resources.runtime-image.url}

View File

@ -26,14 +26,14 @@ spec:
- name: generate
image: quay.io/openshift-pipeline/s2i
workingdir: /workspace/source
command: ['s2i', 'build', '${inputs.params.PATH_CONTEXT}', '${inputs.params.BUILDER_IMAGE}', '--as-dockerfile', '/gen-source/Dockerfile.gen']
command: ['s2i', 'build', '$(inputs.params.PATH_CONTEXT)', '$(inputs.params.BUILDER_IMAGE)', '--as-dockerfile', '/gen-source/Dockerfile.gen']
volumeMounts:
- name: gen-source
mountPath: /gen-source
- name: build
image: quay.io/buildah/stable
workingdir: /gen-source
command: ['buildah', 'bud', '--tls-verify=${inputs.params.TLSVERIFY}', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '${outputs.resources.image.url}', '.']
command: ['buildah', 'bud', '--tls-verify=$(inputs.params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(outputs.resources.image.url)', '.']
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers
@ -44,7 +44,7 @@ spec:
- name: push
image: quay.io/buildah/stable
command: ['buildah', 'push', '--tls-verify=${inputs.params.TLSVERIFY}', '${outputs.resources.image.url}', 'docker://${outputs.resources.image.url}']
command: ['buildah', 'push', '--tls-verify=$(inputs.params.TLSVERIFY)', '$(outputs.resources.image.url)', 'docker://$(outputs.resources.image.url)']
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers