Skip to content
Snippets Groups Projects
Commit 16f92b1e authored by Jonathan Calmels's avatar Jonathan Calmels
Browse files

Add gitlab CI

parent eb433ddd
No related branches found
No related tags found
No related merge requests found
image: docker:stable
services:
- docker:stable-dind
variables:
DRIVER_VERSION: "396.37"
REPOSITORY: "${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
OS: "centos7"
before_script:
- docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}"
stages:
- build
latest:
stage: build
script:
- docker build -t "${REPOSITORY}:${DRIVER_VERSION}-${OS}"
--build-arg DRIVER_VERSION=${DRIVER_VERSION} --build-arg KERNEL_VERSION=latest .
- KERNEL_VERSION=$(docker run --rm --entrypoint='/bin/sh' "${REPOSITORY}:${DRIVER_VERSION}-${OS}"
-c "./mkprecompiled -i kernel/precompiled/* | awk '/description/ {print \$2}' | sed 's/.el7.$(uname -m)//'")
- docker tag "${REPOSITORY}:${DRIVER_VERSION}-${OS}" "${REPOSITORY}:${DRIVER_VERSION}-${KERNEL_VERSION}-${OS}"
- docker push "${REPOSITORY}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment