diff --git a/.tekton/cli-main-ci-pull-request.yaml b/.tekton/cli-main-ci-pull-request.yaml index aaff35fcb..b73775f36 100644 --- a/.tekton/cli-main-ci-pull-request.yaml +++ b/.tekton/cli-main-ci-pull-request.yaml @@ -100,6 +100,14 @@ spec: description: Build a source image. name: build-source-image type: string + - default: [] + description: Array of --build-arg values ("arg=value" strings) for buildah + name: build-args + type: array + - default: "" + description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file + name: build-args-file + type: string results: - description: "" name: IMAGE_URL @@ -188,6 +196,14 @@ spec: - name: kind value: task resolver: bundles + when: + - input: $(params.prefetch-input) + operator: notin + values: + - "" + workspaces: + - name: git-basic-auth + workspace: git-auth - name: build-container params: - name: IMAGE @@ -204,6 +220,9 @@ spec: value: $(params.image-expires-after) - name: COMMIT_SHA value: $(tasks.clone-repository.results.commit) + - name: BUILD_ARGS + value: + - $(params.build-args[*]) - name: BUILD_ARGS_FILE value: "$(params.build-args-file)" - name: SOURCE_ARTIFACT @@ -386,6 +405,21 @@ spec: operator: in values: - "false" + - name: apply-tags + params: + - name: IMAGE + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + params: + - name: name + value: apply-tags + - name: bundle + value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:175162b0a1c55e911d0d25ddef97e90932b5043f0b523cf83ed4824363840d74 + - name: kind + value: task + resolver: bundles workspaces: - name: git-auth optional: true diff --git a/.tekton/cli-main-ci-push.yaml b/.tekton/cli-main-ci-push.yaml index 1e1b3ad94..449b3842f 100644 --- a/.tekton/cli-main-ci-push.yaml +++ b/.tekton/cli-main-ci-push.yaml @@ -99,6 +99,14 @@ spec: description: Build a source image. name: build-source-image type: string + - default: [] + description: Array of --build-arg values ("arg=value" strings) for buildah + name: build-args + type: array + - default: "" + description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file + name: build-args-file + type: string results: - description: "" name: IMAGE_URL @@ -187,6 +195,14 @@ spec: - name: kind value: task resolver: bundles + when: + - input: $(params.prefetch-input) + operator: notin + values: + - "" + workspaces: + - name: git-basic-auth + workspace: git-auth - name: build-container params: - name: IMAGE @@ -203,6 +219,9 @@ spec: value: $(params.image-expires-after) - name: COMMIT_SHA value: $(tasks.clone-repository.results.commit) + - name: BUILD_ARGS + value: + - $(params.build-args[*]) - name: BUILD_ARGS_FILE value: "$(params.build-args-file)" - name: SOURCE_ARTIFACT @@ -385,6 +404,21 @@ spec: operator: in values: - "false" + - name: apply-tags + params: + - name: IMAGE + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + params: + - name: name + value: apply-tags + - name: bundle + value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:175162b0a1c55e911d0d25ddef97e90932b5043f0b523cf83ed4824363840d74 + - name: kind + value: task + resolver: bundles workspaces: - name: git-auth optional: true diff --git a/hack/cut-release.sh b/hack/cut-release.sh index b5b59e143..053a80927 100755 --- a/hack/cut-release.sh +++ b/hack/cut-release.sh @@ -21,14 +21,14 @@ set -o pipefail CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) if [[ $CURRENT_BRANCH != "main" ]]; then - echo "Expecting to be in main branch!" - exit 1 + echo "Expecting to be in main branch!" + exit 1 fi RELEASE_NAME="v$(cat VERSION)" if [[ $RELEASE_NAME != *.* || $RELEASE_NAME == *.*.* ]]; then - echo "Release name should include one dot, e.g. v0.1-tech-preview, or v1.1" - exit 1 + echo "Release name should include one dot, e.g. v0.5 or v1.1-candidate" + exit 1 fi # Use release name as-is for the branch name @@ -49,70 +49,98 @@ echo Konflux cli component name: $KONFLUX_CLI_COMPONENT_NAME KONFLUX_APPS_URL=https://console.redhat.com/preview/application-pipeline/workspaces/rhtap-contract/applications +nice_title() { + echo -e "\033[1m» $*\033[0m" +} + # Explain what needs to be done next +# This is like slightly interactive documentation. # (We could make this more automated in future.) -cat <