p≡p engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
1.1 KiB

.ensure_docker: &ensure_docker
# Check for docker and install if missing
- 'which docker || ( sudo apt-get update -y && sudo apt-get install docker.io -y )'
.ensure_rsync: &ensure_rsync
# Install rsync and deps if missing
- 'which ssh-agent || ( sudo apt-get update -y && sudo apt-get install openssh-client -y )'
- 'which rsync || ( sudo apt-get update -y && sudo apt-get install rsync -y )'
- 'which make || ( sudo apt-get update -y && sudo apt-get install make -y )'
.enable_insecure_docker_registries: &enable_insecure_docker_registries
# Enable "insecure" docker registries
- |
cat <<EOD > /tmp/docker-daemon.json
{
"insecure-registries" : ["${DOCKER_REGISTRY_HOST}"]
}
EOD
- sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json
- sudo systemctl restart docker.service
.standard_job:
tags: [kvm]
before_script:
- *ensure_docker
- *ensure_rsync
- *enable_insecure_docker_registries
.make_in_docker:
extends: .standard_job
script:
- docker login -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASS} ${DOCKER_REGISTRY_HOST}
- cd scripts/${CI_DISTRO_TARGET}
- make