Skip to content

Commit e42a683

Browse files
committed
chore(passport): use registry.drycc.cc replace docker.io
1 parent 8923b96 commit e42a683

6 files changed

Lines changed: 31 additions & 24 deletions

File tree

.drone/drone.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ platform:
99
steps:
1010
- name: test
1111
commands:
12+
- mkdir -p $HOMEPATH/.docker; echo $IMAGE_PULL_SECRETS > $HOMEPATH/.docker/config.json
1213
- make test docker-build-test upload-coverage
1314
environment:
1415
VERSION: ${DRONE_TAG:-latest}-linux-amd64
15-
DEV_REGISTRY: ${DEV_REGISTRY:-docker.io}
16-
DRYCC_REGISTRY: ${DRYCC_REGISTRY:-docker.io}
16+
DEV_REGISTRY:
17+
from_secret: dev_registry
18+
DRYCC_REGISTRY:
19+
from_secret: drycc_registry
20+
IMAGE_PULL_SECRETS:
21+
from_secret: container_pull_secrets
1722
CODECOV_TOKEN:
1823
from_secret: codecov_token
1924
when:
@@ -24,18 +29,18 @@ steps:
2429

2530
- name: publish
2631
commands:
27-
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
32+
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
2833
- make docker-build docker-immutable-push
2934
environment:
3035
VERSION: ${DRONE_TAG:-latest}-linux-amd64
3136
DEV_REGISTRY:
3237
from_secret: dev_registry
3338
DRYCC_REGISTRY:
3439
from_secret: drycc_registry
35-
DOCKER_USERNAME:
36-
from_secret: docker_username
37-
DOCKER_PASSWORD:
38-
from_secret: docker_password
40+
CONTAINER_USERNAME:
41+
from_secret: container_username
42+
CONTAINER_PASSWORD:
43+
from_secret: container_password
3944
when:
4045
event:
4146
- push
@@ -53,18 +58,18 @@ platform:
5358
steps:
5459
- name: publish
5560
commands:
56-
- echo $DOCKER_PASSWORD | docker login $DRYCC_REGISTRY --username $DOCKER_USERNAME --password-stdin
61+
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
5762
- make docker-build docker-immutable-push
5863
environment:
5964
VERSION: ${DRONE_TAG:-latest}-linux-arm64
6065
DEV_REGISTRY:
6166
from_secret: dev_registry
6267
DRYCC_REGISTRY:
6368
from_secret: drycc_registry
64-
DOCKER_USERNAME:
65-
from_secret: docker_username
66-
DOCKER_PASSWORD:
67-
from_secret: docker_password
69+
CONTAINER_USERNAME:
70+
from_secret: container_username
71+
CONTAINER_PASSWORD:
72+
from_secret: container_password
6873
when:
6974
event:
7075
- push
@@ -74,13 +79,15 @@ steps:
7479
kind: pipeline
7580
type: docker
7681
name: manifest
82+
image_pull_secrets:
83+
- container_pull_secrets
7784

7885
steps:
7986
- name: generate manifest
80-
image: docker.io/library/alpine
87+
image: registry.drycc.cc/drycc/python-dev
8188
pull: always
8289
commands:
83-
- sed -i "s/docker.io/$${DRYCC_REGISTRY}/g" .drone/manifest.tmpl
90+
- sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .drone/manifest.tmpl
8491
environment:
8592
DRYCC_REGISTRY:
8693
from_secret: drycc_registry
@@ -90,9 +97,9 @@ 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

.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/passport:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}canary{{/if}}
1+
image: registry.drycc.cc/drycc/passport:{{#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/passport:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-amd64
10+
image: registry.drycc.cc/drycc/passport:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-amd64
1111
platform:
1212
architecture: amd64
1313
os: linux
1414
-
15-
image: docker.io/drycc/passport:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-arm64
15+
image: registry.drycc.cc/drycc/passport:{{#if build.tag}}{{build.tag}}-{{else}}latest-{{/if}}linux-arm64
1616
platform:
1717
architecture: arm64
1818
os: linux

charts/passport/templates/passport-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
serviceAccount: drycc-passport
2727
initContainers:
2828
- name: drycc-passport-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/passport/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
imageOrg: "drycc"
22
imagePullPolicy: "Always"
33
imageTag: "canary"
4-
imageRegistry: "docker.io"
4+
imageRegistry: "registry.drycc.cc"
55
# Set passport deployment replicas
66
replicas: 1
77
# limitsCpu: "100m"

rootfs/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/drycc/base:bullseye as build-app
1+
FROM registry.drycc.cc/drycc/base:bullseye as build-app
22

33
ADD web /web
44
WORKDIR /web
@@ -10,7 +10,7 @@ RUN install-stack node $NODE_VERSION && . init-stack \
1010
&& yarn install \
1111
&& yarn build
1212

13-
FROM docker.io/drycc/base:bullseye
13+
FROM registry.drycc.cc/drycc/base:bullseye
1414

1515
ENV DRYCC_UID=1001 \
1616
DRYCC_GID=1001 \

rootfs/Dockerfile.test

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_HOME_DIR=/workspace \
44
PGDATA="/var/lib/postgresql/data" \

0 commit comments

Comments
 (0)