Build docker images with spack inside
This prevents that the executing runner needs to be prepared to access GitHub
This commit is contained in:
parent
bf5d6f1e23
commit
d3af0fd937
|
@ -1,14 +1,12 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- git clone -b v$SPACK_VERSION https://github.com/spack/spack.git
|
- pwd
|
||||||
- . ./spack/share/spack/setup_env.sh
|
- . /spack/share/spack/setup-env.sh
|
||||||
- spack repo add .
|
- spack repo add .
|
||||||
|
|
||||||
image: registry.dune-project.org/docker/ci/debian:10
|
|
||||||
|
|
||||||
spectest:v0.14.2:
|
spectest:v0.14.2:
|
||||||
variables:
|
image: registry.dune-project.org/spack/dune-spack:v0.14.2
|
||||||
- SPACK_VERSION : "0.14.2"
|
script: spack spec dune
|
||||||
script:
|
tags:
|
||||||
- spack spec dune
|
- cores:1
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# This is a Dockerfile that sets up a simple Docker image for CI testing
|
||||||
|
# We need this, because we need to install spack into the Docker image
|
||||||
|
# in order to avoid the runners requiring access to Github.
|
||||||
|
FROM debian:latest
|
||||||
|
MAINTAINER dominic.kempf@iwr.uni-heidelberg.de
|
||||||
|
|
||||||
|
RUN export DEBIAN_FRONTEND=noninteractive; \
|
||||||
|
apt-get update && apt-get dist-upgrade --no-install-recommends --yes \
|
||||||
|
&& apt-get install --no-install-recommends --yes \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
procps \
|
||||||
|
python \
|
||||||
|
python-dev \
|
||||||
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ARG version=master
|
||||||
|
RUN git clone -b $version https://github.com/spack/spack.git
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
version="$1"
|
||||||
|
|
||||||
|
docker build -t registry.dune-project.org/spack/dune-spack:$version --build-arg version=$version .
|
||||||
|
docker login registry.dune-project.org
|
||||||
|
docker push registry.dune-project.org/spack/dune-spack:$version
|
||||||
|
docker logout registry.dune-project.org
|
Loading…
Reference in New Issue