File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ matrix :
2+ platform :
3+ - linux/amd64
4+ - linux/arm64
5+
6+ platform : ${platform}
7+
8+ labels :
9+ type : exec
10+
11+ pipeline :
12+ - name : publish-linux
13+ image : bash
14+ commands :
15+ - echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
16+ - cd grafana && make build-all push-all && cd ..
17+ - cd telegraf && make build-all push-all && cd ..
18+ secrets :
19+ - dev_registry
20+ - drycc_registry
21+ - container_username
22+ - container_password
23+ when :
24+ event :
25+ - push
26+ - tag
27+
28+ depends_on :
29+ - test-linux
Original file line number Diff line number Diff line change 1+ platform : linux/amd64
2+
3+ labels :
4+ type : exec
5+
6+ - name : generate chart
7+ commands :
8+ - IMAGE_TAG=$([ ! -z $DRONE_TAG ] && echo \"${DRONE_TAG:1}\" || echo \"canary\")
9+ - sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/monitor/values.yaml
10+ - helm package -u charts/monitor --version $([ -z $DRONE_TAG ] && echo 1.0.0 || echo ${DRONE_TAG#v})
11+ - echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin
12+ - helm push monitor-$([ -z $DRONE_TAG ] && echo 1.0.0 || echo ${DRONE_TAG#v}).tgz oci://$DRYCC_REGISTRY/$([ -z $DRONE_TAG ] && echo charts-testing || echo charts)
13+ environment :
14+ DRYCC_REGISTRY :
15+ from_secret : drycc_registry
16+ CONTAINER_USERNAME :
17+ from_secret : container_username
18+ CONTAINER_PASSWORD :
19+ from_secret : container_password
20+ when :
21+ event :
22+ - push
23+ - tag
24+
25+ pipeline :
26+ - name : generate-chart
27+ type : local
28+ image : bash
29+ commands :
30+ - export VERSION=$(sed 's#v##' <<< $CI_COMMIT_TAG)
31+ - export IMAGE_TAG=$([ ! -z $CI_COMMIT_TAG ] && echo \"$VERSION\" || echo \"canary\")
32+ - sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/$${CI_REPO_NAME}/values.yaml
33+ - helm package -u charts/$${CI_REPO_NAME} --version $([ -z $CI_COMMIT_TAG ] && echo 1.0.0 || echo $VERSION)
34+ - echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin
35+ - helm push $${CI_REPO_NAME}-$([ -z $CI_COMMIT_TAG ] && echo 1.0.0 || echo $VERSION).tgz oci://$DRYCC_REGISTRY/$([ -z $CI_COMMIT_TAG ] && echo charts-testing || echo charts)
36+ secrets :
37+ - dev_registry
38+ - drycc_registry
39+ - container_username
40+ - container_password
41+ when :
42+ event :
43+ - push
44+ - tag
45+
46+ depends_on :
47+ - manifest-grafana
48+ - manifest-telegraf
Original file line number Diff line number Diff line change 1+ platform : linux/amd64
2+
3+ labels :
4+ type : exec
5+
6+ pipeline :
7+ - name : generate-manifest
8+ image : bash
9+ commands :
10+ - sed -i "s/{{project}}/grafana/g" .woodpecker/manifest.tmpl
11+ - sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .woodpecker/manifest.tmpl
12+ secrets :
13+ - drycc_registry
14+ when :
15+ event :
16+ - tag
17+ - push
18+
19+ - name : publish-manifest
20+ image : bash
21+ commands :
22+ - docker run --rm
23+ -e PLUGIN_SPEC=.woodpecker/manifest.tmpl
24+ -e PLUGIN_USERNAME=$CONTAINER_USERNAME
25+ -e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
26+ -v $(pwd):$(pwd)
27+ -w $(pwd)
28+ plugins/manifest
29+ secrets :
30+ - container_username
31+ - container_password
32+ when :
33+ event :
34+ - tag
35+ - push
36+
37+ depends_on :
38+ - build-linux
Original file line number Diff line number Diff line change 1+ platform : linux/amd64
2+
3+ labels :
4+ type : exec
5+
6+ pipeline :
7+ - name : generate-manifest
8+ image : bash
9+ commands :
10+ - sed -i "s/{{project}}/telegraf/g" .woodpecker/manifest.tmpl
11+ - sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .woodpecker/manifest.tmpl
12+ secrets :
13+ - drycc_registry
14+ when :
15+ event :
16+ - tag
17+ - push
18+
19+ - name : publish-manifest
20+ image : bash
21+ commands :
22+ - docker run --rm
23+ -e PLUGIN_SPEC=.woodpecker/manifest.tmpl
24+ -e PLUGIN_USERNAME=$CONTAINER_USERNAME
25+ -e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
26+ -v $(pwd):$(pwd)
27+ -w $(pwd)
28+ plugins/manifest
29+ secrets :
30+ - container_username
31+ - container_password
32+ when :
33+ event :
34+ - tag
35+ - push
36+
37+ depends_on :
38+ - build-linux
Original file line number Diff line number Diff line change 1+ image: registry.drycc.cc /drycc/{{project}}:{{#if build.tag }}{{trimPrefix " v" build.tag }}{{else }}canary{{/if }}
2+ {{#if build.tags }}
3+ tags:
4+ {{#each build.tags }}
5+ - {{this}}
6+ {{/each}}
7+ {{/if }}
8+ manifests:
9+ -
10+ image: registry.drycc.cc /drycc/{{project}}:{{#if build.tag }}{{build.tag }}-{{else }}latest-{{/if }}linux-amd64
11+ platform:
12+ architecture: amd64
13+ os: linux
14+ -
15+ image: registry.drycc.cc /drycc/{{project}}:{{#if build.tag }}{{build.tag }}-{{else }}latest-{{/if }}linux-arm64
16+ platform:
17+ architecture: arm64
18+ os: linux
Original file line number Diff line number Diff line change 1+ matrix :
2+ platform :
3+ - linux/amd64
4+ - linux/arm64
5+
6+ platform : ${platform}
7+
8+ labels :
9+ type : exec
10+
11+ pipeline :
12+ - name : test-linux
13+ image : bash
14+ commands :
15+ - mkdir -p $HOMEPATH/.docker; echo $IMAGE_PULL_SECRETS > $HOMEPATH/.docker/config.json
16+ - cd grafana && make test && cd ..
17+ - cd telegraf && make test && cd ..
18+ secrets :
19+ - dev_registry
20+ - drycc_registry
21+ - container_pull_secrets
22+ when :
23+ event :
24+ - push
25+ - tag
26+ - pull_request
You can’t perform that action at this time.
0 commit comments