963 B
963 B
套件发布指南
前置条件
- 一个 API Key(从 https://auth.mercator.cn 获取)
- 套件目录包含
workflow.yaml和scripts/
通过 API 发布
curl -X POST https://suites.mercator.cn/api/v1/publish/upload \
-H "Authorization: Bearer mk_xxxx" \
-F "file=@my-suite.tar.gz" \
-F "platform=all" # linux / windows / all
> 发布后套件包会上传到 https://git.mercator.cn/SuiteHub 组织。
其中 my-suite.tar.gz 包含:
my-suite/
├── workflow.yaml
└── scripts/
└── run.py
workflow.yaml 示例:
platform: all
name: my-suite
description: 我的套件
version: 1.0.0
author: 作者
tags: [gis]
category: general
params:
input_path:
type: string
required: true
desc: 输入文件路径
base_image: gis-base:latest
steps:
- id: step1
name: 处理步骤
type: python
script_id: run
params:
input_path: $params.input_path