diff --git a/scripts/ci/jobs/build-guix.yml b/scripts/ci/jobs/build-guix.yml index febbf7311af11adc7c87889d3f68e8f510757ff8..c62b6f2d36aca34232e3b78870087d3101629ff5 100644 --- a/scripts/ci/jobs/build-guix.yml +++ b/scripts/ci/jobs/build-guix.yml @@ -28,7 +28,7 @@ build guix: guix time-machine -C scripts/guix/channels.scm -- build ogs-petsc-ssd --with-source=ogs-petsc-ssd@6.5.0-testing=$PWD fi -deploy guix container eve: +deploy container: stage: build tags: [guix] needs: [] @@ -43,18 +43,27 @@ deploy guix container eve: # Build phase, retry once if failed - guix time-machine -C scripts/guix/channels.scm -- build bash coreutils - if [ $? -ne 0 ]; then !!; fi - - guix time-machine -C scripts/guix/channels.scm -- build ogs-petsc --with-source=ogs-petsc@6.5.0-testing=$PWD + - guix time-machine -C scripts/guix/channels.scm -- build ogs-petsc --with-source=ogs-petsc=$PWD - if [ $? -ne 0 ]; then !!; fi # Pack phase - - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs-petsc --with-source=ogs-petsc@6.5.0-testing=$PWD | tee | tail -1 ) + - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs-petsc --with-source=ogs-petsc=$PWD | tee | tail -1 ) - echo "Image $image" - ssh sonjenk@frontend2.eve.ufz.de rm -f ${GUIX_PETSC_CONTAINER} - scp $image sonjenk@frontend2.eve.ufz.de:${GUIX_PETSC_CONTAINER} + # Minio upload + - mcli alias set minio https://minio.ufz.de $MINIO_PUBLIC_ACCESS_KEY $MINIO_PUBLIC_SECRET_KEY + - mcli cp $image minio/ogs/public/container/ogs/master/ogs-petsc.squashfs + # Build serial image + - guix time-machine -C scripts/guix/channels.scm -- build ogs --with-source=ogs=$PWD + - if [ $? -ne 0 ]; then !!; fi + - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs --with-source=ogs=$PWD | tee | tail -1 ) + - echo "Image (serial) $image" + - mcli cp $image minio/ogs/public/container/ogs/master/ogs-serial.squashfs -test guix container eve: +test container eve: stage: build tags: [frontend2] - needs: ["deploy guix container eve"] + needs: ["deploy container"] rules: - if: '$CI_COMMIT_BRANCH == "master"' script: diff --git a/scripts/ci/jobs/container.yml b/scripts/ci/jobs/container.yml deleted file mode 100644 index b3f1e3d76c6a8684ab40211fd7ced8c0c625cb85..0000000000000000000000000000000000000000 --- a/scripts/ci/jobs/container.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Built for Sandy Bridge (envinf1) and newer -container: - stage: package - tags: [envinf, shell] - needs: [meta] - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - - if: $CI_COMMIT_TAG - - changes: - - scripts/ci/jobs/container.yml - - if: $CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/ - - when: manual - allow_failure: true - extends: - - .container-maker-setup - script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - > - if [[ "$CI_COMMIT_BRANCH" == "master" ]] ; then - export DOCKER_TAG_SERIAL="--tag $CI_REGISTRY/ogs/$CI_PROJECT_NAME/ogs-serial:latest" - export DOCKER_TAG_PETSC="--tag $CI_REGISTRY/ogs/$CI_PROJECT_NAME/ogs-petsc:latest" - export ON_MASTER_ARGS="--upload -C" - else - export DOCKER_TAG_SERIAL="--tag ci-$CI_PROJECT_NAME-$CI_COMMIT_BRANCH-serial:latest" - export DOCKER_TAG_PETSC="--tag ci-$CI_PROJECT_NAME-$CI_COMMIT_BRANCH-petsc:latest" - fi - # serial container - - > - poetry run ogscm compiler.py ogs.py -B -C -R --ogs ../.. - --build_args ' --progress=plain' - --cvode --ccache --cpmcache --mfront --netcdf - --cpu-target $CPU_TARGET - --cmake_args ' -DOGS_BUILD_TESTING=OFF' - --boost-sourceforge - $DOCKER_TAG_SERIAL - $ON_MASTER_ARGS - # petsc container - - > - poetry run ogscm compiler.py mpi.py ogs.py -B -C -R --ogs ../.. - --build_args ' --progress=plain' - --cvode --ccache --cpmcache --mfront --netcdf - --cpu-target $CPU_TARGET - --cmake_args ' -DOGS_BUILD_TESTING=OFF' - --ompi 4.0.5 --mpi_benchmarks - --boost-sourceforge - $DOCKER_TAG_PETSC - $ON_MASTER_ARGS - # test ogs can run in container - - | - for sif in _out/images/*.sif; do - singularity exec $sif ogs --version - done - artifacts: - name: container - paths: - - ThirdParty/container-maker/_out/images/*.sif