catalog icon indicating copy to clipboard operation
catalog copied to clipboard

Adding the Cerberus-check task into catalog

Open startxfr opened this issue 2 years ago • 19 comments

Changes

  • Add cerberus task to check for a cerberus positive signal

Submitter Checklist

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


startxfr avatar Jun 24 '22 12:06 startxfr

Hi @startxfr. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tekton-robot avatar Jun 24 '22 12:06 tekton-robot

split PR https://github.com/tektoncd/catalog/pull/999

startxfr avatar Jun 24 '22 13:06 startxfr

@vdemeester i've followed your advices and split each task into it's own commit and this one is for the cerberus watchdog task. @vinamra28 do you need anything else to validate this PR ? Do you think it's valuable to the community ?

startxfr avatar Jun 24 '22 13:06 startxfr

Catlin Output
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation

tekton-robot avatar Jun 26 '22 11:06 tekton-robot

@vinamra28 @vdemeester : I still see a 'do-not-merge/invalid-owners-file'. I've done the easyCLA and tekton org addition. Is there anything else i need to do validate the ownership of the files ?

startxfr avatar Jun 30 '22 15:06 startxfr

Catlin Output
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation
FILE: task/git-clone/0.7/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation

tekton-robot avatar Jun 30 '22 15:06 tekton-robot

Catlin Output
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation
FILE: task/git-clone/0.7/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation

tekton-robot avatar Jun 30 '22 15:06 tekton-robot

Catlin Output
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation
FILE: task/git-clone/0.7/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation

tekton-robot avatar Jun 30 '22 17:06 tekton-robot

New changes are detected. LGTM label has been removed.

tekton-robot avatar Jul 01 '22 21:07 tekton-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please ask for approval from vinamra28 after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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 Jul 01 '22 21:07 tekton-robot

Catlin Output
FILE: task/buildah/0.4/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
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation
FILE: task/git-clone/0.7/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" 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)"
^-- 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.


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


In buildah-build line 8:
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-build line 9:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 10:
  --digestfile /tmp/image-digest $(params.IMAGE) \
                                 ^-------------^ SC2046: Quote this to prevent word splitting.


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


In buildah-build line 12:
cat /tmp/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-build line 13:
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/SC3010 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

tekton-robot avatar Jul 01 '22 21:07 tekton-robot

Catlin Output
FILE: task/buildah/0.4/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
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation
FILE: task/git-clone/0.7/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" 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)"
^-- 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.


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


In buildah-build line 8:
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-build line 9:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 10:
  --digestfile /tmp/image-digest $(params.IMAGE) \
                                 ^-------------^ SC2046: Quote this to prevent word splitting.


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


In buildah-build line 12:
cat /tmp/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-build line 13:
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/SC3010 -- In POSIX sh, [[ ]] is undefined.
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

tekton-robot avatar Jul 01 '22 21:07 tekton-robot

@startxfr overall PR looks fine. Can you please squash the commits and then we can go ahead with merging this? /lgtm

I merged change from the upstream and it removed your LGTM. I don't want to make bad branching actions. Can you tel me how to correctly squash the commits ? thanks for your help.

startxfr avatar Jul 01 '22 21:07 startxfr

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/argocd-task-connect-repo/0.1/argocd-task-connect-repo.yaml
WARN : Step "connect-repo" uses image "quay.io/argoproj/argocd:$(params.argocd-version)" that contains variables; skipping validation
FILE: task/buildah/0.4/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
FILE: task/cerberus-check/0.1/cerberus-check.yaml
WARN : Step "" uses image "$(params.image)" that contains variables; skipping validation
FILE: task/datree/0.1/datree.yaml
WARN : Step "datree-test" uses image "$(params.datreeImage)" that contains variables; skipping validation
FILE: task/git-clone/0.7/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" 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.


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


In buildah-build line 8:
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-build line 9:
  $(params.PUSH_EXTRA_ARGS) --tls-verify=$(params.TLSVERIFY) \
  ^-----------------------^ SC2046: Quote this to prevent word splitting.
                                         ^-----------------^ SC2046: Quote this to prevent word splitting.


In buildah-build line 10:
  --digestfile /tmp/image-digest $(params.IMAGE) \
                                 ^-------------^ SC2046: Quote this to prevent word splitting.


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


In buildah-build line 12:
cat /tmp/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-build line 13:
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/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 datree-datree-test line 27:
/datree test $WORKSPACE_PATH/$PARAM_YAMLSRC $OUTPUT_FLAG $SCHEMA_VERSION_FLAG $IGNORE_MISSING_SCHEMAS_FLAG $POLICY_FLAG $K8S_FLAG
             ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                             ^------------^ SC2086: Double quote to prevent globbing and word splitting.
                                            ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                         ^------------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                           ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
/datree test "$WORKSPACE_PATH"/"$PARAM_YAMLSRC" "$OUTPUT_FLAG" "$SCHEMA_VERSION_FLAG" $IGNORE_MISSING_SCHEMAS_FLAG "$POLICY_FLAG" $K8S_FLAG

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

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

tekton-robot avatar Jul 01 '22 23:07 tekton-robot

@startxfr probably you can refer to the article https://www.baeldung.com/ops/git-squash-commits

vinamra28 avatar Jul 04 '22 02:07 vinamra28

@startxfr probably you can refer to the article https://www.baeldung.com/ops/git-squash-commits

Is this commit a good squash ? https://github.com/tektoncd/catalog/pull/1004/commits/60091b534c757d4caa602b80e0510f8b4559822d

startxfr avatar Jul 04 '22 11:07 startxfr

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 Oct 02 '22 12:10 tekton-robot

@startxfr probably you can refer to the article https://www.baeldung.com/ops/git-squash-commits

Is this commit a good squash ? 60091b5

@startxfr actually squashing of commits means merging all the commits into a single commit.

vinamra28 avatar Oct 08 '22 06:10 vinamra28

/remove-lifecycle stale

vinamra28 avatar Oct 08 '22 06:10 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 Jan 06 '23 07:01 tekton-robot

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 Feb 05 '23 07:02 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar Mar 07 '23 07:03 tekton-robot

@tekton-robot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tekton-robot avatar Mar 07 '23 07:03 tekton-robot