Make tag process optional. True by default.
Example scenario:
Some ONAP projects make both maven and docker releases
for a single repo. Docker releases depend on maven releases.
This means that the team needs to make a maven release first,
then make a docker release and lastly, tag the repo.
This change will allow them to hold the tagging part during
maven releases to allow them to tag after the docker release is made.
Issue: RELENG-2835
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Change-Id: Ibd206269b80e7fb788682a81e038aa74d9eaf97c
:git_tag: The tag string to sign and push to the Git repository.
(default: the semantic version string)
+ :tag_release: Tag Gerrit Repo during the release process.
+ (default: true)
The JSON schema for a maven release file appears below.
:git_tag: The tag string to sign and push to the Git repository.
(default: the semantic version string)
+ :tag_release: Tag Gerrit Repo during the release process.
+ (default: true)
The JSON schema for a container release file appears below.
:git_tag: The tag string to sign and push to the Git repository.
(default: the semantic version string)
+ :tag_release: Tag Gerrit Repo during the release process.
+ (default: true)
The JSON schema for a PyPI release file appears below.
:git_tag: The tag string to sign and push to the Git repository.
(default: the semantic version string)
+ :tag_release: Tag Gerrit Repo during the release process.
+ (default: true)
The JSON schema for a PackageCloud release file appears below.
stream: "$GERRIT_BRANCH"
- lf-build-with-parameters-maven-release:
use-release-file: "{use-release-file}"
+ - bool:
+ name: TAG_RELEASE
+ default: true
+ description: |
+ Tag Gerrit repo after release.
- bool:
name: DRY_RUN
default: false
name: USE_RELEASE_FILE
default: true
description: "Set to False (unchecked) to build with parameters"
+ - bool:
+ name: TAG_RELEASE
+ default: true
+ description: |
+ Tag Gerrit repo after release.
- bool:
name: DRY_RUN
default: false
name: DISTRIBUTION_TYPE
default: "packagecloud"
description: "The Jenkins release job distribution type."
+ - bool:
+ name: TAG_RELEASE
+ default: true
+ description: |
+ Tag Gerrit repo after release.
- bool:
name: DRY_RUN
default: false
--- /dev/null
+---
+features:
+ - |
+ Optionally tag repo during release process. Set to true by default.
+ Allow projects to skip repo tag in cases where multiple release
+ types happen whithin the same repo.
type: "string"
ref:
type: "string"
+ tag_release:
+ type: "bool"
type: "string"
log_dir:
type: "string"
+ tag_release:
+ type: "bool"
version:
type: "string"
type: "string"
python_version:
type: "string"
+ tag_release:
+ type: "bool"
version:
type: "string"
type: "string"
project:
type: "string"
+ tag_release:
+ type: "bool"
version:
type: "string"
PATCH_DIR=$(mktemp -d)
+ TAG_RELEASE="${TAG_RELEASE:-None}"
+ if [[ $TAG_RELEASE == "None" ]]; then
+ if grep -q "tag_release" $release_file ; then
+ TAG_RELEASE=$(yq -r .tag_release "$release_file")
+ else
+ TAG_RELEASE=true
+ fi
+ fi
+
# Displaying Release Information (Common variables)
printf "\t%-30s\n" RELEASE_ENVIRONMENT_INFO:
printf "\t%-30s %s\n" RELEASE_FILE: "$release_file"
printf "\t%-30s %s\n" SILO: "$SILO"
printf "\t%-30s %s\n" PROJECT: "$PROJECT"
printf "\t%-30s %s\n" PROJECT-DASHED: "${PROJECT//\//-}"
+ printf "\t%-30s %s\n" TAG_RELEASE: "$TAG_RELEASE"
printf "\t%-30s %s\n" DISTRIBUTION_TYPE: "$DISTRIBUTION_TYPE"
}
# sigul is only available on Centos
# TODO: write tag-github-repo function
tag-gerrit-repo(){
+ if [[ $TAG_RELEASE == false ]]; then
+ echo "INFO: Skipping gerrit repo tag"
+ return
+ fi
+
echo "INFO: tag gerrit with $GIT_TAG"
# Import public signing key
gpg --import "$SIGNING_PUBKEY"