Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Script recalcul calque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ERASME
Script recalcul calque
Commits
dad9fd17
Commit
dad9fd17
authored
2 years ago
by
Pierre-Gilles Levallois
Browse files
Options
Downloads
Patches
Plain Diff
Add Init-Grid stage
parent
91f4f77b
No related branches found
No related tags found
1 merge request
!6
Fully functional version that calculate layer with all stages
Pipeline
#55211
passed
2 years ago
Stage: Build Calqul
Stage: Deploy Calqul Buttons
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+20
-4
20 additions, 4 deletions
.gitlab-ci.yml
Dockerfiles/python/scripts/launch.sh
+13
-7
13 additions, 7 deletions
Dockerfiles/python/scripts/launch.sh
with
33 additions
and
11 deletions
.gitlab-ci.yml
+
20
−
4
View file @
dad9fd17
...
...
@@ -209,7 +209,23 @@ Build Calqul Git-lfs:
# tags:
# - ns-arb-d01
1. Init Datas
:
1. Init Grid
:
stage
:
Deploy Calqul Buttons
when
:
manual
environment
:
dev
variables
:
NAMESPACE
:
"
ns-$TRIGRAMME-$NAMESPACE_ENV"
CALQUL_ACTION
:
"
init-grid"
before_script
:
-
*prepare_deployment
script
:
-
*apply_confs
rules
:
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
tags
:
-
ns-arb-d01
2. Init Datas
:
stage
:
Deploy Calqul Buttons
when
:
manual
environment
:
dev
...
...
@@ -225,7 +241,7 @@ Build Calqul Git-lfs:
tags
:
-
ns-arb-d01
2
. Compute Factors
:
3
. Compute Factors
:
stage
:
Deploy Calqul Buttons
when
:
manual
environment
:
dev
...
...
@@ -241,7 +257,7 @@ Build Calqul Git-lfs:
tags
:
-
ns-arb-d01
3
. Compute Indices
:
4
. Compute Indices
:
stage
:
Deploy Calqul Buttons
when
:
manual
environment
:
dev
...
...
@@ -257,7 +273,7 @@ Build Calqul Git-lfs:
tags
:
-
ns-arb-d01
4
. Dump Datas
:
5
. Dump Datas
:
stage
:
Deploy Calqul Buttons
when
:
manual
environment
:
dev
...
...
This diff is collapsed.
Click to expand it.
Dockerfiles/python/scripts/launch.sh
+
13
−
7
View file @
dad9fd17
...
...
@@ -54,7 +54,7 @@ comment () {
# Usage
usage
()
{
comment
"
$0
[init-datas|compute-factors|compute-indices|dump-datas|all]
$namespace_env
$DB_HOST
$DB_PORT
$DB_NAME
$DB_USER
"
comment
"
$0
[init-
grid|init-
datas|compute-factors|compute-indices|dump-datas|all]
$namespace_env
$DB_HOST
$DB_PORT
$DB_NAME
$DB_USER
"
}
# Check the last command return code (must be insterted just after the commend )
...
...
@@ -92,17 +92,17 @@ comment "command line is '$0 $action $namespace_env $DB_HOST $DB_PORT $DB_NAME $
comment
"Postgres server says : "
nb_try
=
1
while
[
$nb_try
-lt
11
]
;
do
is_pgready
=
$(
pg_isready
-d
$DB_NAME
-h
$DB_HOST
-p
$DB_PORT
-U
$DB_USER
)
if
[
$is_pgready
-ne
0
]
;
then
is_pgready
=
$(
"
pg_isready -d
$DB_NAME
-h
$DB_HOST
-p
$DB_PORT
-U
$DB_USER
"
)
if
[
"x
$is_pgready
"
!=
"x0"
]
;
then
comment
"Try #
$nb_try
: PostGIS Database is not ready. Sleeping for 30s, before retry..."
sleep
30
;
sleep
1
;
((
nb_try++
))
else
break
fi
done
if
[
$is_pgready
-ne
0
]
;
then
is_pgready
=
$(
pg_isready
-d
$DB_NAME
-h
$DB_HOST
-p
$DB_PORT
-U
$DB_USER
)
if
[
"x
$is_pgready
"
!=
"x0"
]
;
then
is_pgready
=
$(
"
pg_isready -d
$DB_NAME
-h
$DB_HOST
-p
$DB_PORT
-U
$DB_USER
"
)
check
fi
;
...
...
@@ -111,7 +111,7 @@ python3 main.py displayEnv
comment
"Checking action to do : "
case
"
$action
"
in
"init-datas"
|
"compute-factors"
|
"compute-indices"
|
"dump-datas"
|
"all"
)
"init-grid"
|
"init-datas"
|
"compute-factors"
|
"compute-indices"
|
"dump-datas"
|
"all"
)
comment
"Action is '
$action
'."
check
;;
...
...
@@ -122,6 +122,12 @@ case "$action" in
;;
esac
if
[
$action
==
"init-grid"
]
||
[
$action
==
"all"
]
;
then
stage
"init-grid"
python3 main.py initGrid
$GRID_SIZE
check
fi
if
[
$action
==
"init-datas"
]
||
[
$action
==
"all"
]
;
then
stage
"init-datas"
python3 main.py initDatas
...
...
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