- 钉钉群通知: ding-talk
- 发送邮件: send-email
- 发布npm包: npm-publish
serverless-cd / plugins Goto Github PK
View Code? Open in Web Editor NEWServerless-cd插件集合
Serverless-cd插件集合
s-setup是一个常用的初始化功能,负责将用户的s工具配置完成。
在steps中声明git-checkout插件
context:
data:
steps:
- plugin: "@serverless-cd/s-setup"
s-setup插件兼容了应用中心的传参逻辑,可以隐式地响应应用中心运行时的ststoken参数:
echo "Setup Serverless Devs ing..."
# 打开调试模式,将命令输出
set -x
ls -al
# aliyun cloud authentication infos.
access_key_id=${{ sts.accessKeyId || "dummy-ak" }}
access_key_secret=${{ sts.accessKeySecret || "dummy-sk" }}
security_token=${{ sts.securityToken || "dummy-token" }}
uid=${{ uid || "dummy-uid" }}
# account info alias
alias=my-account
s --version
if [[ $? -ne 0 ]]; then
echo "Serverless Devs is not installed."
exit 1
fi
s config add --AccessKeyID "${access_key_id}" --AccessKeySecret "${access_key_secret}" \
--AccountID "${uid}" --SecurityToken "${security_token}" --access "${alias}" -f
if [[ $? -ne 0 ]]; then
echo "Failed to setup Serverless Devs."
exit 1
fi
echo "Setup Serverless Devs success."
setup-runtime 可以升级您的流水线构建运行时
使用方式
在steps中声明setup-runtime插件
context:
data:
steps:
- plugin: "@serverless-cd/setup-runtime"
inputs:
runtime:
- nodejs14
- nodejs16
# - java17
- python39
export后要求环境变量影响到后面所有step
steps:
- name: 钉钉通知
plugin: "@serverless-cd/ding-talk"
inputs:
webhook: https://oapi.dingtalk.com/robot/send?access_token=${{secrets.DING_TALK_TOKEN}}
msgtype: markdown
secret: ${{secrets.DING_TALK_SECRET}}
payload:
title: "Serverless CD"
text: '### 杭州天气 @150XXXXXXXX \n > 9度,西北风1级,空气良89,相对温度73%\n > ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n > ###### 10点20分发布 [天气](https://www.dingtalk.com) \n'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.