Updated .gitlab* files to be consistent with other projects

This commit is contained in:
Deon George 2024-02-24 22:47:05 +11:00
parent 5a5d1f4da8
commit a3d4a4336f

View File

@ -1,40 +1,29 @@
image: docker:latest
stages:
- test
- build
- build-manifest
variables:
VERSION: latest
CACHETAG: build
DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375
DOCKER_HOST: tcp://docker:2375
VERSIONARCH: ${VERSION}-${ARCH}
cache:
key: ${CI_JOB_NAME_SLUG}-${CI_COMMIT_REF_SLUG}
paths:
- build-cache
image: docker:latest
services:
- ${CI_REGISTRY}/leenooks/ci-docker:dind
- docker:dind
before_script:
- docker info
- docker version
- if [ ! -d build-cache ]; then mkdir build-cache; fi
- sed -i -e s'/https/http/' /etc/apk/repositories
- HTTP_PROXY=http://proxy.dege.lan:3128 apk add git curl
- docker info && docker version
# env|sort
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
test:
stage: test
script:
- cat /etc/hosts
- env|sort
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker images
only:
- debug
build:
stage: build
script:
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker
only:
- master
include:
- .gitlab-docker-x86_64.yml
- .gitlab-docker-armv7l.yml