2019-09-18 07:16:43 +02:00
|
|
|
#
|
2019-09-18 07:21:43 +02:00
|
|
|
# MetaCall Guix by Parra Studios
|
|
|
|
# Docker image for using GuixSD in a CI/CD environment.
|
2019-09-18 07:16:43 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2016 - 2019 Vicente Eduardo Ferrer Garcia <vic798@gmail.com>
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
language: minimal
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
sudo: required
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
dist: bionic
|
|
|
|
|
|
|
|
# Global environment variables
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- DOCKER_VERSION: 19.03.2
|
|
|
|
- DOCKER_COMPOSE_VERSION: 1.24.1
|
|
|
|
- GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
|
|
|
# Update Docker & Docker Compose
|
|
|
|
before_script:
|
|
|
|
- sudo rm /usr/local/bin/docker-compose || true
|
|
|
|
- curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
|
|
|
- chmod +x docker-compose
|
|
|
|
- sudo mv docker-compose /usr/local/bin
|
2019-09-18 07:27:27 +02:00
|
|
|
- sudo sh -c 'echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge" > /etc/apt/sources.list.d/docker.list'
|
2019-09-18 07:16:43 +02:00
|
|
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
|
|
- sudo apt-key fingerprint 0EBFCD88
|
|
|
|
- sudo apt-get update
|
2019-09-18 07:27:27 +02:00
|
|
|
- sudo apt-get -y install docker-ce=${DOCKER_VERSION}~ce~3-0~ubuntu-$(lsb_release -cs)
|
2019-09-18 07:16:43 +02:00
|
|
|
- git clone git://github.com/docker/buildx && cd buildx && sudo make install
|
|
|
|
|
|
|
|
# Run the build and packaging
|
|
|
|
script:
|
|
|
|
- docker buildx build --build-arg METACALL_GUIX_VERSION="1.0.1" METACALL_GUIX_ARCH="x86_64" .
|
|
|
|
|
|
|
|
# Upload to Docker the built images
|
|
|
|
after_script:
|
|
|
|
|