Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit ef1e159

Browse files
committed
Switches to the ix.ai ci-templates build pipeline
1 parent d923476 commit ef1e159

File tree

3 files changed

+9
-37
lines changed

3 files changed

+9
-37
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
variables:
22
DOCKER_DRIVER: overlay2
3+
DOCKERHUB_REPO_PREFIX: ixdotai
4+
DOCKERHUB_REPO_NAME: mariadb-backup
35

4-
stages:
5-
- build
6-
7-
.tags-template: &tags-definition
8-
tags:
9-
- ix-ai
10-
11-
.build-template: &build-definition
12-
image:
13-
name: gcr.io/kaniko-project/executor:debug
14-
entrypoint: [""]
15-
stage: build
16-
script:
17-
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
18-
- /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile ${CI_PROJECT_DIR}/Dockerfile --destination ${IMAGE_TAG}
19-
20-
build:test:
21-
except:
22-
- master
23-
- latest
24-
before_script:
25-
- export IMAGE_TAG="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
26-
<<: *tags-definition
27-
<<: *build-definition
28-
29-
build:release:
30-
only:
31-
- master
32-
before_script:
33-
- export IMAGE_TAG="${CI_REGISTRY_IMAGE}:latest"
34-
<<: *tags-definition
35-
<<: *build-definition
6+
include:
7+
- remote: https://gitlab.com/ix.ai/ci-templates/raw/master/bash-project.yml

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ FROM debian:buster
22
LABEL MAINTAINER="docker@ix.ai"
33
ENV DEBIAN_FRONTEND=noninteractive TERM=linux DB_PORT=3306 DB_USER=root
44

5-
RUN groupadd -g 666 mybackup && \
5+
COPY src/ /app
6+
7+
RUN chmod 755 /app/*.sh && \
8+
groupadd -g 666 mybackup && \
69
useradd -u 666 -g 666 -d /backup -c "MariaDB Backup User" mybackup && \
710
apt-get update && \
811
apt-get -y dist-upgrade && \
@@ -12,10 +15,7 @@ RUN groupadd -g 666 mybackup && \
1215
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
1316
find /var/log -type f | while read f; do echo -ne '' > $f; done;
1417

15-
COPY init.sh /init.sh
16-
RUN chmod 750 /init.sh
17-
1818
VOLUME ["/backup"]
1919
WORKDIR /backup
2020

21-
CMD ["/init.sh"]
21+
ENTRYPOINT ["/app/mariadb-backup.sh"]
File renamed without changes.

0 commit comments

Comments
 (0)