Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit bcff98e

Browse files
author
Simon Lord
committed
Changes build to publish docker images to all OCIR regions
Also worth noting i've set all the repo's across the regions to public. Also i've added OCIRUSERNAME and OCIRPASSWORD env vars to wercker env vars config.
1 parent 2dd6144 commit bcff98e

File tree

6 files changed

+72
-14
lines changed

6 files changed

+72
-14
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ USE_GLOBAL_NAMESPACE ?= false
1717
ifdef WERCKER
1818
# Insert swear words about mysql group replication and hostname length. Arghh..
1919
VERSION := ${WERCKER_GIT_COMMIT}
20+
TENANT := "oracle"
2021
else
2122
NEW_NAMESPACE ?= e2e-${USER}
2223
VERSION := ${USER}-$(shell date +%Y%m%d%H%M%S)
24+
TENANT := "spinnaker"
2325
endif
2426

2527
ROOT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
2628
PKG := github.com/oracle/mysql-operator
27-
REGISTRY := wcr.io/oracle
29+
REGISTRY := iad.ocir.io/$(TENANT)
2830
SRC_DIRS := cmd pkg test/examples
2931
REGISTRY_STRING := $(subst /,_,$(REGISTRY))
3032
CMD_DIRECTORIES := $(sort $(dir $(wildcard ./cmd/*/)))

ci-docker-images/mysql-operator-ci-e2e/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
IMAGE ?= wcr.io/oracle/mysql-operator-ci-e2e
1+
IMAGE ?= iad.ocir.io/oracle/mysql-operator-ci-e2e
22
VERSION ?= 1.1.1
33

44
.PHONY: build

cmd/mysql-operator/app/options/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
const (
3232
mysqlServer = "mysql/mysql-server"
33-
mysqlAgent = "wcr.io/oracle/mysql-agent"
33+
mysqlAgent = "iad.ocir.io/oracle/mysql-agent"
3434
)
3535

3636
// Images is the configuration of required MySQLOperator images. Remember to configure the appropriate
@@ -123,7 +123,7 @@ func (s *MySQLOperatorServer) AddFlags(fs *pflag.FlagSet) *pflag.FlagSet {
123123
fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig).")
124124
fs.StringVar(&s.Namespace, "namespace", metav1.NamespaceAll, "The namespace for which the MySQL operator manages MySQL clusters. Defaults to all.")
125125
fs.StringVar(&s.Images.MySQLServerImage, "mysql-server-image", s.Images.MySQLServerImage, "The name of the target 'mysql-server' image. Defaults to: mysql/mysql-server.")
126-
fs.StringVar(&s.Images.MySQLAgentImage, "mysql-agent-image", s.Images.MySQLAgentImage, "The name of the target 'mysql-agent' image. Defaults to: wcr.io/oracle/mysql-agent.")
126+
fs.StringVar(&s.Images.MySQLAgentImage, "mysql-agent-image", s.Images.MySQLAgentImage, "The name of the target 'mysql-agent' image. Defaults to: iad.ocir.io/oracle/mysql-agent.")
127127
fs.DurationVar(&s.MinResyncPeriod.Duration, "min-resync-period", s.MinResyncPeriod.Duration, "The resync period in reflectors will be random between MinResyncPeriod and 2*MinResyncPeriod.")
128128
return fs
129129
}

docs/user/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ data:
3939
mysql-operator-config.yaml: |
4040
images:
4141
mysqlServer: mysql/mysql-server
42-
mysqlAgent: wcr.io/oracle/mysql-agent
42+
mysqlAgent: iad.ocir.io/oracle/mysql-agent
4343
---
4444
apiVersion: apps/v1beta1
4545
kind: Deployment
@@ -73,7 +73,7 @@ spec:
7373
containers:
7474
- name: mysql-operator-controller
7575
imagePullPolicy: {{ .Values.image.pullPolicy }}
76-
image: wcr.io/oracle/mysql-operator:{{ .Values.image.tag }}
76+
image: iad.ocir.io/oracle/mysql-operator:{{ .Values.image.tag }}
7777
ports:
7878
- containerPort: 10254
7979
volumeMounts:

mysql-operator/templates/03-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
containers:
2525
- name: mysql-operator-controller
2626
imagePullPolicy: {{ .Values.image.pullPolicy }}
27-
image: wcr.io/oracle/mysql-operator:{{ .Values.image.tag }}
27+
image: iad.ocir.io/oracle/mysql-operator:{{ .Values.image.tag }}
2828
ports:
2929
- containerPort: 10254
3030
args:

wercker.yml

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
box: golang:1.9
2-
no-response-timeout: 10
2+
no-response-timeout: 60
3+
command-timeout: 60
34

45
test:
56
base-path: "/go/src/github.com/oracle/mysql-operator"
@@ -52,10 +53,36 @@ push-operator-image:
5253
chmod +x /mysql-operator
5354
5455
- internal/docker-push:
55-
registry: https://wcr.io/v2
56-
repository: wcr.io/oracle/mysql-operator
56+
registry: https://iad.ocir.io/v2
57+
repository: iad.ocir.io/oracle/mysql-operator
5758
tag: $VERSION
5859
entrypoint: /mysql-operator
60+
username: $OCIRUSERNAME
61+
password: $OCIRPASSWORD
62+
63+
- internal/docker-push:
64+
registry: https://lhr.ocir.io/v2
65+
repository: lhr.ocir.io/oracle/mysql-operator
66+
tag: $VERSION
67+
entrypoint: /mysql-operator
68+
username: $OCIRUSERNAME
69+
password: $OCIRPASSWORD
70+
71+
- internal/docker-push:
72+
registry: https://phx.ocir.io/v2
73+
repository: phx.ocir.io/oracle/mysql-operator
74+
tag: $VERSION
75+
entrypoint: /mysql-operator
76+
username: $OCIRUSERNAME
77+
password: $OCIRPASSWORD
78+
79+
- internal/docker-push:
80+
registry: https://fra.ocir.io/v2
81+
repository: fra.ocir.io/oracle/mysql-operator
82+
tag: $VERSION
83+
entrypoint: /mysql-operator
84+
username: $OCIRUSERNAME
85+
password: $OCIRPASSWORD
5986

6087
push-agent-image:
6188
box:
@@ -74,17 +101,46 @@ push-agent-image:
74101
chmod +x /mysql-agent
75102
76103
- internal/docker-push:
77-
registry: https://wcr.io/v2
78-
repository: wcr.io/oracle/mysql-agent
104+
registry: https://iad.ocir.io/v2
105+
username: $OCIRUSERNAME
106+
password: $OCIRPASSWORD
107+
repository: iad.ocir.io/oracle/mysql-agent
108+
tag: $VERSION
109+
entrypoint: /mysql-agent
110+
user: mysql
111+
112+
- internal/docker-push:
113+
registry: https://lhr.ocir.io/v2
114+
username: $OCIRUSERNAME
115+
password: $OCIRPASSWORD
116+
repository: lhr.ocir.io/oracle/mysql-agent
117+
tag: $VERSION
118+
entrypoint: /mysql-agent
119+
user: mysql
120+
121+
- internal/docker-push:
122+
registry: https://phx.ocir.io/v2
123+
username: $OCIRUSERNAME
124+
password: $OCIRPASSWORD
125+
repository: phx.ocir.io/oracle/mysql-agent
126+
tag: $VERSION
127+
entrypoint: /mysql-agent
128+
user: mysql
129+
130+
- internal/docker-push:
131+
registry: https://fra.ocir.io/v2
132+
username: $OCIRUSERNAME
133+
password: $OCIRPASSWORD
134+
repository: fra.ocir.io/oracle/mysql-agent
79135
tag: $VERSION
80136
entrypoint: /mysql-agent
81137
user: mysql
82138

83139
e2e-test:
84140
base-path: "/go/src/github.com/oracle/mysql-operator"
85141
box:
86-
registry: https://wcr.io/v2
87-
id: wcr.io/oracle/mysql-operator-ci-e2e:1.1.1
142+
registry: https://iad.ocir.io/v2
143+
id: iad.ocir.io/oracle/mysql-operator-ci-e2e:1.1.1
88144
steps:
89145
- script:
90146
name: e2e default tests

0 commit comments

Comments
 (0)