Skip to content

Commit

Permalink
imporve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
myroid committed Aug 15, 2020
1 parent ef9577a commit 4a1a365
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,34 @@ Pgyer can upload the application to the site, generate installation link and qr

### Install plugin

##### Recommend

`Manage Jenkins` -> `Manage Plugins` -> `Available` -> `Search ` -> *enter* `Upload to pgyer` -> `install`

##### ~~Alternate~~

1. Click [here](https://updates.jenkins-ci.org/download/plugins/upload-pgyer) to download the latest version

2. `Manage Jenkins` -> `Manage Plugins` -> `Advanced` -> `Upload Plugin` -> `Choose file` -> *choose* `upload-pgyer.hpi` -> `Upload`

### Build parameters

In version 1.34, two build parameters were added, namely `isUploadPgyer` and `uploadPgyerTimeout`.

1. `isUploadPgyer` Used to control whether to upload the apk/ipa file to payer.

![isUploadPgyer](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/isUploadPgyer.png)
![isUploadPgyer](./images/isUploadPgyer.png)

2. `uploadPgyerTimeout` Used to control the upload timeout, the unit is seconds, the default is 300 seconds.

![uploadPgyerTimeout](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/uploadPgyerTimeout.png)
![uploadPgyerTimeout](./images/uploadPgyerTimeout.png)

### User's guidance
So this plugin can be uploaded to the pgyer platform!**And it can put the fields returned by pgyer into an environment variable, which you can use in other build steps**, You can select `upload to pgyer` by adding build steps or adding post-build steps.

![](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/uploadPgyerInstruction.png)
> Recommend **`upload to pgyer with apiV2`** , apiV1 will probably fail to upload.
![](./images/uploadPgyerInstruction.png)

### Introduction to parameters
field|explanation
Expand All @@ -46,11 +56,11 @@ qrcodePath|`(Optional)` If you need to download the qrcode, please enter the sav
envVarsPath|`(Optional)` if you need to save info, please enter save file path! otherwise, not save!

### Running log
![](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/upload_pgyer_running_log.png)
![](./images/upload_pgyer_running_log.png)

When it runs successfully, you can use the environment variables that are used! for example:

![](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/upload_pgyer_use_env.png)
![](./images/upload_pgyer_use_env.png)

### Change Log

Expand Down
22 changes: 16 additions & 6 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,35 @@

### 安装插件

`Manage Jenkins` -> `Manage Plugins` -> `Available` -> `Search ` -> 输入 `Upload to pgyer` -> `install`
##### 推荐的安装方式

`Manage Jenkins` -> `Manage Plugins` -> `Available` -> `Search ` -> *输入* `Upload to pgyer` -> `install`

##### ~~备用的安装方式~~

1. 点击 [这里](https://updates.jenkins-ci.org/download/plugins/upload-pgyer) 下载最新的版本

2. `Manage Jenkins` -> `Manage Plugins` -> `Advanced` -> `Upload Plugin` -> `Choose file` -> *选择刚才下载的* `upload-pgyer.hpi` -> `Upload`

### 构建参数

1.34版本中添加了2个构建参数,分别是 `isUploadPgyer``uploadPgyerTimeout`

1. `isUploadPgyer` 用于控制是否将本次构建的apk/ipa文件上传到payer。

![isUploadPgyer](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/isUploadPgyer.png)
![isUploadPgyer](./images/isUploadPgyer.png)

2. `uploadPgyerTimeout` 用于控制上传的超时时间,单位是秒,默认300秒。

![uploadPgyerTimeout](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/uploadPgyerTimeout.png)
![uploadPgyerTimeout](./images/uploadPgyerTimeout.png)

### 使用指南

你可以在Jenkins的job配置页面的`构建``构建后操作`这两个操作中点击添加构建步骤选择`upload to pgyer with apiVx`。然后你就可以看到类似下面图片的操作界面:

![](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/uploadPgyerInstruction.png)
> 推荐使用 **`upload to pgyer with apiV2`** , apiV1有肯能会上传失败。
![](./images/uploadPgyerInstruction.png)

### 参数介绍
需要填写的字段|字段的解释
Expand All @@ -47,11 +57,11 @@ qrcodePath|`(选填)` 如果你需要下载蒲公英返回的二维码,那么
envVarsPath |`(选填)` 如果你想存储蒲公英返回的上传信息,那么这里填写保存信息的文件路径,<br/>如果你不需要保存,那么你不需要在这里填写任何内容。

### 运行截图
![](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/upload_pgyer_running_log.png)
![](./images/upload_pgyer_running_log.png)

当你的应用上传成功后,在Jenkins中你就能看到上面图片中的信息。同时,你就可以在其他构建步骤中使用蒲公英返回来的信息,例如我的经验:

![](https://jenkins-upload-pgyer-1251473749.cos.ap-beijing.myqcloud.com/upload_pgyer_use_env.png)
![](./images/upload_pgyer_use_env.png)

### Change Log

Expand Down

0 comments on commit 4a1a365

Please sign in to comment.