承接 spryker-sdk/upgrader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spryker-sdk/upgrader

Composer 安装命令:

composer require spryker-sdk/upgrader

包简介

Code evaluator and upgrader tool

README 文档

README

Build Status codecov Latest Stable Version Minimum PHP Version PHPStan

Upgrader

The Upgrader tool simplifies keeping projects up-to-date with Spryker releases.

​ The Upgrader updates projects via one of the following approaches:

  • Release group(default) — uses Spryker release app as data provider.
  • Composer update — uses composer update command; this is the default strategy that's describes below. ​ At this step, the Upgrader updates the project to the latest version as follows:
  1. Checks if the target branch has been created on the remote repository. If the branch exists, the process stops.
  2. Checks if there are no uncommitted changes in the project. If there are uncommitted changes, the process stops.
  3. Updates Spryker modules and dependent libraries, including third-party ones.
  4. Triggers Integrator for adjust project classes.
  5. Commits the changed files.
  6. Pushes the changes to the remote repository.
  7. Create a PR in the remote repository.

Supported strategies:

Composer strategy

  • To enable Composer update strategy:
export UPGRADE_STRATEGY=composer

Composer update strategy

Composer install|update uses two strategies. By default Composer updates lock file with packages being downloaded.

  • To enable the update of composer.lock file without packages being downloaded:
export COMPOSER_NO_INSTALL=true

Release App strategy

In the strategy, Upgrader uses Spryker release app as a data provider to fetch data about Major, Minor, and Patch releases. Only Minor and Paths could be automatically applied, for now. In case when some major release is available, Upgrader put info about to PR description.

  • To enable Release group strategy (default):
export UPGRADE_STRATEGY=release-app

In the strategy, Upgrader contains sequential (default) release group requiring processor (one by one release group).

Sequential release group processor

  • To enable Sequential release group processor (default):
export RELEASE_GROUP_PROCESSOR=sequential

Sequential release group processor contains threshold, by default 30 release groups for one Upgrader start.

  • To change the threshold:
export THRESHOLD_RELEASE_GROUP=<number>

Soft thresholds:

Soft major threshold, by default 0.

  • To change soft major threshold:
export SOFT_THRESHOLD_MAJOR=<number>

Soft minor threshold, by default 10. ​

  • To change soft minor threshold:
export SOFT_THRESHOLD_MINOR=<number>

​ Soft bugfix threshold, by default 30. ​

  • To change soft patch threshold:
export SOFT_THRESHOLD_PATCH=<number>

Adding GitHub configuration for the update step

​ To enable the Upgrader to execute this step, apply the following configuration: ​

  • GitHub is default source code provider. If you want manually define it, use the next environment variable: ​
export SOURCE_CODE_PROVIDER=github

  • Add a GitHub access token to the project repository with the permissions to push branches and create PRs: ​
export ACCESS_TOKEN=<GITHUB_TOKEN>

  • Add the organization name owning the repository of the project you want to update:
export ORGANIZATION_NAME=<ORGANIZATION>

  • Add the repository name of the project you want to update:
export REPOSITORY_NAME=<REPOSITORY>

Adding GitLab configuration for the update step

​ To enable the Upgrader to execute this step, apply the following configuration: ​

  • Enable GitLab source code provider: ​
export SOURCE_CODE_PROVIDER=gitlab

  • Add a GitLab access token to the project repository with the permissions to push branches and create PRs: ​
export ACCESS_TOKEN=<GITLAB_TOKEN>

  • Add the project id of the project you want to update:
export PROJECT_ID=<PROJECT_ID>

  • Optional. For self-hosted source provider add url of your provider:
export SOURCE_CODE_PROVIDER_URL=<https://git.yourdomain.com>

Adding Azure configuration for the update step

​ To enable the Upgrader to execute this step, apply the following configuration: ​

  • Enable Azure source code provider: ​
export SOURCE_CODE_PROVIDER=azure

  • Add a Azure access token to the project repository with the permissions to push branches and create PRs: ​
export ACCESS_TOKEN=<AZURE_TOKEN>

  • Add the organization name owning the repository of the project you want to update:: ​
export ORGANIZATION_NAME=<ORGANIZATION_NAME>

  • Add a project name or project id you want to update: ​
export PROJECT_NAME=<PROJECT_NAME>
# OR
export PROJECT_ID=<PROJECT_ID>

  • Add a project's repository name or repository id: ​
export REPOSITORY_NAME=<REPOSITORY_NAME>
# OR
export REPOSITORY_ID=<REPOSITORY_ID>

Reporting configuration

  • Optional. Defines execution environment for report statistics:
export APP_ENV=sprykerci

  • Optional. Enable the report sending functionality. it’s disabled by default.
export REPORTING_ENABLED=true

  • Optional. Secure token for remote server request authorization in report sending process.
export REPORT_SEND_AUTH_TOKEN=<TOKEN>

Updating projects via the SDK

​ To update a project, run the following command from its directory:

bin/console upgradability:php:upgrade

Enable release group integrator

  • Turn on the specific behavior for the release group integrator (for internal usage).
export RELEASE_GROUP_INTEGRATOR_ENABLED=true

Enable minimal updates of third-party dependencies

  • Turn on specific behavior to minimize update 3rd-party dependencies.
export UPDATE_MINIMUM_DEPENDENCIES_ENABLED=true

Enable update features to dev-master fixer

  • Turn on internal specific behavior to update features to dev-master.
export UPDATE_FEATURES_TO_DEV_MASTER=true

Enable project change integration

  • Turn on integrator trigger after package update step
export INTEGRATOR_ENABLED=true

Disable installing new Spryker packages

  • Turn off installing new Spryker packages
export PACKAGE_UPGRADE_ONLY=true

Enable project code compliance after update

  • Turn on code compliance trigger after package update step
export EVALUATOR_ENABLED=true

Specify release group

  • Specify release group to apply only it packages
export RELEASE_GROUP_ID=123

Specify the pull request reviewers

  • Specify the GitHub user login to add as reviewers to the pull request
export PULL_REQUEST_REVIEWERS=<login_1,login_two,...>

Installation

​ For Spryker SDK installation instructions, see Spryker SDK

spryker-sdk/upgrader 适用场景与选型建议

spryker-sdk/upgrader 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.57k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 08 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 spryker-sdk/upgrader 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 spryker-sdk/upgrader 我们能提供哪些服务?
定制开发 / 二次开发

基于 spryker-sdk/upgrader 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 13.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 17
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 11
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2021-08-25