Skip to content

Commit 51e8d6d

Browse files
ci docker image steps
1 parent 6fa984f commit 51e8d6d

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.drone.jsonnet

+45-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ local Pipeline(branch, platform, event) = {
121121
status: ['success', 'failure'],
122122
},
123123
},
124-
regressionlog: {
124+
regressionlog:: {
125125
name: 'regressionlog',
126126
image: 'docker',
127127
volumes: [pipeline._volumes.docker],
@@ -137,6 +137,47 @@ local Pipeline(branch, platform, event) = {
137137
status: ['success', 'failure'],
138138
},
139139
},
140+
dockerfile:: {
141+
name: 'dockerfile',
142+
image: 'docker:git',
143+
volumes: [pipeline._volumes.docker],
144+
commands: [
145+
'git clone --depth 1 https://github.com/mariadb-corporation/mariadb-community-columnstore-docker.git',
146+
'cd mariadb-community-columnstore-docker',
147+
'apk add --no-cache patch',
148+
'patch Dockerfile ../Dockerfile.patch',
149+
'cp ../result/MariaDB-common-10* ../result/MariaDB-client-10* ../result/MariaDB-server-10* ../result/MariaDB-shared-10* ../result/MariaDB-columnstore-engine-10* ./',
150+
],
151+
},
152+
ecr:: {
153+
name: 'ecr',
154+
image: 'plugins/ecr',
155+
settings: {
156+
registry: '866067714787.dkr.ecr.us-east-1.amazonaws.com',
157+
repo: 'columnstore',
158+
create_repository: 'true',
159+
context: 'mariadb-community-columnstore-docker',
160+
access_key: {
161+
from_secret: 'ecr_access_key',
162+
},
163+
secret_key: {
164+
from_secret: 'ecr_secret_key'
165+
},
166+
},
167+
},
168+
docker:: {
169+
name: 'docker',
170+
image: 'plugins/docker',
171+
settings: {
172+
repo: 'romcheck/columnstore',
173+
context: '/drone/src/mariadb-community-columnstore-docker',
174+
dockerfile: '/drone/src/mariadb-community-columnstore-docker/Dockerfile',
175+
username: 'romcheck',
176+
password: {
177+
from_secret: 'dockerhub_token',
178+
}
179+
},
180+
},
140181
kind: 'pipeline',
141182
type: 'docker',
142183
name: std.join(' ', [branch, platform, event]),
@@ -229,6 +270,9 @@ local Pipeline(branch, platform, event) = {
229270
},
230271
},
231272
] +
273+
(if (platform == 'centos:8' && event == 'cron') then [pipeline.dockerfile] else []) +
274+
(if (platform == 'centos:8' && event == 'cron') then [pipeline.docker] else []) +
275+
// (if (platform == 'centos:8' && event == 'cron') then [pipeline.ecr] else []) +
232276
(if branch == 'develop' then [pipeline.smoke] else []) +
233277
(if branch == 'develop' then [pipeline.smokelog] else []) +
234278
(if branch == 'develop' then [pipeline.regression] else []) +

Dockerfile.patch

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
45,48c45,46
2+
< # Install MariaDB/ColumnStore packages
3+
< RUN dnf -y install \
4+
< MariaDB-server \
5+
< MariaDB-columnstore-engine
6+
---
7+
> COPY *.rpm /
8+
> RUN dnf -y install /*.rpm && rm -f /*.rpm

0 commit comments

Comments
 (0)