Skip to content
Snippets Groups Projects
Commit 32541249 authored by Tobias Meisel's avatar Tobias Meisel
Browse files

Merge branch 'fixed-devcontainer' into 'main'

[ci] Use prebuilt devcontainer.

See merge request ogs/tools/ogstools!246
parents ba922e82 ab82f09f
Branches
Tags
No related merge requests found
......@@ -2,9 +2,11 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "ogstools with FEFLOW",
"build": {
"dockerfile": "Dockerfile"
},
// Swap "build" and "image" for locally building the container
// "build": {
// "dockerfile": "Dockerfile"
// },
"image": "registry.opengeosys.org/ogs/tools/ogstools/devcontainer-3.10",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git-lfs:1": {}
......
......@@ -12,11 +12,6 @@ variables:
workflow:
rules:
- if: $CI_MERGE_REQUEST_IID
changes:
- .devcontainer/*
variables:
DOCKER_IMAGE: $CI_REGISTRY_IMAGE/devcontainer-3.10:$CI_COMMIT_REF_SLUG
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH == "ogs/tools/ogstools"'
......@@ -281,7 +276,7 @@ deploy-pages-tag:
- mv ../public $CI_COMMIT_TAG
- git add $CI_COMMIT_TAG
- >
jq 'map(if has("preferred") then del(.preferred) else . end) + [{"version": env.PARENT_PIPELINE_TAG,"url": "https://ogstools.opengeosys.org/\($ENV.PARENT_PIPELINE_TAG)/","preferred": true}]' _static/versions.json > versions.tmp
jq 'map(if has("preferred") then del(.preferred) else . end) + [{"version": "$CI_COMMIT_TAG","url": "https://ogstools.opengeosys.org/$CI_COMMIT_TAG/","preferred": true}]' _static/versions.json > versions.tmp
- mv versions.tmp _static/versions.json
- git add _static/versions.json
- rm stable && ln -s $CI_COMMIT_TAG stable && git add stable
......@@ -306,12 +301,12 @@ devcontainer image:
- envinf
- shell
rules:
- changes:
- .devcontainer/*
# - when: manual # uncomment if required, otherwise jobs are skipped
- when: manual
allow_failure: true
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- devcontainer build --workspace-folder . --push true --image-name ${DOCKER_IMAGE}
# --push true will be done manually on a developers machine
- devcontainer build --workspace-folder . --image-name ${DOCKER_IMAGE}
user container image:
stage: .pre
......@@ -326,8 +321,7 @@ user container image:
variables:
DOCKER_USER_IMAGE: registry.opengeosys.org/ogs/tools/ogstools/main-3.10:$CI_COMMIT_TAG
allow_failure: true
- when: manual
allow_failure: true
- if: $CI_MERGE_REQUEST_IID
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $DOCKER_USER_IMAGE .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment