From e55a3f95818c7cacc1b5e355014ebcee4c78d38e Mon Sep 17 00:00:00 2001 From: Houa Yang Date: Tue, 14 Jan 2020 11:57:08 -0600 Subject: [PATCH] Fix packagecloud match_release function and docs. Fix search for string that matches the output used by packagecloud gem when pushing packages. Correct docs to reflect not having the version in the package name. Signed-off-by: Houa Yang Change-Id: I1a696c77be94f3057c30764ae6ba710beed8bb84 --- docs/jjb/lf-release-jobs.rst | 8 +++++--- .../notes/fix-packagecloud-match-release-76c652e0963b3c6c.yaml | 9 +++++++++ shell/release-job.sh | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/fix-packagecloud-match-release-76c652e0963b3c6c.yaml diff --git a/docs/jjb/lf-release-jobs.rst b/docs/jjb/lf-release-jobs.rst index 65cfb79e..5966cd69 100644 --- a/docs/jjb/lf-release-jobs.rst +++ b/docs/jjb/lf-release-jobs.rst @@ -196,10 +196,12 @@ must start with "packagecloud". For example releases/packagecloud-1.6-tree.yaml $ cat releases/packagecloud-1.6-tree.yaml --- - package_name: tree-1.6.0 + package_name: tree packages: - - name: tree-1.6.0-10.el7.x86_64.rpm - - name: test.rpm + - name: tree_1.6.0_amd64.deb + - name: tree-dev_1.6.0_amd64.deb + - name: tree-devel-1.6.0-1.x86_64.rpm + - name: tree-1.6.0-1.x86_64.rpm ref: 5555cd2dd345fbeec0d3e2162e00835852342cda log_dir: example-project-packagecloud-merge/21 version: 1.6.0 diff --git a/releasenotes/notes/fix-packagecloud-match-release-76c652e0963b3c6c.yaml b/releasenotes/notes/fix-packagecloud-match-release-76c652e0963b3c6c.yaml new file mode 100644 index 00000000..bd8e784f --- /dev/null +++ b/releasenotes/notes/fix-packagecloud-match-release-76c652e0963b3c6c.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Fix zgrep pattern for verify_packagecloud_match_release function. Function + was looking for "Successfully Uploaded" pattern, which is not the correct + response when using packagecloud gem to push packages to packagecloud. + + Fix lf-release docs example to reflect changes to package_name. Package_name + should not include the version in the name. diff --git a/shell/release-job.sh b/shell/release-job.sh index 220f016c..55276887 100644 --- a/shell/release-job.sh +++ b/shell/release-job.sh @@ -240,7 +240,7 @@ verify_packagecloud_match_release(){ echo "INFO: Fetching console log from $logs_url" wget -q -P /tmp "${logs_url}/"console.log.gz echo "INFO: Searching for uploaded step, package name $PACKAGE_NAME and version $VERSION in job log" - if zgrep "Successfully uploaded" /tmp/console.log.gz | grep "$PACKAGE_NAME" | grep "$VERSION"; then + if zgrep -E "Pushing.*$PACKAGE_NAME.*$VERSION.*success\!" /tmp/console.log.gz; then echo "INFO: found expected strings in job log" else echo "ERROR: failed to find expected strings in job log" -- 2.16.6