Add missing DRY_RUN parameter in PyPI merge 01/61901/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Wed, 2 Oct 2019 17:35:10 +0000 (13:35 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Wed, 2 Oct 2019 17:37:08 +0000 (13:37 -0400)
Add DRY_RUN parameter to the PyPI verify and merge template common
macro because it's required by the pypi_upload.sh script.
Also adjust verbosity of shell scripts - quiet down pip, add
repository name to output.

Change-Id: I947ee16fb6e42a6a3ec0f0de2722a6ecf7200ceb
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
jjb/lf-python-jobs.yaml
releasenotes/notes/repair-pypi-parms-3a1f36834dfbc34b.yaml [new file with mode: 0644]
shell/pypi-dist-build.sh
shell/pypi-upload.sh

index ead9195..5a2d193 100644 (file)
           name: BUILD_BDIST_WHEEL
           default: "{dist-binary}"
           description: "Set to True to build a wheel"
+      - bool:
+          name: DRY_RUN
+          default: false
+          description: |
+            If DRY_RUN is enabled artifacts are not published.
 
 - lf_pypi_verify_builders: &lf_pypi_verify_builders
     name: lf-pypi-verify-builders
diff --git a/releasenotes/notes/repair-pypi-parms-3a1f36834dfbc34b.yaml b/releasenotes/notes/repair-pypi-parms-3a1f36834dfbc34b.yaml
new file mode 100644 (file)
index 0000000..2ce6ed8
--- /dev/null
@@ -0,0 +1,7 @@
+---
+fixes:
+  - |
+    Add DRY_RUN parameter to the PyPI verify and merge template common
+    macro because it's required by the pypi_upload.sh script.
+    Adjust verbosity of shell scripts - quiet down pip, add repository
+    name to echo output.
index eb10371..8baeac1 100644 (file)
@@ -22,12 +22,14 @@ PATH=/tmp/pypi/bin:$PATH
 bdist=""
 if $BUILD_BDIST_WHEEL; then
     echo "INFO: installing wheel to build binary distribution"
-    pip install wheel
+    pip install -q wheel
     bdist="bdist_wheel"
 fi
 
 echo "INFO: cd to tox-dir $TOX_DIR"
 cd "$WORKSPACE/$TOX_DIR"
+
 echo "INFO: creating distributions"
 python3 setup.py sdist $bdist
+
 echo "---> pypi-dist-build.sh ends"
index e1ecfdf..86fff16 100644 (file)
@@ -20,15 +20,19 @@ set -eu -o pipefail
 virtualenv -p python3 /tmp/pypi
 PATH=/tmp/pypi/bin:$PATH
 
-pip install twine
+echo "INFO: installing twine to upload distributions"
+pip install -q twine
+
 echo "INFO: cd to tox-dir $TOX_DIR"
 cd "$WORKSPACE/$TOX_DIR"
+
 cmd="twine upload -r $REPOSITORY dist/*"
 if $DRY_RUN; then
     echo "INFO: dry-run is set, echoing command only"
     echo $cmd
 else
-    echo "INFO: uploading distributions"
+    echo "INFO: uploading distributions to repo $REPOSITORY"
     $cmd
 fi
+
 echo "---> pypi-upload.sh ends"