forked from influxdata/telegraf
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpipeline.yml
54 lines (54 loc) · 1.98 KB
/
pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: "1.1"
name: ""
"on":
push:
branches:
- master
- release/*
tags:
- v*
stages:
- stage:
- git-checkout:
alias: telegraf
description: 代码仓库克隆
params:
depth: 1
- stage:
- extract-repo-version:
alias: extract-repo-version
description: 从 git 代码仓库中解析提交信息,生成仓库版本
params:
git_dir: ${{ dirs.telegraf }}
- stage:
- custom-script:
alias: build-telegraf
description: 运行自定义命令
image: registry.erda.cloud/erda-actions/custom-script-action:2.0-20230423123122-5fd86c2
commands:
- cd ${{ dirs.telegraf }}
- echo $(pwd)
- echo $(ls)
- export DOCKER_REGISTRY=${{ configs.docker_registry }}
- export DOCKER_REGISTRY_USERNAME=${{ configs.docker_registry_username }}
- export DOCKER_REGISTRY_PASSWORD=${{ configs.docker_registry_password }}
- export PLATFORMS=${{ configs.PLATFORMS }}
- export IMAGE_TAG=${{ outputs.extract-repo-version.image_tag }}
- ./build.sh
resources:
cpu: 0.5
mem: 1024
- stage:
- release:
alias: release-telegraf
description: 用于打包完成时,向dicehub 提交完整可部署的dice.yml。用户若没在pipeline.yml里定义该action,CI会自动在pipeline.yml里插入该action
params:
check_diceyml: false
dice_yml: ${{ dirs.telegraf }}/erda.yml
image:
telegraf: ${{ outputs.build-telegraf.image }}
telegraf-app: ${{ outputs.build-telegraf.image }}
telegraf-app-edge: ${{ outputs.build-telegraf.image }}
telegraf-edge: ${{ outputs.build-telegraf.image }}
telegraf-platform: ${{ outputs.build-telegraf.image }}
tag_version: ${{ outputs.extract-repo-version.version }}