Fetch the repository succeeded.
name: 发布prettier前端代码自动格式化节点
global:
param:
# 格式:docker.jianmuhub.com/jianmurunner/${节点定义唯一标识}
image_name: docker.jianmuhub.com/jianmurunner/prettier
trigger:
type: webhook
param:
- name: gitee_token
type: SECRET
exp: $.header.X-Gitee-Token
- name: gitee_event
type: STRING
exp: $.header.X-Gitee-Event
- name: gitee_tag_created
type: BOOL
exp: $.body.json.created
- name: gitee_ref
type: STRING
exp: $.body.json.ref
auth:
token: ${trigger.gitee_token}
value: ((gitee.webhook_runner_token))
only: (${trigger.gitee_event} === "Tag Push Hook" && ${trigger.gitee_tag_created})
workflow:
start:
alias: 开始
type: start
targets:
- git_clone
git_clone:
type: git_clone:1.2.0
sources:
- start
targets:
- nodejs_build
param:
remote_url: https://gitee.com/jianmu-runners/jianmu-runner-prettier.git
ref: ${trigger.gitee_ref}
username: ((gitee.username))
password: ((gitee.password))
nodejs_build:
type: "nodejs_build:1.2.1-16.13.0"
sources:
- git_clone
targets:
- pack_tar
param:
workspace: ${git_clone.git_path}
registry_url: https://registry.npm.taobao.org
build_arg: --mode cdn
pack_tar:
type: "pack_tar:1.0.1"
sources:
- nodejs_build
targets:
- git_push
param:
cmd: "tar -zcvf ${git_clone.git_path}/scripts/node_modules.tar.gz ${git_clone.git_path}/node_modules"
git_push:
sources:
- pack_tar
targets:
- auto_build_image
type: "git_push:1.0.6"
param:
username: ((gitee.comyan_username))
password: ((gitee.comyan_password))
remote_url: https://gitee.com/jianmu-runners/jianmu-runner-prettier.git
remote_branch: 'master'
source_path: "${git_clone.git_path}/scripts"
target_dir: "jianmu-runner-prettier/scripts"
commit_message: "push node_modules"
auto_build_image:
type: auto_build_image:1.0.2
sources:
- git_push
targets:
- hub_publish
param:
api_url: https://api.jianmuhub.com/open
access_token: ((jianmu_image.token))
tag: ${git_clone.git_tag}
# 修改构建计划页面URL中获取
build_plan_id: 53c7c36c-a509-43f4-a3a6-01291734caa7
hub_publish:
type: hub_publish:1.1.0
sources:
- auto_build_image
targets:
- send_message
param:
hub_url: https://api.jianmuhub.com
dsl_file_path: ${git_clone.git_path}/dsl/prettier.yml
hub_api_ak: ((jianmuhub.ak))
hub_api_sk: ((jianmuhub.sk))
version: ${git_clone.git_tag}
image: ${global.image_name}:${git_clone.git_tag}
send_message:
type: feishu_notice_interactive:1.0.4
sources:
- hub_publish
targets:
- send_email
param:
bot_webhook_url: ((feishu.webhook_url))
msg_title: 已发布prettier前端代码自动格式化节点。
msg_markdown: "版本:${git_clone.git_tag}\n作者:[comyan](https://gitee.com/comyan)"
send_email:
type: email:1.0.1
sources:
- send_message
targets:
- end
param:
host: smtp.ym.163.com
sender: notice@jianmu.dev
auth_code: ((email.notice_auth_code))
receivers: '["dev@jianmu.dev"]'
type: html
subject: 节点发布通知-prettier:${git_clone.git_tag}
text: 已发布prettier前端代码自动格式化节点。<br/>版本:${git_clone.git_tag}<br/>作者:<a href="https://gitee.com/comyan">comyan</a>
end:
alias: 结束
type: end
sources:
- send_email
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。