diff --git a/Makefile b/Makefile index 58ef889b9..195cd3a61 100644 --- a/Makefile +++ b/Makefile @@ -154,8 +154,7 @@ LICENSE_IGNORE=\ -ignore 'configs/*/*.yaml' \ -ignore 'node_modules/**' \ -ignore 'hack/**/charts/**' \ --ignore '.tekton/ec-cli-pull-request.yaml' \ --ignore '.tekton/ec-cli-push.yaml' +-ignore '.tekton/*.yaml' LINT_TO_GITHUB_ANNOTATIONS='map(map(.)[])[][] as $$d | $$d.posn | split(":") as $$posn | "::warning file=\($$posn[0]),line=\($$posn[1]),col=\($$posn[2])::\($$d.message)"' diff --git a/hack/cut-release.sh b/hack/cut-release.sh new file mode 100755 index 000000000..45dfa23b9 --- /dev/null +++ b/hack/cut-release.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +# Copyright The Enterprise Contract Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +set -o errexit +set -o nounset +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 +fi + +RELEASE_NAME=${1:-""} +if [[ $RELEASE_NAME == "" ]]; then + echo "Please provide a release name, e.g. v0.1-tech-preview, or v1.1" + exit 1 +fi + +# Use release name as-is for the branch name +BRANCH_NAME="${RELEASE_NAME}" + +# RHTAP disallows . chars in names so remove those +RHTAP_APPLICATION_SUFFIX="${RELEASE_NAME/./}" + +# Could be whatever, but let's adopt a consistent convention +RHTAP_APPLICATION_NAME=ec-${RHTAP_APPLICATION_SUFFIX} +RHTAP_CLI_COMPONENT_NAME=cli-${RHTAP_APPLICATION_SUFFIX} + +# Show some useful values +echo Release name: $RELEASE_NAME +echo Release branch name: $BRANCH_NAME +echo RHTAP application name: $RHTAP_APPLICATION_NAME +echo RHTAP cli component name: $RHTAP_CLI_COMPONENT_NAME + +RHTAP_APPS_URL=https://console.redhat.com/preview/application-pipeline/workspaces/rhtap-contract/applications + +# Explain what needs to be done next +# (We could make this more automated this in future.) +cat <