Skip to content

Commit

Permalink
external pipeline definition (#158)
Browse files Browse the repository at this point in the history
Remove the `workflow` path that defines the scripts used to generate CI/CD pipelines, and scripts for the build and test stages.
It is replaced with the same set of scripts, implemented in the separate repository https://github.com/eth-cscs/uenv-pipeline
  • Loading branch information
bcumming authored Oct 15, 2024
1 parent 4a8509d commit a32ab9e
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 1,320 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ env
# oras binary, downloaded during build
oras

# the pipeline repository, cloned by ci/ci.yaml ant test.sh
uenv-pipeline

# generated by test.sh
tmp.sh

# python gubbins
ci/.pyenv
__pycache__

5 changes: 4 additions & 1 deletion ci/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ pipeline-configure:
tags: [rosa-k8s-lightweight]
image: docker.io/python:latest
script:
- ./workflow/configure-pipeline -c./config.yaml -r./recipes -s$system -u$uenv -a$uarch -o./pipeline.yml
- git clone https://github.com/eth-cscs/uenv-pipeline.git
- ./uenv-pipeline/configure-pipeline -c./config.yaml -r./recipes -s$system -u$uenv -a$uarch -o./pipeline.yml
artifacts:
paths:
- pipeline.yml
- uenv-pipeline

generated-pipeline:
stage: run
needs: [pipeline-configure]
variables:
CSCS_NOTIFICATION_CONTEXT: "$system-$uarch-$uenv"
PARENT_PIPELINE_ID: "$CI_PIPELINE_ID"
trigger:
include:
- artifact: pipeline.yml
Expand Down
30 changes: 30 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e

system=eiger
uenv=prgenv-gnu:24.7
uarch=zen2

echo "==== CLONING THE PIPELINE ===="
if [ -d ./uenv-pipeline ]; then
echo "== cleaning up old copy"
rm -rf uenv-pipeline
fi
git clone https://github.com/eth-cscs/uenv-pipeline.git

echo ""
echo "==== CONFIGURING THE PIPELINE ===="
./uenv-pipeline/configure-pipeline -c./config.yaml -r./recipes -s$system -u$uenv -a$uarch -o./pipeline.yml

echo ""
echo "==== GENERATING THE BUILD COMMAND ===="
echo '#!/bin/bash' > tmp.sh
echo 'TESTRUN="-t"' >> tmp.sh
grep '^#@@cmd@@' pipeline.yml | sed s'|#@@cmd@@||g' >> tmp.sh
chmod +x tmp.sh
cat tmp.sh

echo ""
echo "==== RUNNING THE BUILD COMMAND ===="
./tmp.sh
95 changes: 0 additions & 95 deletions workflow/configure-pipeline

This file was deleted.

159 changes: 0 additions & 159 deletions workflow/pipeline/ci.py

This file was deleted.

Loading

0 comments on commit a32ab9e

Please sign in to comment.