From c83c24adcaa5d58921a3a8c7eb00915372dbde82 Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Mon, 11 Dec 2023 13:59:46 -0500 Subject: [PATCH 1/2] Adjust license lint ignore var in Makefile Ignore all the TAP pipelines for license preamble checking, not just the one specific one. --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)"' From e45bc08c8d23014cc95cb30f6d0c85a8435cdd22 Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Fri, 8 Dec 2023 18:16:02 -0500 Subject: [PATCH 2/2] Add bash script to help fork a release branch As mentioned in the comments, we could make this more automated in future. For now it's mostly a set of instructions for the human. The key part is to establish the procedure and the naming conventions. --- hack/cut-release.sh | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 hack/cut-release.sh 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 <