catalog icon indicating copy to clipboard operation
catalog copied to clipboard

Make the Buildah Task "tekton chains" friendly

Open sbose78 opened this issue 3 years ago • 26 comments

Write out an extra result so that Tekton chains is able to discover what to sign/record.

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

  • [ ] Follows the authoring recommendations
  • [ ] Includes docs (if user facing)
  • [ ] Includes tests (if functionality of task changed or new task added)
  • [ ] Commit messages follow commit message best practices
  • [ ] Complies with Catalog Organization TEP, see example. Note An issue has been filed to automate this validation
    • [ ] File path follows <kind>/<name>/<version>/name.yaml

    • [ ] Has README.md at <kind>/<name>/<version>/README.md

    • [ ] Has mandatory metadata.labels - app.kubernetes.io/version the same as the <version> of the resource

    • [ ] Has mandatory metadata.annotations tekton.dev/pipelines.minVersion

    • [ ] mandatory spec.description follows the convention

        ```
      
        spec:
          description: >-
            one line summary of the resource
      
            Paragraph(s) to describe the resource.
        ```
      

See the contribution guide for more details.


sbose78 avatar Feb 17 '22 16:02 sbose78

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 3:
cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST
    ^-----------------------^ SC2046: Quote this to prevent word splitting.
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.


In buildah-digest-to-results line 5:
echo $(params.IMAGE) | tee $(results.IMAGE_URL.path)
     ^-------------^ SC2046: Quote this to prevent word splitting.
     ^-------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                           ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

tekton-robot avatar Feb 17 '22 16:02 tekton-robot

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 3:
cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST
    ^-----------------------^ SC2046: Quote this to prevent word splitting.
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.


In buildah-digest-to-results line 5:
echo $(params.IMAGE) | tee $(results.IMAGE_URL.path)
     ^-------------^ SC2046: Quote this to prevent word splitting.
     ^-------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                           ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

tekton-robot avatar Feb 17 '22 16:02 tekton-robot

testing this change now

sbose78 avatar Feb 17 '22 16:02 sbose78

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat $(workspaces.source.path)/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-----------------------^ SC2046: Quote this to prevent word splitting.
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                 ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 4:
echo $(params.IMAGE) | tee $(results.IMAGE_URL.path)
     ^-------------^ SC2046: Quote this to prevent word splitting.
     ^-------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                           ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

tekton-robot avatar Feb 17 '22 19:02 tekton-robot

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 4:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

tekton-robot avatar Feb 17 '22 20:02 tekton-robot

/lgtm

chmouel avatar Feb 17 '22 21:02 chmouel

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 4:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

tekton-robot avatar Feb 17 '22 21:02 tekton-robot

you need to yamllint your contribution

chmouel avatar Feb 17 '22 21:02 chmouel

@sbose78 thank you for the contribution +1 I wonder if we should bump the version of Task instead of modifying the existing Task? thinking Reason: existing users would come to know that a version is there which has some new changes that are different from the previous version. WDYT? /cc @vdemeester @chmouel

So it doesn't really change the behavior, that why I am ok keeping the version. But I don't really have strong opinion there, we could bump it as well.

vdemeester avatar Feb 18 '22 08:02 vdemeester

Either way I am fine

chmouel avatar Feb 18 '22 08:02 chmouel

Sounds good, I'll keep the same version because it's essentially "logging" more , nothing else :)

sbose78 avatar Feb 24 '22 16:02 sbose78

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

tekton-robot avatar Feb 24 '22 18:02 tekton-robot

/retest

vdemeester avatar Feb 24 '22 18:02 vdemeester

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/hadolint/0.1/hadolint.yaml
FILE: task/sonarqube-scanner/0.2/sonarqube-scanner.yaml
WARN : Step "sonar-properties-create" references "$(params.SONAR_HOST_URL)" directly from its script block. For reliability and security, consider putting the param into an environment variable of the Step and accessing that environment variable in your script instead.
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 4:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

WARN : step: hadolint is not using #!/usr/bin/env 
ERROR: /usr/bin/shellcheck, [-s bash] failed:

In hadolint-lint-dockerfile line 5:
  IFS="," read -a RULES <<< "$RULES"
          ^--^ SC2162: read without -r will mangle backslashes.


In hadolint-lint-dockerfile line 6:
  for rule in ${RULES[@]}; do ignore_rules="--ignore $rule $ignore_rules"; done
              ^---------^ SC2068: Double quote array expansions to avoid re-splitting elements.

For more information:
  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
  https://www.shellcheck.net/wiki/SC2162 -- read without -r will mangle backs...

ERROR: /usr/bin/shellcheck, [-s bash] failed:

In sonarqube-scanner-sonar-properties-create line 8:
  if ! grep -R "^[#]*\s*${thekey}=.*" $filename >/dev/null; then
                                      ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  if ! grep -R "^[#]*\s*${thekey}=.*" "$filename" >/dev/null; then


In sonarqube-scanner-sonar-properties-create line 10:
    echo "" >>$filename
              ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "" >>"$filename"


In sonarqube-scanner-sonar-properties-create line 11:
    echo "$thekey=$newvalue" >>$filename
                               ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "$thekey=$newvalue" >>"$filename"


In sonarqube-scanner-sonar-properties-create line 14:
    sed -ir "s|^[#]*\s*${thekey}=.*|$thekey=$newvalue|" $filename
                                                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    sed -ir "s|^[#]*\s*${thekey}=.*|$thekey=$newvalue|" "$filename"


In sonarqube-scanner-sonar-properties-create line 20:
  cp -RL $(workspaces.sonar-settings.path)/sonar-project.properties $(workspaces.source.path)/sonar-project.properties
         ^-- SC2046: Quote this to prevent word splitting.
                                                                    ^-----------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 25:
    replaceValues $(workspaces.source.path)/sonar-project.properties sonar.host.url $(params.SONAR_HOST_URL)
                  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                                                    ^----------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 28:
    replaceValues $(workspaces.source.path)/sonar-project.properties sonar.projectKey $(params.SONAR_PROJECT_KEY)
                  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                                                      ^-------------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 32:
  echo "sonar.projectKey=$(params.SONAR_PROJECT_KEY)" >> sonar-project.properties
  ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects.


In sonarqube-scanner-sonar-properties-create line 38:
cat $(workspaces.source.path)/sonar-project.properties
    ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...

tekton-robot avatar Feb 24 '22 18:02 tekton-robot

@sbose78 yamllint seems to be sad :sweat_smile:

task/buildah/0.3/buildah.yaml
  100:1     error    trailing spaces  (trailing-spaces)
  102:1     error    trailing spaces  (trailing-spaces)

can you please fix this?

vinamra28 avatar Feb 24 '22 18:02 vinamra28

/lgtm cancel @sbose78 can you fix the yamllint ?

vdemeester avatar Feb 25 '22 08:02 vdemeester

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/hadolint/0.1/hadolint.yaml
FILE: task/sonarqube-scanner/0.2/sonarqube-scanner.yaml
WARN : Step "sonar-properties-create" references "$(params.SONAR_HOST_URL)" directly from its script block. For reliability and security, consider putting the param into an environment variable of the Step and accessing that environment variable in your script instead.
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 4:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

WARN : step: hadolint is not using #!/usr/bin/env 
ERROR: /usr/bin/shellcheck, [-s bash] failed:

In hadolint-lint-dockerfile line 5:
  IFS="," read -a RULES <<< "$RULES"
          ^--^ SC2162: read without -r will mangle backslashes.


In hadolint-lint-dockerfile line 6:
  for rule in ${RULES[@]}; do ignore_rules="--ignore $rule $ignore_rules"; done
              ^---------^ SC2068: Double quote array expansions to avoid re-splitting elements.

For more information:
  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
  https://www.shellcheck.net/wiki/SC2162 -- read without -r will mangle backs...

ERROR: /usr/bin/shellcheck, [-s bash] failed:

In sonarqube-scanner-sonar-properties-create line 8:
  if ! grep -R "^[#]*\s*${thekey}=.*" $filename >/dev/null; then
                                      ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  if ! grep -R "^[#]*\s*${thekey}=.*" "$filename" >/dev/null; then


In sonarqube-scanner-sonar-properties-create line 10:
    echo "" >>$filename
              ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "" >>"$filename"


In sonarqube-scanner-sonar-properties-create line 11:
    echo "$thekey=$newvalue" >>$filename
                               ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "$thekey=$newvalue" >>"$filename"


In sonarqube-scanner-sonar-properties-create line 14:
    sed -ir "s|^[#]*\s*${thekey}=.*|$thekey=$newvalue|" $filename
                                                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    sed -ir "s|^[#]*\s*${thekey}=.*|$thekey=$newvalue|" "$filename"


In sonarqube-scanner-sonar-properties-create line 20:
  cp -RL $(workspaces.sonar-settings.path)/sonar-project.properties $(workspaces.source.path)/sonar-project.properties
         ^-- SC2046: Quote this to prevent word splitting.
                                                                    ^-----------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 25:
    replaceValues $(workspaces.source.path)/sonar-project.properties sonar.host.url $(params.SONAR_HOST_URL)
                  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                                                    ^----------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 28:
    replaceValues $(workspaces.source.path)/sonar-project.properties sonar.projectKey $(params.SONAR_PROJECT_KEY)
                  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                                                      ^-------------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 32:
  echo "sonar.projectKey=$(params.SONAR_PROJECT_KEY)" >> sonar-project.properties
  ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects.


In sonarqube-scanner-sonar-properties-create line 38:
cat $(workspaces.source.path)/sonar-project.properties
    ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...

tekton-robot avatar Feb 25 '22 08:02 tekton-robot

can you fix the yamllint ?

On it 🗡️

( been really trying hard 😥 )

sbose78 avatar Mar 03 '22 05:03 sbose78

Catlin Output
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/hadolint/0.1/hadolint.yaml
FILE: task/sonarqube-scanner/0.2/sonarqube-scanner.yaml
WARN : Step "sonar-properties-create" references "$(params.SONAR_HOST_URL)" directly from its script block. For reliability and security, consider putting the param into an environment variable of the Step and accessing that environment variable in your script instead.
Catlin script lint Output
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC2039: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 3:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

WARN : step: hadolint is not using #!/usr/bin/env 
ERROR: /usr/bin/shellcheck, [-s bash] failed:

In hadolint-lint-dockerfile line 5:
  IFS="," read -a RULES <<< "$RULES"
          ^--^ SC2162: read without -r will mangle backslashes.


In hadolint-lint-dockerfile line 6:
  for rule in ${RULES[@]}; do ignore_rules="--ignore $rule $ignore_rules"; done
              ^---------^ SC2068: Double quote array expansions to avoid re-splitting elements.

For more information:
  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
  https://www.shellcheck.net/wiki/SC2162 -- read without -r will mangle backs...

ERROR: /usr/bin/shellcheck, [-s bash] failed:

In sonarqube-scanner-sonar-properties-create line 8:
  if ! grep -R "^[#]*\s*${thekey}=.*" $filename >/dev/null; then
                                      ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
  if ! grep -R "^[#]*\s*${thekey}=.*" "$filename" >/dev/null; then


In sonarqube-scanner-sonar-properties-create line 10:
    echo "" >>$filename
              ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "" >>"$filename"


In sonarqube-scanner-sonar-properties-create line 11:
    echo "$thekey=$newvalue" >>$filename
                               ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    echo "$thekey=$newvalue" >>"$filename"


In sonarqube-scanner-sonar-properties-create line 14:
    sed -ir "s|^[#]*\s*${thekey}=.*|$thekey=$newvalue|" $filename
                                                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    sed -ir "s|^[#]*\s*${thekey}=.*|$thekey=$newvalue|" "$filename"


In sonarqube-scanner-sonar-properties-create line 20:
  cp -RL $(workspaces.sonar-settings.path)/sonar-project.properties $(workspaces.source.path)/sonar-project.properties
         ^-- SC2046: Quote this to prevent word splitting.
                                                                    ^-----------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 25:
    replaceValues $(workspaces.source.path)/sonar-project.properties sonar.host.url $(params.SONAR_HOST_URL)
                  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                                                    ^----------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 28:
    replaceValues $(workspaces.source.path)/sonar-project.properties sonar.projectKey $(params.SONAR_PROJECT_KEY)
                  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                                                      ^-------------------------^ SC2046: Quote this to prevent word splitting.


In sonarqube-scanner-sonar-properties-create line 32:
  echo "sonar.projectKey=$(params.SONAR_PROJECT_KEY)" >> sonar-project.properties
  ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects.


In sonarqube-scanner-sonar-properties-create line 38:
cat $(workspaces.source.path)/sonar-project.properties
    ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...

tekton-robot avatar Mar 03 '22 06:03 tekton-robot

@sbose78 thanks for fixing this :bow: Lastly can you please squash all the commits and then we can merge this?

vinamra28 avatar Mar 03 '22 06:03 vinamra28

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Jun 01 '22 06:06 tekton-robot

Catlin Output
FILE: task/ansible-builder/0.1/ansible-builder.yaml
WARN : Step "ansible-builder-create" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/github-set-status/0.4/github-set-status.yaml
WARN : Step "set-status" uses image "$(params.IMAGE)" that contains variables; skipping validation
Catlin script lint Output
WARN : step: ansible-builder is not using #!/usr/bin/env 
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC3010: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC3010 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC3010: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC3010: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC3010 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 3:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

WARN : step: github-set-status is not using #!/usr/bin/env 

tekton-robot avatar Jun 01 '22 06:06 tekton-robot

/remove-lifecycle stale ping @sbose78

vdemeester avatar Jun 01 '22 08:06 vdemeester

Catlin Output
FILE: task/ansible-builder/0.1/ansible-builder.yaml
WARN : Step "ansible-builder-create" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/buildah/0.3/buildah.yaml
HINT : Task: tekton.dev/v1beta1 - name: "buildah" is missing a readable display name annotation("tekton.dev/displayName")
WARN : Step "build" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "push" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
WARN : Step "digest-to-results" uses image "$(params.BUILDER_IMAGE)" that contains variables; skipping validation
FILE: task/github-set-status/0.4/github-set-status.yaml
WARN : Step "set-status" uses image "$(params.IMAGE)" that contains variables; skipping validation
Catlin script lint Output
WARN : step: ansible-builder is not using #!/usr/bin/env 
ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-build line 2:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC3010: In POSIX sh, [[ ]] is undefined.


In buildah-build line 3:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) bud \


In buildah-build line 4:
  $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) \
  ^------------------------^ SC2046: Quote this to prevent word splitting.
                                      ^--------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 5:
  --tls-verify=$(params.TLSVERIFY) --no-cache \
               ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 6:
  -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)
     ^------------------^ SC2046: Quote this to prevent word splitting.
                             ^-------------^ SC2046: Quote this to prevent word splitting.
                                             ^---------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC3010 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-push line 2:
[[ "$(params.SKIP_PUSH)" == "true" ]] && echo "Push skipped" && exit 0
^-- SC3010: In POSIX sh, [[ ]] is undefined.


In buildah-push line 3:
[[ "$(workspaces.sslcertdir.bound)" == "true" ]] && CERT_DIR_FLAG="--cert-dir $(workspaces.sslcertdir.path)"
^-- SC3010: In POSIX sh, [[ ]] is undefined.


In buildah-push line 4:
buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) push \
        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^----------------------^ SC2046: Quote this to prevent word splitting.

Did you mean: 
buildah "${CERT_DIR_FLAG}" --storage-driver=$(params.STORAGE_DRIVER) push \


In buildah-push line 5:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 6:
  --digestfile $(workspaces.source.path)/image-digest $(params.IMAGE) \
               ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                                      ^-------------^ SC2046: Quote this to prevent word splitting.


In buildah-push line 7:
  docker://$(params.IMAGE)
           ^-------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC3010 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

ERROR: /usr/bin/shellcheck, [-s sh] failed:

In buildah-digest-to-results line 2:
cat "$(workspaces.source.path)"/image-digest | tee $(results.IMAGE_DIGEST.path)
    ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
                                                   ^--------------------------^ SC2046: Quote this to prevent word splitting.


In buildah-digest-to-results line 3:
echo "$(params.IMAGE)" | tee $(results.IMAGE_URL.path)
     ^---------------^ SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
                             ^-----------------------^ SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2002 -- Useless cat. Consider 'cmd < file...
  https://www.shellcheck.net/wiki/SC2005 -- Useless echo? Instead of 'echo $(...

WARN : step: github-set-status is not using #!/usr/bin/env 

tekton-robot avatar Jun 01 '22 08:06 tekton-robot

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Aug 30 '22 09:08 tekton-robot

@vdemeester should we close this PR as this is now addressed in latest version of buildah?

vinamra28 avatar Oct 08 '22 08:10 vinamra28

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Nov 07 '22 09:11 tekton-robot

@vinamra28 yep.

vdemeester avatar Nov 07 '22 09:11 vdemeester