🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@futu/ada

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@futu/ada

用于下载Gitlab CI产生的artifacts。

npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Ada

用于下载Gitlab CI产生的artifacts。

背景

Gitlab CI产生的artifacts并没有一个统一的文件目录存放,需要按一些规则去取:

  • 首先根据commit id取到本次构建的pipeline信息
  • 根据pipeline id取到jobs信息
  • 根据job id拼接下载地址,取到artifacts文件

本库对这个过程做了封装。

CLI使用

全局安装

npm install -g @futu/ada

使用

ada -g http://gitlab.futunn.com -p 12 -t X-XXXXXXXXXXXX -c ee9e4ad637b13e729e0d90c09a9b0990 -o dist.zip

API使用

const Ada = require('@futu/ada');
const ada = new Ada('http://gitlab.futunn.com', 12, 'X-XXXXXXXXXXXX');

ada.download('ee9e4ad637b13e729e0d90c09a9b0990', './dist.zip');

参数说明:

  • gitlab/g Gitlab http(s)访问地址
  • project/p 项目id,数字
  • token/t Gitlab private token,在个人设置中可以生成
  • commit/c Commit Id
  • output/o 输出文件,在CLI模式中,默认为当前目录下的artifacts.zip

版本

1.0.0 (2018-07-03)

  • 基本功能完成

FAQs

Package last updated on 03 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts