Merge "Add conditional block for s3"
[releng/global-jjb.git] / shell / release-job.sh
1 #!/bin/bash -l
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2019 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> release-job.sh"
12 set -eu -o pipefail
13
14 echo "INFO: creating virtual environment"
15 virtualenv -p python3 /tmp/venv
16 PATH=/tmp/venv/bin:$PATH
17 pipup="python -m pip install -q --upgrade pip idna==2.8 lftools jsonschema niet twine yq"
18 echo "INFO: $pipup"
19 $pipup
20 # show installed versions
21 python -m pip --version
22 python -m pip freeze
23
24 #Functions.
25
26 set_variables_common(){
27     echo "INFO: Setting common variables"
28     if [[ -z ${LOGS_SERVER:-} ]]; then
29         echo "ERROR: LOGS_SERVER not defined"
30         exit 1
31     fi
32     NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/"
33     # Verify if using release file or parameters
34     if $USE_RELEASE_FILE ; then
35         release_files=$(git diff-tree -m --no-commit-id -r "$GIT_COMMIT" "$GIT_COMMIT^1" \
36             --name-only -- "releases/" ".releases/")
37         if (( $(grep -c . <<<"$release_files") > 1 )); then
38           echo "INFO: RELEASE FILES ARE AS FOLLOWS: $release_files"
39           echo "ERROR: Adding multiple release files in the same commit"
40           echo "ERROR: OR rename/amend/delete of existing files is not supported."
41           exit 1
42         else
43           release_file="$release_files"
44           echo "INFO: RELEASE FILE: $release_files"
45         fi
46     else
47         echo "INFO: This job is built with parameters, no release file needed."
48         release_file="None"
49     fi
50
51     # Jenkins parameter drop-down defaults DISTRIBUTION_TYPE to None
52     # in the contain/maven release job; get value from release yaml.
53     # Packagecloud and PyPI jobs set the appropriate value.
54     DISTRIBUTION_TYPE="${DISTRIBUTION_TYPE:-None}"
55     if [[ $DISTRIBUTION_TYPE == "None" ]]; then
56         if ! DISTRIBUTION_TYPE=$(niet ".distribution_type" "$release_file"); then
57             echo "ERROR: Failed to get distribution_type from $release_file"
58             exit 1
59         fi
60     fi
61
62     PATCH_DIR=$(mktemp -d)
63
64     # Displaying Release Information (Common variables)
65     printf "\t%-30s\n" RELEASE_ENVIRONMENT_INFO:
66     printf "\t%-30s %s\n" RELEASE_FILE: "$release_file"
67     printf "\t%-30s %s\n" LOGS_SERVER: "$LOGS_SERVER"
68     printf "\t%-30s %s\n" NEXUS_PATH: "$NEXUS_PATH"
69     printf "\t%-30s %s\n" JENKINS_HOSTNAME: "$JENKINS_HOSTNAME"
70     printf "\t%-30s %s\n" SILO: "$SILO"
71     printf "\t%-30s %s\n" PROJECT: "$PROJECT"
72     printf "\t%-30s %s\n" PROJECT-DASHED: "${PROJECT//\//-}"
73     printf "\t%-30s %s\n" DISTRIBUTION_TYPE: "$DISTRIBUTION_TYPE"
74 }
75
76 set_variables_maven(){
77     echo "INFO: Setting maven variables"
78     if [[ -z ${VERSION:-} ]]; then
79         VERSION=$(niet ".version" "$release_file")
80     fi
81     if [[ -z ${GIT_TAG:-} ]]; then
82         if grep -q "git_tag" "$release_file" ; then
83             GIT_TAG=$(niet ".git_tag" "$release_file")
84         else
85             GIT_TAG="$VERSION"
86         fi
87     fi
88     if [[ -z ${LOG_DIR:-} ]]; then
89         LOG_DIR=$(niet ".log_dir" "$release_file")
90     fi
91     LOGS_URL="${LOGS_SERVER}/${NEXUS_PATH}${LOG_DIR}"
92     LOGS_URL=${LOGS_URL%/}  # strip any trailing '/'
93
94     # Continuing displaying Release Information (Maven)
95     printf "\t%-30s\n" RELEASE_MAVEN_INFO:
96     printf "\t%-30s %s\n" VERSION: "$VERSION"
97     printf "\t%-30s %s\n" GIT_TAG: "$GIT_TAG"
98     printf "\t%-30s %s\n" LOG_DIR: "$LOG_DIR"
99     printf "\t%-30s %s\n" LOGS_URL: "$LOGS_URL"
100 }
101
102 set_variables_container(){
103     echo "INFO: Setting container variables"
104     if [[ -z ${VERSION:-} ]]; then
105         VERSION=$(niet ".container_release_tag" "$release_file")
106     fi
107     if [[ -z ${GIT_TAG:-} ]]; then
108         if grep -q "git_tag" "$release_file" ; then
109             GIT_TAG=$(niet ".git_tag" "$release_file")
110         else
111             GIT_TAG="$VERSION"
112         fi
113    fi
114     if grep -q "container_pull_registry" "$release_file" ; then
115         CONTAINER_PULL_REGISTRY=$(niet ".container_pull_registry" "$release_file")
116     fi
117     if grep -q "container_push_registry" "$release_file" ; then
118         CONTAINER_PUSH_REGISTRY=$(niet ".container_push_registry" "$release_file")
119     fi
120     # Make sure both pull and push registries are defined
121     if [ -z ${CONTAINER_PULL_REGISTRY+x} ] || [ -z ${CONTAINER_PUSH_REGISTRY+x} ]; then
122         echo "ERROR: CONTAINER_PULL_REGISTRY and CONTAINER_PUSH_REGISTRY need to be defined"
123         exit 1
124     fi
125     ref=$(niet ".ref" "$release_file")
126
127     # Continuing displaying Release Information (Container)
128     printf "\t%-30s\n" RELEASE_CONTAINER_INFO:
129     printf "\t%-30s %s\n" CONTAINER_RELEASE_TAG: "$VERSION"
130     printf "\t%-30s %s\n" CONTAINER_PULL_REGISTRY: "$CONTAINER_PULL_REGISTRY"
131     printf "\t%-30s %s\n" CONTAINER_PUSH_REGISTRY: "$CONTAINER_PUSH_REGISTRY"
132     printf "\t%-30s %s\n" GERRIT_REF_TO_TAG: "$ref"
133     printf "\t%-30s %s\n" GIT_TAG: "$GIT_TAG"
134 }
135
136 set_variables_pypi(){
137     echo "INFO: Setting pypi variables"
138     if [[ -z ${LOG_DIR:-} ]]; then
139         LOG_DIR=$(niet ".log_dir" "$release_file")
140     fi
141     LOGS_URL="${LOGS_SERVER}/${NEXUS_PATH}${LOG_DIR}"
142     LOGS_URL=${LOGS_URL%/}  # strip any trailing '/'
143     if [[ -z ${PYPI_PROJECT:-} ]]; then
144         PYPI_PROJECT=$(niet ".pypi_project" "$release_file")
145     fi
146     if [[ -z ${PYTHON_VERSION:-} ]]; then
147         PYTHON_VERSION=$(niet ".python_version" "$release_file")
148     fi
149     if [[ -z ${VERSION:-} ]]; then
150         VERSION=$(niet ".version" "$release_file")
151     fi
152     if [[ -z ${GIT_TAG:-} ]]; then
153         if grep -q "git_tag" "$release_file" ; then
154             GIT_TAG=$(niet ".git_tag" "$release_file")
155         else
156             GIT_TAG="$VERSION"
157         fi
158    fi
159
160     # Continuing displaying Release Information (pypi)
161     printf "\t%-30s\n" RELEASE_PYPI_INFO:
162     printf "\t%-30s %s\n" LOG_DIR: "$LOG_DIR"
163     printf "\t%-30s %s\n" LOGS_URL: "$LOGS_URL"
164     printf "\t%-30s %s\n" PYPI_INDEX: "$PYPI_INDEX" # from job configuration
165     printf "\t%-30s %s\n" PYPI_PROJECT: "$PYPI_PROJECT"
166     printf "\t%-30s %s\n" PYTHON_VERSION: "$PYTHON_VERSION"
167     printf "\t%-30s %s\n" VERSION: "$VERSION"
168     printf "\t%-30s %s\n" GIT_TAG: "$GIT_TAG"
169 }
170
171 set_variables_packagecloud(){
172      echo "INFO: Setting packagecloud variables"
173      if [[ -z ${VERSION:-} ]]; then
174          VERSION=$(niet ".version" "$release_file")
175      fi
176      if [[ -z ${GIT_TAG:-} ]]; then
177          if grep -q "git_tag" $release_file ; then
178              GIT_TAG=$(niet ".git_tag" "$release_file")
179          else
180              GIT_TAG="$VERSION"
181          fi
182      fi
183      if [[ -z ${LOG_DIR:-} ]]; then
184          LOG_DIR=$(niet ".log_dir" "$release_file")
185      fi
186      if [[ -z ${REF:-} ]]; then
187          REF=$(niet ".ref" "$release_file")
188      fi
189      if [[ -z ${PACKAGE_NAME:-} ]]; then
190          PACKAGE_NAME=$(niet ".package_name" "$release_file")
191      fi
192      logs_url="${LOGS_SERVER}/${NEXUS_PATH}${LOG_DIR}"
193      logs_url=${logs_url%/}  # strip any trailing '/'
194
195      printf "\t%-30s %s\n" PACKAGE_NAME: "$PACKAGE_NAME"
196      printf "\t%-30s %s\n" LOG_DIR: "$LOG_DIR"
197      printf "\t%-30s %s\n" LOGS_URL: "$logs_url"
198      printf "\t%-30s %s\n" GERRIT_REF_TO_TAG: "$REF"
199      printf "\t%-30s %s\n" VERSION: "$VERSION"
200      printf "\t%-30s %s\n" GIT_TAG: "$GIT_TAG"
201 }
202
203 verify_schema(){
204     echo "INFO: Verifying $release_file against schema $release_schema"
205     lftools schema verify "$release_file" "$release_schema"
206 }
207
208 verify_version(){
209     # Verify allowed patterns "#.#.#" (SemVer) or "v#.#.#"
210     echo "INFO: Verifying version $VERSION"
211     allowed_version_regex="^((v?)([0-9]+)\.([0-9]+)\.([0-9]+))$"
212     if [[ $VERSION =~ $allowed_version_regex ]]; then
213         echo "INFO: The version $VERSION is valid"
214     else
215         echo "ERROR: The version $VERSION is not valid"
216         echo "ERROR: Valid versions are \"#.#.#\" (SemVer) or \"v#.#.#\""
217         echo "ERROR: See https://semver.org/ for more details on SemVer"
218         exit 1
219     fi
220 }
221
222 verify_version_match_release(){
223     echo "INFO: Fetching console log from $LOGS_URL"
224     wget -P /tmp "${LOGS_URL}/"console.log.gz
225     echo "INFO: Searching for uploaded step and version $VERSION in job log"
226     if zgrep "Successfully uploaded" /tmp/console.log.gz | grep "$VERSION"; then
227         echo "INFO: found expected strings in job log"
228     else
229         echo "ERROR: Defined version in release file does not match staging repo artifacts version to be released"
230         echo "ERROR: Please make sure maven stage job log dir and release version are both correct"
231         exit 1
232     fi
233 }
234
235 # check prerequisites to detect mistakes in the release YAML file
236 verify_pypi_match_release(){
237     echo "INFO: Fetching console log from $LOGS_URL"
238     wget -q -P /tmp "${LOGS_URL}/"console.log.gz
239     echo "INFO: Searching for uploaded step, project $PYPI_PROJECT and version $VERSION in job log"
240     # pypi-upload.sh generates success message with file list
241     if zgrep -i "uploaded" /tmp/console.log.gz | grep "$PYPI_PROJECT" | grep "$VERSION" ; then
242         echo "INFO: found expected strings in job log"
243     else
244         echo "ERROR: failed to find expected strings in job log"
245         exit 1
246     fi
247 }
248
249 verify_packagecloud_match_release(){
250     echo "INFO: Fetching console log from $logs_url"
251     wget -q -P /tmp "${logs_url}/"console.log.gz
252     echo "INFO: Searching for uploaded step, package name $PACKAGE_NAME and version $VERSION in job log"
253     if  zgrep -E "Pushing.*$PACKAGE_NAME.*$VERSION.*success\!" /tmp/console.log.gz; then
254         echo "INFO: found expected strings in job log"
255     else
256         echo "ERROR: failed to find expected strings in job log"
257         exit 1
258     fi
259 }
260
261 # sigul is only available on Centos
262 # TODO: write tag-github-repo function
263 tag-gerrit-repo(){
264     echo "INFO: tag gerrit with $GIT_TAG"
265     # Import public signing key
266     gpg --import "$SIGNING_PUBKEY"
267     if type=$(git cat-file -t "$GIT_TAG"); then
268         if [[ $type == "tag" ]]; then
269             echo "INFO: Repo already has signed tag $GIT_TAG, nothing to do"
270         else
271             echo "ERROR: Repo has lightweight tag $GIT_TAG, blocks push of signed tag"
272             exit 1
273         fi
274     else
275         echo "INFO: Repo has not yet been tagged $GIT_TAG"
276         git tag -am "${PROJECT//\//-} $GIT_TAG" "$GIT_TAG"
277         sigul --batch -c "$SIGUL_CONFIG" sign-git-tag "$SIGUL_KEY" "$GIT_TAG" < "$SIGUL_PASSWORD"
278         echo "INFO: Showing latest signature for $PROJECT:"
279         echo "INFO: git tag -v $GIT_TAG"
280         git tag -v "$GIT_TAG"
281
282         ########## Merge Part ##############
283         if [[ "$JOB_NAME" =~ "merge" ]] && [[ "$DRY_RUN" = false ]]; then
284             echo "INFO: Running merge, pushing tag"
285             gerrit_ssh=$(echo "$GERRIT_URL" | awk -F"/" '{print $3}')
286             git remote set-url origin ssh://"$RELEASE_USERNAME"@"$gerrit_ssh":29418/"$PROJECT"
287             git config user.name "$RELEASE_USERNAME"
288             git config user.email "$RELEASE_EMAIL"
289             echo -e "Host $gerrit_ssh\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
290             chmod 600 ~/.ssh/config
291             git push origin "$GIT_TAG"
292         fi
293     fi
294 }
295
296 nexus_release(){
297     echo "INFO: Processing nexus release"
298     for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do
299         # extract the domain name from URL
300         NEXUS_URL=$(echo "$staging_url" | sed -e 's|^[^/]*//||' -e 's|/.*$||')
301         echo "INFO: NEXUS_URL: $NEXUS_URL"
302         # extract the staging repo from URL
303         STAGING_REPO=${staging_url#*repositories/}
304         echo "INFO: Running Nexus Verify"
305         lftools nexus release -v --server https://"$NEXUS_URL" "$STAGING_REPO"
306         echo "INFO: Merge will run:"
307         echo "lftools nexus release --server https://$NEXUS_URL $STAGING_REPO"
308     done
309
310     #Run the loop twice, to catch errors on either nexus repo
311     if [[ "$JOB_NAME" =~ "merge" ]] && [[ "$DRY_RUN" = false ]]; then
312         for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do
313           NEXUS_URL=$(echo "$staging_url" | sed -e 's|^[^/]*//||' -e 's|/.*$||')
314           STAGING_REPO=${staging_url#*repositories/}
315           echo "INFO: Promoting $STAGING_REPO on $NEXUS_URL."
316           lftools nexus release --server https://"$NEXUS_URL" "$STAGING_REPO"
317         done
318     fi
319 }
320
321 container_release_file(){
322     echo "INFO: Processing container release"
323     local lfn_umbrella
324     lfn_umbrella="$(echo "$GERRIT_URL" | awk -F"." '{print $2}')"
325
326     for namequoted in $(yq '.containers[].name' $release_file); do
327         versionquoted=$(yq ".containers[] |select(.name==$namequoted) |.version" $release_file)
328
329         #Remove extra yaml quotes
330         name="${namequoted#\"}"
331         name="${name%\"}"
332         version="${versionquoted#\"}"
333         version="${version%\"}"
334
335         echo "$name"
336         echo "$version"
337         echo "INFO: Merge will release $name $version as $VERSION"
338         # Attempt to pull from releases registry to see if the image has been released.
339         if docker pull "$CONTAINER_PUSH_REGISTRY"/"$lfn_umbrella"/"$name":"$VERSION"; then
340             echo "INFO: $VERSION is already released for image $name, Continuing..."
341         else
342             echo "INFO: $VERSION not found in releases, release will be prepared. Continuing..."
343             docker pull "$CONTAINER_PULL_REGISTRY"/"$lfn_umbrella"/"$name":"$version"
344             container_image_id=$(docker images | grep "$name" | grep "$version" | awk '{print $3}')
345             echo "INFO: Merge will run the following commands:"
346             echo "docker tag $container_image_id $CONTAINER_PUSH_REGISTRY/$lfn_umbrella/$name:$VERSION"
347             echo "docker push $CONTAINER_PUSH_REGISTRY/$lfn_umbrella/$name:$VERSION"
348             if [[ "$JOB_NAME" =~ "merge" ]]; then
349                 docker tag "$container_image_id" "$CONTAINER_PUSH_REGISTRY"/"$lfn_umbrella"/"$name":"$VERSION"
350                 docker push "$CONTAINER_PUSH_REGISTRY"/"$lfn_umbrella"/"$name":"$VERSION"
351             fi
352             echo "#########################"
353         fi
354     done
355
356     echo "INFO: Merge will tag ref: $ref"
357     git checkout "$ref"
358     tag-gerrit-repo
359 }
360
361 maven_release_file(){
362     echo "INFO: Processing maven release"
363     echo "INFO: wget -P $PATCH_DIR ${LOGS_URL}/staging-repo.txt.gz"
364     wget -P "$PATCH_DIR" "${LOGS_URL}/"staging-repo.txt.gz
365     pushd "$PATCH_DIR"
366         echo "INFO: wget ${LOGS_URL}/patches/{${PROJECT//\//-}.bundle,taglist.log.gz}"
367         wget "${LOGS_URL}"/patches/{"${PROJECT//\//-}".bundle,taglist.log.gz}
368         gunzip taglist.log.gz
369         cat "$PATCH_DIR"/taglist.log
370     popd
371     git checkout "$(awk '{print $NF}' "$PATCH_DIR/taglist.log")"
372     git fetch "$PATCH_DIR/${PROJECT//\//-}.bundle"
373     git merge --ff-only FETCH_HEAD
374     nexus_release
375     tag-gerrit-repo
376 }
377
378 # calls pip to download binary and source distributions from the specified index,
379 # which requires a recent-in-2019 version.  Uploads the files it received.
380 pypi_release_file(){
381     echo "INFO: Processing pypi release"
382     tgtdir=dist
383     mkdir $tgtdir
384     pip_pfx="pip download -d $tgtdir --no-deps --python-version $PYTHON_VERSION -i $PYPI_INDEX"
385     module="$PYPI_PROJECT==$VERSION"
386     pip_bin="$pip_pfx $module"
387     echo "INFO: downloading binary: $pip_bin"
388     if ! $pip_bin ; then
389         echo "WARN: failed to download binary distribution"
390     fi
391     pip_src="$pip_pfx --no-binary=:all: $module"
392     echo "INFO: downloading source: $pip_src"
393     if ! $pip_src ; then
394         echo "WARN: failed to download source distribution"
395     fi
396     echo "INFO: Checking files in $tgtdir"
397     # shellcheck disable=SC2012
398     filecount=$(ls $tgtdir | wc -l)
399     if [[ $filecount = 0 ]] ; then
400         echo "ERROR: no files downloaded"
401         exit 1
402     else
403         # shellcheck disable=SC2046
404         echo "INFO: downloaded $filecount distributions: " $(ls $tgtdir)
405     fi
406
407     if [[ ! "$JOB_NAME" =~ "merge" ]] ; then
408         echo "INFO: not a merge job, not uploading files"
409         return
410     fi
411
412     cmd="twine upload -r $REPOSITORY $tgtdir/*"
413     if $DRY_RUN; then
414         echo "INFO: dry-run is set, echoing command only"
415         echo "$cmd"
416     else
417         echo "INFO: uploading $filecount distributions to repo $REPOSITORY"
418         $cmd
419     fi
420     tag-gerrit-repo
421 }
422
423 packagecloud_verify(){
424     echo "INFO: Verifying $1 exists in staging..."
425     if [[ $1 == $(curl --netrc-file ~/packagecloud_api --silent \
426         https://packagecloud.io/api/v1/repos/"$2"/staging/search?q="$1" \
427         | yq -r .[].filename) ]]; then
428         echo "INFO: $1 exists in staging!"
429         echo "INFO: Existing package location: https://packagecloud.io$(curl \
430             --netrc-file ~/packagecloud_api --silent \
431             https://packagecloud.io/api/v1/repos/"$2"/staging/search?q="$1" \
432             | yq -r .[].package_html_url)"
433     else
434         echo "ERROR: $1 does not exist in staging"
435         exit 1
436     fi
437 }
438
439 packagecloud_promote(){
440     echo "INFO: Preparing to promote $1..."
441     promote_url="https://packagecloud.io$(curl --netrc-file ~/packagecloud_api \
442         --silent https://packagecloud.io/api/v1/repos/"$2"/staging/search?q="$1" \
443         | yq -r .[].promote_url)"
444     echo "INFO: Promoting $1 from staging to release"
445     curl --netrc-file ~/packagecloud_api -X POST -F \
446         destination="$2/release" "$promote_url" \
447         | echo "INFO: Promoted package location: \
448         https://packagecloud.io$(yq -r .package_html_url)"
449     git checkout "$REF"
450     tag-gerrit-repo
451 }
452
453 ##############################  End Function Declarations  ################################
454
455 # Set common environment variables
456 set_variables_common
457
458 # Determine the type of release:
459 #   - container, release-container-schema.yaml
460 #   - maven, release-schema.yaml
461 #   - pypi,  release-pypi-schema.yaml
462
463 case $DISTRIBUTION_TYPE in
464
465     maven)
466         if $USE_RELEASE_FILE ; then
467             release_schema="release-schema.yaml"
468             echo "INFO: Fetching schema $release_schema"
469             wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/$release_schema
470             verify_schema
471         fi
472         set_variables_maven
473         verify_version
474         verify_version_match_release
475         maven_release_file
476         ;;
477
478     container)
479         if $USE_RELEASE_FILE ; then
480             release_schema="release-container-schema.yaml"
481             echo "INFO: Fetching schema $release_schema"
482             wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/${release_schema}
483             verify_schema
484         fi
485         set_variables_container
486         verify_version
487         container_release_file
488         ;;
489
490     pypi)
491         if $USE_RELEASE_FILE ; then
492             release_schema="release-pypi-schema.yaml"
493             echo "INFO: Fetching schema $release_schema"
494             wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/${release_schema}
495             verify_schema
496         fi
497         set_variables_pypi
498         verify_version
499         verify_pypi_match_release
500         pypi_release_file
501         ;;
502
503     packagecloud)
504         if $USE_RELEASE_FILE ; then
505             release_schema="release-packagecloud-schema.yaml"
506             packagecloud_account=$(cat "$ACCOUNT_NAME_FILE")
507             echo "INFO: Fetching schema $release_schema"
508             wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/${release_schema}
509             verify_schema
510         fi
511         set_variables_packagecloud
512         verify_packagecloud_match_release
513         for name in $(yq -r '.packages[].name' $release_file); do
514             package=$name
515             packagecloud_verify "$package" "$packagecloud_account"
516             if [[ "$JOB_NAME" =~ "merge" ]] && ! $DRY_RUN; then
517                 packagecloud_promote "$package" "$packagecloud_account"
518             fi
519         done
520         ;;
521
522     *)
523         echo "ERROR: distribution_type: $DISTRIBUTION_TYPE not supported"
524         exit 1
525         ;;
526 esac
527
528 echo "---> release-job.sh ends"