Reputation: 381
Using example files .gitlab-ci.yml
and spack.yaml
as in https://spack.readthedocs.io/en/latest/pipelines.html , with this change,
script:
- spack env create ENV
- spack env activate --without-view ENV
and docker tags commented out, yet on running .gitlab-ci.yml
,
Error: Environment yaml does not have "gitlab-ci" section
Had already tried in spack.yaml
to rename section ci:
with gitlab-ci:
though with same erring outcome.
Thus asking for orientation as to how to start solving this.
Contents of .gitlab-ci.yml
as follows,
stages: [generate, build]
variables:
SPACK_REPO: https://github.com/scottwittenburg/spack.git
SPACK_REF: pipelines-reproducible-builds
generate-pipeline:
stage: generate
tags:
# - docker
image:
name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
entrypoint: [""]
before_script:
- git clone ${SPACK_REPO}
- pushd spack && git checkout ${SPACK_REF} && popd
- . "./spack/share/spack/setup-env.sh"
script:
- spack env create ENV
- spack env activate --without-view ENV
- spack -d ci generate
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/pipeline.yml"
artifacts:
paths:
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
build-jobs:
stage: build
trigger:
include:
- artifact: "jobs_scratch_dir/pipeline.yml"
job: generate-pipeline
strategy: depend
as well as spack.yaml
,
spack:
view: false
concretizer:
unify: false
definitions:
- pkgs:
- zlib
- bzip2
- arch:
- '%[email protected] arch=linux-ubuntu18.04-x86_64'
specs:
- matrix:
- - $pkgs
- - $arch
mirrors: { "mirror": "s3://spack-public/mirror" }
ci:
enable-artifacts-buildcache: True
rebuild-index: False
pipeline-gen:
- any-job:
before_script:
- git clone ${SPACK_REPO}
- pushd spack && git checkout ${SPACK_CHECKOUT_VERSION} && popd
- . "./spack/share/spack/setup-env.sh"
- build-job:
# tags: [docker]
image:
name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
entrypoint: [""]
Upvotes: 0
Views: 96