Auto building Docker images after merge

This commit is contained in:
Philipp Holzer 2018-12-13 19:43:45 +01:00
parent f7c06fa240
commit ea3be956d6
No known key found for this signature in database
GPG Key ID: 517BE60E2CE5C8A5
3 changed files with 18 additions and 0 deletions

1
.bashbrew/flags Normal file
View File

@ -0,0 +1 @@
Namespace: friendica

View File

@ -13,6 +13,9 @@ stages:
# full test for master
- name: test images (full)
if: branch = master
# build and push for master
- name: deploy
if: branch = master
install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
@ -83,3 +86,10 @@ jobs:
- env: VERSION=2018.12-rc VARIANT=fpm ARCH=i386
- env: VERSION=2018.12-rc VARIANT=apache ARCH=amd64
- env: VERSION=2018.12-rc VARIANT=apache ARCH=i386
- stage: deploy
env: SCRIPT=build_and_push.sh
script: skip
deploy:
provider: script
script: ./build_and_push.sh

7
build_and_push.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
./generate-stackbrew-library.sh > server
bashbrew --config .bashbrew/ --library ./ build server
bashbrew --config .bashbrew/ --library ./ push server