This commit is contained in:
Vassiliy Yegorov
2020-07-17 14:15:01 +07:00
parent 6fd349b776
commit 20c0baa3b5
13 changed files with 422 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
image: docker.ds.mlmsoft.cloud/images/docker
variables:
DOCKER_BASEIMAGE: ubuntu:18.04
# DOCKER_IMAGE_NAME: ${CI_PROJECT_PATH#*/}
# DOCKER_IMAGE_TAG: latest
BUILD_SCRIPT: ci/build-image/build.sh
# GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_STRATEGY: none
#before_script:
# - export DOCKER_ARG0="key=value"
# - export DOCKER_ARG1="key=value"
stages:
- build
build:
stage: build
script:
- git submodule sync
- git submodule update --init --remote --force
- chmod +x "${BUILD_SCRIPT}" && "./${BUILD_SCRIPT}"
when: manual
+21
View File
@@ -0,0 +1,21 @@
image: docker.ds.mlmsoft.cloud/images/docker
variables:
DOCKER_BASEIMAGE: ubuntu:18.04
# DOCKER_IMAGE_NAME: ${CI_PROJECT_PATH#*/}
# DOCKER_IMAGE_TAG: latest
BUILD_SCRIPT: ci/build-image/build.sh
#before_script:
# - export DOCKER_ARG0="key=value"
# - export DOCKER_ARG1="key=value"
stages:
- build
build:
stage: build
script:
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ds.mlmsoft.cloud/infra/ci-build-image.git ${BUILD_SCRIPT%/*}
- chmod +x "${BUILD_SCRIPT}" && "./${BUILD_SCRIPT}"
when: manual
+8
View File
@@ -0,0 +1,8 @@
ARG DOCKER_BASEIMAGE
FROM ${DOCKER_BASEIMAGE}
ARG DOCKER_MAINTAINER
LABEL maintainer="${DOCKER_MAINTAINER}"
# Uncomment if you use assets/
#COPY assets/ /
+17
View File
@@ -0,0 +1,17 @@
image = image_name
all: build
clean:
@docker images -f "dangling=true" -q | docker ps -a -f "ancestor={}" -q | xargs --no-run-if-empty docker rm
@docker images -f "dangling=true" -q | xargs --no-run-if-empty docker rmi -f
@docker ps --filter "ancestor=${image}" --format {{.ID}} | xargs --no-run-if-empty docker stop || true
@docker ps -a --filter "ancestor=${image}" --format {{.ID}} | xargs --no-run-if-empty docker rm || true
@docker images --filter "reference=${image}" --format {{.ID}} | xargs --no-run-if-empty docker rmi || true
build:
@docker build --tag=${image} --no-cache .
release: build
@docker build --tag=${image}:$(shell cat VERSION) .
+1
View File
@@ -0,0 +1 @@
1.0.0
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
git submodule add -b master ../../infra/ci-build-image.git ci/build-image