diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66b36717d0f..6b24a69da0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,6 @@ include: - ci/prebuild.yml - ci/build.yml - ci/deploy.yml - - ci/npm-deploy.yml - ci/test.yml - ci/releases.yml # # to be run only on scheduled pipelines diff --git a/ci/npm-deploy.yml b/ci/npm-deploy.yml deleted file mode 100644 index 5aba06860d4..00000000000 --- a/ci/npm-deploy.yml +++ /dev/null @@ -1,90 +0,0 @@ -.packages_matrix: &packages_matrix - parallel: - matrix: - - PACKAGE: - [ - "blockchain-link-types", - "blockchain-link-utils", - "blockchain-link", - "connect-common", - "transport", - "utils", - "utxo-lib", - "connect-plugin-stellar", - "connect-plugin-ethereum", - "analytics", - "connect-analytics", - "type-utils", - "env-utils", - "protocol", - "protobuf", - "schema-utils", - ] - -.packages_matrix_connect: &packages_matrix_connect - parallel: - matrix: - - PACKAGE: ["connect", "connect-web", "connect-webextension"] - -.npm_registry_beta_rules: &npm_registry_beta_rules - except: - - codesing - - /^npm-release\// - - schedules - - /^release\// - -.npm_registry_release_rules: &npm_registry_release_rules - only: - refs: - - codesing - - /^npm-release\// - -# npm beta packages deploy to npm registry -.deploy npm base: - stage: deploy npm - when: manual - dependencies: - - install - tags: - - deploy - before_script: - - nix-shell --run "yarn install --immutable" - - nix-shell --run "yarn config set npmAuthToken ${NPM_TOKEN}" - after_script: - - nix-shell --run "yarn config unset npmAuthToken" - -beta deploy npm: - extends: .deploy npm base - <<: *npm_registry_beta_rules - <<: *packages_matrix - script: - - nix-shell --run "node ./ci/scripts/check-version $PACKAGE $CI_COMMIT_BRANCH beta" - - nix-shell --run "yarn && cd ./packages/$PACKAGE && yarn npm publish --tag beta --access public" - -deploy npm: - extends: .deploy npm base - <<: *npm_registry_release_rules - <<: *packages_matrix - script: - - nix-shell --run "node ./ci/scripts/check-version $PACKAGE $CI_COMMIT_BRANCH latest" - - nix-shell --run "yarn && cd ./packages/${PACKAGE} && yarn npm publish --access public" - -beta deploy npm connect: - extends: .deploy npm base - only: - refs: - - /^release\/connect\// - <<: *packages_matrix_connect - script: - - nix-shell --run "yarn && cd ./packages/$PACKAGE && yarn npm publish --tag beta --access public" - -deploy npm connect: - extends: .deploy npm base - only: - refs: - - /^release\/connect\// - <<: *packages_matrix_connect - script: - - nix-shell --run "cd ./packages/${PACKAGE} && yarn npm publish --access public" - - nix-shell --run "./packages/connect/e2e/test-npm-install.sh" - - nix-shell --run "./packages/connect/e2e/test-yarn-install.sh" diff --git a/ci/releases.yml b/ci/releases.yml index d28c23eee99..04824872af8 100644 --- a/ci/releases.yml +++ b/ci/releases.yml @@ -102,50 +102,3 @@ msg-system codesign deploy: - source ${MSG_SYSTEM_DATA_DEPLOY_KEYFILE} - aws s3 cp suite-common/message-system/files/config.v1.jws s3://data.trezor.io/config/stable/config.v1.jws --cache-control no-cache - aws cloudfront create-invalidation --distribution-id ${AWS_CLOUDFRONT_ID} --paths '/config/stable/*' - -# connect v9 deploy to production jobs - -# Create rollback copy of connect.trezor.io -connect v9 rollback production: - stage: deploy to production - only: - refs: - - /^release\/connect\// - when: manual - before_script: [] - needs: - - connect v9 deploy production - script: - - source ${CONNECT_DEPLOY_KEYFILE} - - aws s3 sync --delete s3://rollback-connect.trezor.io/9/ s3://connect.trezor.io/9/ - tags: - - connect_deploy - -.connect v9 deploy: - stage: deploy to production - dependencies: - - connect-web build production - - connect-explorer build production - needs: - - release commit messages - - connect-web build production - - connect-explorer build production - before_script: - - source ${CONNECT_DEPLOY_KEYFILE} - tags: - - connect_deploy - only: - refs: - - /^release\/connect\// - -connect v9 deploy staging: - extends: .connect v9 deploy - script: - - ./ci/scripts/connect-release-staging.sh 9 - -# Deploy connect v9 to connect.trezor.io from staging-conntect.trezor.io -connect v9 deploy production: - extends: .connect v9 deploy - when: manual - script: - - ./ci/scripts/connect-release-production.sh 9 diff --git a/ci/scripts/connect-release-production.sh b/ci/scripts/connect-release-production.sh deleted file mode 100755 index e00ce145af9..00000000000 --- a/ci/scripts/connect-release-production.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -set -e -o pipefail - -# Usage: -# ./connect-release-production.sh DESTINATION -# @DESTINATION: required, destination directory (connect major version) - -# Validate params -while [[ "$#" -gt 0 ]]; do case $1 in - 9) - latest_version="9" - current_version=$(jq -r .version packages/connect/package.json) - shift - ;; - *) - echo "Invalid version parameter passed: $1 -Used only for version 9" - exit 1 - shift - ;; - esac done - -echo "Backing up current production version $latest_version to rollback bucket" - -# sync the files to rollback bucket -aws s3 sync "s3://connect.trezor.io/$latest_version/" "s3://rollback-connect.trezor.io/$latest_version/" - -echo "Uploading to s3://connect.trezor.io/$latest_version/ and s3://connect.trezor.io/$current_version/" - -# sync the files to aws -aws s3 sync --delete --cache-control 'public, max-age=3600' "s3://staging-connect.trezor.io/$latest_version/" "s3://connect.trezor.io/$latest_version/" -aws s3 sync --delete --cache-control 'public, max-age=3600' "s3://staging-connect.trezor.io/$current_version/" "s3://connect.trezor.io/$current_version/" -aws cloudfront create-invalidation --distribution-id E3LVNAOGT94E37 --paths '/*' - -echo "DONE" diff --git a/ci/scripts/connect-release-staging.sh b/ci/scripts/connect-release-staging.sh deleted file mode 100755 index b1d3d4204ed..00000000000 --- a/ci/scripts/connect-release-staging.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -set -e -o pipefail - -# Usage: -# ./connect-release-staging.sh DESTINATION -# @DESTINATION: required, destination directory (connect major version) - -# Validate params -while [[ "$#" -gt 0 ]]; do case $1 in - 9) - latest_version="9" - current_version=$(jq -r .version packages/connect/package.json) - shift - ;; - *) - echo "Invalid version parameter passed: $1 -Used only for version 9" - exit 1 - shift - ;; - esac done - -echo "Uploading to s3://staging-connect.trezor.io/$latest_version/ and s3://staging-connect.trezor.io/$current_version/" - -# organize the files in one directory -tmp_folder="tmp-connect-release" - -mkdir $tmp_folder/ -cp -r packages/connect-iframe/build/* $tmp_folder/. -cp -r packages/connect-popup/build/* $tmp_folder/. -cp -r packages/connect-web/build/* $tmp_folder/. -cp -r packages/connect-explorer/build/* $tmp_folder/. - -# sync the files to aws -aws s3 sync --delete --cache-control 'public, max-age=3600' "$tmp_folder/" "s3://staging-connect.trezor.io/$latest_version/" -aws s3 sync --delete --cache-control 'public, max-age=3600' "$tmp_folder/" "s3://staging-connect.trezor.io/$current_version/" -aws cloudfront create-invalidation --distribution-id E55GK1B3RPIPX --paths '/*' - -# cleaning up -echo "Cleaning up" -rm -rf $tmp_folder - -echo "DONE"