Added gitlab-ci.yml to be able to build the containers in gitlab.

This commit is contained in:
eddyhub
2018-08-19 11:30:28 +02:00
parent 8697de51a3
commit 825dbbc84d
3 changed files with 18 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
image: docker:latest
services:
- docker:dind
stages:
- build_and_deploy
job:
stage: build_and_deploy
script:
- mkdir ~/.docker
- echo '{"experimental":"enabled"}' | tee ~/.docker/config.json
- apk add --no-cache bash
- ls -al ~/.docker/config.json
- cat ~/.docker/config.json
- bash build.sh $DOCKER_ENV_CI_PROJECT_PATH $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $CI_REGISTRY
+1 -1
View File
@@ -21,4 +21,4 @@ before_install:
- cat ~/.docker/config.json
script:
- bash build.sh $TRAVIS_REPO_SLUG $DOCKER_USERNAME $DOCKER_PASSWORD
- bash build.sh $TRAVIS_REPO_SLUG $DOCKER_USERNAME $DOCKER_PASSWORD index.docker.io
+2 -1
View File
@@ -1,8 +1,9 @@
#!/bin/bash
#!/bin/sh
REPO=${1}
DOCKER_USERNAME=${2}
DOCKER_PASSWORD=${3}
DOCKER_REGESTRY=${4}
declare -A ARCH_MAP
ARCH_MAP[amd64]=amd64
ARCH_MAP[armhf]=arm