github kubevirt/kubevirt v17.42.37

latest releases: v1.4.0-alpha.0, v1.3.1, v1.3.0...
pre-release3 years ago

Fix issues regarding post release scripts

Signed-off-by: Daniel Hiller dhiller@redhat.com

diff --git a/automation/postsubmit-master.sh b/automation/postsubmit-master.sh
index 0baaa801b..5cd4fc6b2 100755
--- a/automation/postsubmit-master.sh
+++ b/automation/postsubmit-master.sh
@@ -18,8 +18,6 @@ make prom-rules-verify
make manifests
make build-functests

-if [ -z "$DRY_RUN" ]; then

  • bash hack/gen-swagger-doc/deploy.sh

  • bash hack/gen-client-python/deploy.sh

  • hack/publish-staging.sh
    -fi
    +bash hack/gen-swagger-doc/deploy.sh
    +bash hack/gen-client-python/deploy.sh
    +hack/publish-staging.sh
    diff --git a/automation/release.sh b/automation/release.sh
    index 2843164d6..405deba4c 100755
    --- a/automation/release.sh
    +++ b/automation/release.sh
    @@ -104,10 +104,8 @@ function main() {
    upload_testing_manifests
    generate_stable_version_file

  • if [ -z "$DRY_RUN" ]; then

  • bash hack/gen-swagger-doc/deploy.sh

  • hack/publish-staging.sh

  • fi

  • bash hack/gen-swagger-doc/deploy.sh

  • hack/publish-staging.sh
    }

main "$@"
diff --git a/hack/gen-client-python/deploy.sh b/hack/gen-client-python/deploy.sh
index 1aa4eb46f..53b38aed8 100644
--- a/hack/gen-client-python/deploy.sh
+++ b/hack/gen-client-python/deploy.sh
@@ -1,11 +1,11 @@
#!/usr/bin/env bash

-set -e
+set -exo pipefail

source $(dirname "$0")/../common.sh

GITHUB_FQDN=github.com
-CLIENT_PYTHON_REPO=kubevirt/client-python
+CLIENT_PYTHON_REPO=${CLIENT_PYTHON_REPO:-kubevirt/client-python}
CLIENT_PYTHON_DIR=/tmp/kubevirt-client-python

# Reusing API_REFERENCE_PUSH_TOKEN.
@@ -20,8 +20,8 @@ cp -rf "${PYTHON_CLIENT_OUT_DIR}"/* "${CLIENT_PYTHON_DIR}/"

cd "${CLIENT_PYTHON_DIR}"

-git config --global user.email "travis@travis-ci.org"
-git config --global user.name "Travis CI"
+git config user.email "${GIT_AUTHOR_NAME:-kubevirt-bot}"
+git config user.name "${GIT_AUTHOR_EMAIL:-rmohr+kubebot@redhat.com}"

CLIENT_UPDATED="false"
# Check api_client.py and configuration.py whether there are other changes
@@ -44,7 +44,7 @@ fi
# Push only in case something got changed in code.
if [ "${CLIENT_UPDATED}" = "true" ]; then

 git add -A .
  • git commit --message "Client Python update by Travis Build ${TRAVIS_BUILD_NUMBER}"

  • git commit --message "Client Python update by KubeVirt Prow build ${BUILD_ID}"

    git push origin master >/dev/null 2>&1
    echo "Client Python updated."
    diff --git a/hack/gen-swagger-doc/deploy.sh b/hack/gen-swagger-doc/deploy.sh
    index 288314ddd..42f296476 100755
    --- a/hack/gen-swagger-doc/deploy.sh
    +++ b/hack/gen-swagger-doc/deploy.sh
    @@ -1,15 +1,15 @@
    #!/usr/bin/env bash

-set -e
+set -exo pipefail

GITHUB_FQDN=github.com
-API_REF_REPO=kubevirt/api-reference
+API_REF_REPO=${API_REF_REPO:-kubevirt/api-reference}
API_REF_DIR=/tmp/api-reference
GITHUB_IO_FQDN="https://kubevirt.github.io/api-reference"

-TARGET_DIR="$TRAVIS_BRANCH"
-if [ -n "${TRAVIS_TAG}" ]; then

  • TARGET_DIR="$TRAVIS_TAG"
    +TARGET_DIR="$PULL_BASE_REF"
    +if [ -n "${DOCKER_TAG}" ]; then
  • TARGET_DIR="$DOCKER_TAG"
    fi

git clone
@@ -35,13 +35,13 @@ EOF
find * -type d -regex "^v[0-9.]*"

 -exec echo "* [{}](${GITHUB_IO_FQDN}/{}/index.html)" \; | sort -r --version-sort -t '[' --key 2 >>README.md

-git config --global user.email "travis@travis-ci.org"
-git config --global user.name "Travis CI"
+git config user.email "${GIT_AUTHOR_NAME:-kubevirt-bot}"
+git config user.name "${GIT_AUTHOR_EMAIL:-rmohr+kubebot@redhat.com}"

-# NOTE: exclude index.html from match, becasue it is static except commit hash.
+# NOTE: exclude index.html from match, because it is static except commit hash.
if git status --porcelain | grep -v "index[.]html" | grep --quiet "^ [AM]"; then

 git add -A README.md "${TARGET_DIR}"/*.html
  • git commit --message "API Reference update by Travis Build ${TRAVIS_BUILD_NUMBER}"

  • git commit --message "API Reference update by KubeVirt Prow build ${BUILD_ID}"

    git push origin master >/dev/null 2>&1
    echo "API Reference updated for ${TARGET_DIR}."
    diff --git a/hack/publish-staging.sh b/hack/publish-staging.sh
    index 73d32dbff..8ae181772 100755
    --- a/hack/publish-staging.sh
    +++ b/hack/publish-staging.sh
    @@ -1,15 +1,15 @@
    #!/usr/bin/env bash

-set -ex
+set -exo pipefail

GITHUB_FQDN=github.com
-API_REF_REPO=kubevirt/client-go
+GO_API_REF_REPO=${GO_API_REF_REPO:-kubevirt/client-go}
API_REF_DIR=/tmp/client-go
GITHUB_IO_FQDN="https://kubevirt.github.io/client-go"

-TARGET_BRANCH="$TRAVIS_BRANCH"
-if [ -n "${TRAVIS_TAG}" ]; then

  • TARGET_TAG="$TRAVIS_TAG"
    +TARGET_BRANCH="$PULL_BASE_REF"
    +if [ -n "${DOCKER_TAG}" ]; then
  • TARGET_TAG="$DOCKER_TAG"
    fi

# if we are not on master and there is no tag, do nothing
@@ -20,7 +20,7 @@ fi

rm -rf ${API_REF_DIR}
git clone

  • "https://${API_REFERENCE_PUSH_TOKEN}@${GITHUB_FQDN}/${API_REF_REPO}.git"
  • "https://${API_REFERENCE_PUSH_TOKEN}@${GITHUB_FQDN}/${GO_API_REF_REPO}.git"
    "${API_REF_DIR}" >/dev/null 2>&1
    pushd ${API_REF_DIR}
    git checkout -B ${TARGET_BRANCH}-local
    @@ -41,13 +41,13 @@ BUILD
    BUILD.bazel
    EOF

-git config --global user.email "travis@travis-ci.org"
-git config --global user.name "Travis CI"
+git config user.email "${GIT_AUTHOR_NAME:-kubevirt-bot}"
+git config user.name "${GIT_AUTHOR_EMAIL:-rmohr+kubebot@redhat.com}"

git add -A

if [ -n "$(git status --porcelain)" ]; then

  • git commit --message "client-go update by Travis Build ${TRAVIS_BUILD_NUMBER}"

  • git commit --message "client-go update by KubeVirt Prow build ${BUILD_ID}"

    # we only push branch changes on master
    if [ "${TARGET_BRANCH}" == "master" ]; then

Don't miss a new kubevirt release

NewReleases is sending notifications on new releases.