1 Star 0 Fork 0

OPLG / DataKit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.gitlab-ci.yml 5.03 KB
一键复制 编辑 原始数据 按行查看 历史
tanb 提交于 2023-07-12 01:28 . 1700
before_script:
- rm -rf /root/go/src/gitlab.jiagouyun.com/cloudcare-tools/datakit
- mkdir -p /root/go/src/gitlab.jiagouyun.com/cloudcare-tools/datakit
- cp -r ./. /root/go/src/gitlab.jiagouyun.com/cloudcare-tools/datakit
- cd /root/go/src/gitlab.jiagouyun.com/cloudcare-tools/datakit
- source ~/.ossenv
- echo $DK_BPF_KERNEL_SRC_PATH
- export PATH=/usr/local/go1.18.3/bin:$PATH
- export GOROOT=/usr/local/go1.18.3
- go version
variables:
PROJECT: "datakit"
CI_VERSION: "1.11.0"
TEST_VERSION: "1.999.0"
stages:
- test
- deploy_ebpf
- deploy
ci_lint_only:
stage: deploy
resource_group: production
only:
- /.*/
script:
# only run lint
- nvm use v16.14.0
- make clean
- make lint_nofix
tags:
- cloudcare-ft
ci_ut_only:
stage: deploy
resource_group: production
only:
- /^ut-.*$/
script:
# - systemctl daemon-reload
# - systemctl restart docker
# - make
# - cd /root/go/src/gitlab.jiagouyun.com/cloudcare-tools/datakit/plugins/inputs/jenkins
# - go test -v .
- make clean
- make ut DATAWAY_URL="$TESTING_METRIC_DATAWAY"
- make # try build basic binaries
tags:
- cloudcare-ft
ci_it_only:
stage: deploy
resource_group: production
only:
- /^it-.*$/
script:
# - systemctl daemon-reload
# - systemctl restart docker
# - make
# - cd /root/go/src/gitlab.jiagouyun.com/cloudcare-tools/datakit/plugins/inputs/jenkins
# - go test -v .
- make clean
- make it DATAWAY_URL="$TESTING_METRIC_DATAWAY"
- make # try build basic binaries
tags:
- cloudcare-ft
test-datakit-production:
stage: test
resource_group: production
only:
- unstable
- master
script:
- nvm use v16.14.0
- make clean
- make production_notify GIT_BRANCH=$CI_COMMIT_BRANCH VERSION="$CI_VERSION"
- make lint_nofix
- export UT_EXCLUDE_INTEGRATION_TESTING="on"
- make ut DATAWAY_URL="$TESTING_METRIC_DATAWAY" DOCKER_REMOTE_HOST=$TESTING_DOCKER_HOST UT_EXCLUDE=$UT_EXCLUDE GIT_BRANCH=$CI_COMMIT_BRANCH
tags:
- cloudcare-ft
test-datakit-testing:
stage: test
resource_group: production
only:
- testing
- /^testing-.*$/
script:
- nvm use v16.14.0
- make clean
- make testing_notify GIT_BRANCH=$CI_COMMIT_BRANCH
- make lint_nofix
tags:
- cloudcare-ft
release-ebpf-amd64-testing:
stage: deploy_ebpf
resource_group: production
needs: [test-datakit-testing]
image: vircoys/datakit-developer:1.5
only:
- testing
- /^testing-.*$/
script:
- make clean
- make pub_epbf_testing DATAKIT_EBPF_ARCHS="linux/amd64" GIT_BRANCH=$CI_COMMIT_BRANCH
tags:
- cloudcare-ft-docker
release-ebpf-aarch64-testing:
stage: deploy_ebpf
resource_group: production
needs: [test-datakit-testing]
image: vircoys/datakit-developer:1.5
only:
- testing
- /^testing-.*$/
script:
- make clean
- make pub_epbf_testing DATAKIT_EBPF_ARCHS="linux/arm64" GIT_BRANCH=$CI_COMMIT_BRANCH
tags:
- dk-arm-docker-runner
release-ebpf-amd64-production:
stage: deploy_ebpf
resource_group: production
needs: [test-datakit-production]
image: vircoys/datakit-developer:1.5
only:
- master
- unstable
script:
- make clean
- make pub_ebpf_production DATAKIT_EBPF_ARCHS="linux/amd64" GIT_BRANCH=$CI_COMMIT_BRANCH VERSION="$CI_VERSION"
tags:
- cloudcare-ft-docker
release-ebpf-aarch64-production:
stage: deploy_ebpf
resource_group: production
needs: [test-datakit-production]
image: vircoys/datakit-developer:1.5
only:
- master
- unstable
script:
- make clean
- make pub_ebpf_production DATAKIT_EBPF_ARCHS="linux/arm64" GIT_BRANCH=$CI_COMMIT_BRANCH VERSION="$CI_VERSION"
tags:
- dk-arm-docker-runner
release-testing:
stage: deploy
resource_group: production
needs:
[
test-datakit-testing,
release-ebpf-amd64-testing,
release-ebpf-aarch64-testing,
]
only:
- testing
- /^testing-.*$/
script:
# building && publish testing
- make clean
- make testing GIT_BRANCH=$CI_COMMIT_BRANCH PKGEBPF=true # do not set VERSION here, use git version
- make check_testing_conf_compatible
- make testing_image IGN_EBPF_INSTALL_ERR=1
tags:
- cloudcare-ft
release-stable:
stage: deploy
resource_group: production
needs:
[
test-datakit-production,
release-ebpf-amd64-production,
release-ebpf-aarch64-production,
]
only:
- master
script:
- make clean
- make production GIT_BRANCH=$CI_COMMIT_BRANCH VERSION="$CI_VERSION" PKGEBPF=true # update the version on each release
- make check_production_conf_compatible
- make pub_conf_samples
- make production_image GIT_BRANCH=$CI_COMMIT_BRANCH VERSION="$CI_VERSION"
tags:
- cloudcare-ft
# for testing current issue, should delete after merge into master
current-testing:
stage: deploy
resource_group: production
only:
- /^xxx-.*$/
script:
- make clean
- make testing GIT_BRANCH=$CI_COMMIT_BRANCH VERSION="$TEST_VERSION"
- make testing_image VERSION="$TEST_VERSION"
tags:
- cloudcare-ft
1
https://gitee.com/oplg/datakit.git
git@gitee.com:oplg/datakit.git
oplg
datakit
DataKit
main

搜索帮助

53164aa7 5694891 3bd8fe86 5694891