From 05adfc26cb2a567f5753ff5fa74c093cb301f1e6 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Mon, 5 Jun 2023 18:03:52 +0200 Subject: [PATCH 1/4] PB-24864: make curl not verbose --- .gitlab-ci/scripts/bin/publish.sh | 1 - .gitlab-ci/scripts/bin/review.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/.gitlab-ci/scripts/bin/publish.sh b/.gitlab-ci/scripts/bin/publish.sh index 6768d657..f2ef73b3 100644 --- a/.gitlab-ci/scripts/bin/publish.sh +++ b/.gitlab-ci/scripts/bin/publish.sh @@ -28,7 +28,6 @@ function send_to_chrome() { -H "x-goog-api-version: 2" \ -H "Content-Length: 0" \ -X POST \ - -v \ https://www.googleapis.com/chromewebstore/v1.1/items/"$id"/publish } diff --git a/.gitlab-ci/scripts/bin/review.sh b/.gitlab-ci/scripts/bin/review.sh index 66859348..c448179e 100644 --- a/.gitlab-ci/scripts/bin/review.sh +++ b/.gitlab-ci/scripts/bin/review.sh @@ -18,7 +18,6 @@ function send_to_chrome() { -H "x-goog-api-version: 2" \ -X PUT \ -T "$FILE_NAME" \ - -v \ https://www.googleapis.com/upload/chromewebstore/v1.1/items/"$id" } From 4f9172f82960462657e45adff6e89df9d964bb61 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Mon, 5 Jun 2023 18:22:45 +0200 Subject: [PATCH 2/4] PB-24864: always look for chrome zips in the known location --- .gitlab-ci/scripts/bin/review.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/scripts/bin/review.sh b/.gitlab-ci/scripts/bin/review.sh index c448179e..8496fbe9 100644 --- a/.gitlab-ci/scripts/bin/review.sh +++ b/.gitlab-ci/scripts/bin/review.sh @@ -17,7 +17,7 @@ function send_to_chrome() { -H "Authorization: Bearer $token" \ -H "x-goog-api-version: 2" \ -X PUT \ - -T "$FILE_NAME" \ + -T "dist/chrome/passbolt-$CI_COMMIT_TAG.zip" \ https://www.googleapis.com/upload/chromewebstore/v1.1/items/"$id" } From 4b06883122b4bfd0b5466f20de4aa1990615a998 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Mon, 5 Jun 2023 18:28:25 +0200 Subject: [PATCH 3/4] Make review jobs part of review stage --- .gitlab-ci/jobs/review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/jobs/review.yml b/.gitlab-ci/jobs/review.yml index dc587d84..abbba940 100644 --- a/.gitlab-ci/jobs/review.yml +++ b/.gitlab-ci/jobs/review.yml @@ -11,14 +11,14 @@ review-chrome: bash ./.gitlab-ci/scripts/bin/slack-status-messages.sh ":airplane_departure: passbolt-chrome-extension $CI_COMMIT_TAG has been sent to review!" "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID" review-firefox: - stage: publish + stage: review rules: - if: "$CI_COMMIT_TAG" script: - bash .gitlab-ci/scripts/bin/review.sh firefox review-edge: - stage: publish + stage: review rules: - if: "$CI_COMMIT_TAG" script: From 67db6e133eeeb4bcf29588ea2d9cbae23729100b Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Tue, 6 Jun 2023 07:26:25 +0200 Subject: [PATCH 4/4] PB-24864: strip v from tags --- .gitlab-ci/scripts/bin/review.sh | 2 +- .gitlab-ci/scripts/lib/version-check.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/scripts/bin/review.sh b/.gitlab-ci/scripts/bin/review.sh index 8496fbe9..91097efc 100644 --- a/.gitlab-ci/scripts/bin/review.sh +++ b/.gitlab-ci/scripts/bin/review.sh @@ -17,7 +17,7 @@ function send_to_chrome() { -H "Authorization: Bearer $token" \ -H "x-goog-api-version: 2" \ -X PUT \ - -T "dist/chrome/passbolt-$CI_COMMIT_TAG.zip" \ + -T "dist/chrome/passbolt-${CI_COMMIT_TAG#v}.zip" \ https://www.googleapis.com/upload/chromewebstore/v1.1/items/"$id" } diff --git a/.gitlab-ci/scripts/lib/version-check.sh b/.gitlab-ci/scripts/lib/version-check.sh index b3cd3fc0..f7a8d1e6 100644 --- a/.gitlab-ci/scripts/lib/version-check.sh +++ b/.gitlab-ci/scripts/lib/version-check.sh @@ -22,5 +22,4 @@ function validate_config_version_and_api_tag () { echo "Version number in version.php does not match the tag: $PASSBOLT_VERSION" return 1 fi -} - +} \ No newline at end of file