Skip to content

Commit 27a68e2

Browse files
committed
chore(monitor): use registry.drycc.cc replace docker.io
1 parent a2b363b commit 27a68e2

7 files changed

Lines changed: 36 additions & 29 deletions

File tree

.drone/drone.yml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ platform:
99
steps:
1010
- name: test
1111
commands:
12+
- mkdir -p $HOMEPATH/.docker; echo $IMAGE_PULL_SECRETS > $HOMEPATH/.docker/config.json
1213
- cd grafana && make test && cd ..
1314
- cd telegraf && make test && cd ..
1415
environment:
1516
VERSION: ${DRONE_TAG:-latest}-linux-amd64
16-
DEV_REGISTRY: ${DEV_REGISTRY:-docker.io}
17-
DRYCC_REGISTRY: ${DRYCC_REGISTRY:-docker.io}
17+
DEV_REGISTRY:
18+
from_secret: dev_registry
19+
DRYCC_REGISTRY:
20+
from_secret: drycc_registry
21+
IMAGE_PULL_SECRETS:
22+
from_secret: container_pull_secrets
1823
when:
1924
event:
2025
- push
@@ -23,18 +28,18 @@ steps:
2328

2429
- name: publish
2530
commands:
26-
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
31+
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
2732
- cd grafana && make build-all push-all
2833
environment:
2934
VERSION: ${DRONE_TAG:-latest}-linux-amd64
3035
DEV_REGISTRY:
3136
from_secret: dev_registry
3237
DRYCC_REGISTRY:
3338
from_secret: drycc_registry
34-
DOCKER_USERNAME:
35-
from_secret: docker_username
36-
DOCKER_PASSWORD:
37-
from_secret: docker_password
39+
CONTAINER_USERNAME:
40+
from_secret: container_username
41+
CONTAINER_PASSWORD:
42+
from_secret: container_password
3843
when:
3944
event:
4045
- push
@@ -52,18 +57,18 @@ platform:
5257
steps:
5358
- name: publish
5459
commands:
55-
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
60+
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
5661
- cd grafana && make build-all push-all
5762
environment:
5863
VERSION: ${DRONE_TAG:-latest}-linux-arm64
5964
DEV_REGISTRY:
6065
from_secret: dev_registry
6166
DRYCC_REGISTRY:
6267
from_secret: drycc_registry
63-
DOCKER_USERNAME:
64-
from_secret: docker_username
65-
DOCKER_PASSWORD:
66-
from_secret: docker_password
68+
CONTAINER_USERNAME:
69+
from_secret: container_username
70+
CONTAINER_PASSWORD:
71+
from_secret: container_password
6772
when:
6873
event:
6974
- push
@@ -73,13 +78,15 @@ steps:
7378
kind: pipeline
7479
type: docker
7580
name: manifest
81+
image_pull_secrets:
82+
- container_pull_secrets
7683

7784
steps:
7885
- name: generate grafana manifest
79-
image: docker.io/library/alpine
86+
image: registry.drycc.cc/drycc/python-dev
8087
pull: always
8188
commands:
82-
- sed -i "s/docker.io/$${DRYCC_REGISTRY}/g" .drone/manifest.tmpl
89+
- sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .drone/manifest.tmpl
8390
- sed -i "s/monitor/grafana/g" .drone/manifest.tmpl
8491
environment:
8592
DRYCC_REGISTRY:
@@ -90,20 +97,20 @@ steps:
9097
settings:
9198
spec: .drone/manifest.tmpl
9299
username:
93-
from_secret: docker_username
100+
from_secret: container_username
94101
password:
95-
from_secret: docker_password
102+
from_secret: container_password
96103
environment:
97104
DEV_REGISTRY:
98105
from_secret: dev_registry
99106
DRYCC_REGISTRY:
100107
from_secret: drycc_registry
101108

102109
- name: generate telegraf manifest
103-
image: docker.io/library/alpine
110+
image: registry.drycc.cc/drycc/python-dev
104111
pull: always
105112
commands:
106-
- sed -i "s/docker.io/$${DRYCC_REGISTRY}/g" .drone/manifest.tmpl
113+
- sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .drone/manifest.tmpl
107114
- sed -i "s/grafana/telegraf/g" .drone/manifest.tmpl
108115
environment:
109116
DRYCC_REGISTRY:
@@ -114,9 +121,9 @@ steps:
114121
settings:
115122
spec: .drone/manifest.tmpl
116123
username:
117-
from_secret: docker_username
124+
from_secret: container_username
118125
password:
119-
from_secret: docker_password
126+
from_secret: container_password
120127
environment:
121128
DEV_REGISTRY:
122129
from_secret: dev_registry

.drone/manifest.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: docker.io/drycc/monitor:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}canary{{/if}}
1+
image: registry.drycc.cc/drycc/monitor:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}canary{{/if}}
22
{{#if build.tags}}
33
tags:
44
{{#each build.tags}}
@@ -7,12 +7,12 @@ tags:
77
{{/if}}
88
manifests:
99
-
10-
image: docker.io/drycc/monitor:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-amd64
10+
image: registry.drycc.cc/drycc/monitor:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-amd64
1111
platform:
1212
architecture: amd64
1313
os: linux
1414
-
15-
image: docker.io/drycc/monitor:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-arm64
15+
image: registry.drycc.cc/drycc/monitor:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-arm64
1616
platform:
1717
architecture: arm64
1818
os: linux

charts/monitor/templates/monitor-telegraf-daemon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
serviceAccount: drycc-monitor-telegraf
2727
initContainers:
2828
- name: drycc-monitor-telegraf-init
29-
image: docker.io/drycc/python-dev:latest
29+
image: registry.drycc.cc/drycc/python-dev:latest
3030
imagePullPolicy: {{.Values.imagePullPolicy}}
3131
args:
3232
- netcat

charts/monitor/templates/monitor-telegraf-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
serviceAccount: drycc-monitor-telegraf
3030
initContainers:
3131
- name: drycc-monitor-telegraf-init
32-
image: docker.io/drycc/python-dev:latest
32+
image: registry.drycc.cc/drycc/python-dev:latest
3333
imagePullPolicy: {{.Values.imagePullPolicy}}
3434
args:
3535
- netcat

charts/monitor/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ grafana:
22
imageOrg: "drycc"
33
imagePullPolicy: "Always"
44
imageTag: "canary"
5-
imageRegistry: "docker.io"
5+
imageRegistry: "registry.drycc.cc"
66
# limitsCpu: "100m"
77
# limitsMemory: "50Mi"
88

@@ -25,7 +25,7 @@ telegraf:
2525
imageOrg: "drycc"
2626
imagePullPolicy: "Always"
2727
imageTag: "canary"
28-
imageRegistry: "docker.io"
28+
imageRegistry: "registry.drycc.cc"
2929
# limitsCpu: "100m"
3030
# limitsMemory: "50Mi"
3131

grafana/rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/drycc/base:bullseye
1+
FROM registry.drycc.cc/drycc/base:bullseye
22

33
ENV DRYCC_UID=1001 \
44
DRYCC_GID=1001 \

telegraf/rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/drycc/base:bullseye
1+
FROM registry.drycc.cc/drycc/base:bullseye
22

33
ENV DRYCC_UID=1001 \
44
DRYCC_GID=1001 \

0 commit comments

Comments
 (0)