Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogstools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Feliks Kiszkurno
ogstools
Commits
32541249
Commit
32541249
authored
4 months ago
by
Tobias Meisel
Browse files
Options
Downloads
Plain Diff
Merge branch 'fixed-devcontainer' into 'main'
[ci] Use prebuilt devcontainer. See merge request
ogs/tools/ogstools!246
parents
ba922e82
ab82f09f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.devcontainer/devcontainer.json
+5
-3
5 additions, 3 deletions
.devcontainer/devcontainer.json
.gitlab-ci.yml
+6
-12
6 additions, 12 deletions
.gitlab-ci.yml
with
11 additions
and
15 deletions
.devcontainer/devcontainer.json
+
5
−
3
View file @
32541249
...
...
@@ -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"
:
{}
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
6
−
12
View file @
32541249
...
...
@@ -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 .
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment