Skip to content

Commit

Permalink
Merge pull request #59 from redhat-appstudio/selfupdate/import-build-…
Browse files Browse the repository at this point in the history
…definitions

Sync build-definitions
  • Loading branch information
openshift-merge-bot[bot] authored Sep 27, 2024
2 parents b3db9d1 + 116adf7 commit aa09931
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pac/pipelines/docker-build-rhtap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ spec:
name: acs-deploy-check
when:
- input: $(params.event-type)
operator: notin
operator: in
values:
- pull_request
- Merge Request
- push
- Push
- name: update-deployment
params:
- name: gitops-repo-url
Expand Down
10 changes: 10 additions & 0 deletions pac/tasks/git-clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ spec:
description: Perform a shallow clone, fetching only the most recent N commits.
name: depth
type: string
- name: shortCommitLength
description: Length of short commit SHA
type: string
default: "7"
- default: "true"
description: Set the `http.sslVerify` global git config. Setting this to `false` is not advised unless you are sure that you trust your git remote.
name: sslVerify
Expand Down Expand Up @@ -94,6 +98,8 @@ spec:
results:
- description: The precise commit SHA that was fetched by this Task.
name: commit
- description: The commit SHA that was fetched by this Task limited to params.shortCommitLength number of characters
name: short-commit
- description: The precise URL that was fetched by this Task.
name: url
- description: The commit timestamp of the checkout
Expand All @@ -113,6 +119,8 @@ spec:
value: $(params.submodules)
- name: PARAM_DEPTH
value: $(params.depth)
- name: PARAM_SHORT_COMMIT_LENGTH
value: $(params.shortCommitLength)
- name: PARAM_SSL_VERIFY
value: $(params.sslVerify)
- name: PARAM_SUBDIRECTORY
Expand Down Expand Up @@ -231,11 +239,13 @@ spec:
-sparseCheckoutDirectories="${PARAM_SPARSE_CHECKOUT_DIRECTORIES}"
cd "${CHECKOUT_DIR}"
RESULT_SHA="$(git rev-parse HEAD)"
RESULT_SHA_SHORT="$(git rev-parse --short="${PARAM_SHORT_COMMIT_LENGTH}" HEAD)"
EXIT_CODE="$?"
if [ "${EXIT_CODE}" != 0 ] ; then
exit "${EXIT_CODE}"
fi
printf "%s" "${RESULT_SHA}" > "$(results.commit.path)"
printf "%s" "${RESULT_SHA_SHORT}" > "$(results.short-commit.path)"
printf "%s" "${PARAM_URL}" > "$(results.url.path)"
printf "%s" "$(git log -1 --pretty=%ct)" > "$(results.commit-timestamp.path)"
Expand Down

0 comments on commit aa09931

Please sign in to comment.