Skip to content
Snippets Groups Projects
Commit 3c5ee5d7 authored by Pierre-Gilles Levallois's avatar Pierre-Gilles Levallois
Browse files

Refactoring stage name because Openshift does not allow UPPERCASE in subdomain names.

parent 1e2951cb
Branches
Tags
1 merge request!6Fully functional version that calculate layer with all stages
Pipeline #54791 passed
...@@ -215,7 +215,7 @@ Build Calqul Git-lfs: ...@@ -215,7 +215,7 @@ Build Calqul Git-lfs:
environment: dev environment: dev
variables: variables:
NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV" NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV"
CALQUL_ACTION: "initDatas" CALQUL_ACTION: "init-datas"
before_script: before_script:
- *prepare_deployment - *prepare_deployment
script: script:
...@@ -231,7 +231,7 @@ Build Calqul Git-lfs: ...@@ -231,7 +231,7 @@ Build Calqul Git-lfs:
environment: dev environment: dev
variables: variables:
NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV" NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV"
CALQUL_ACTION: "computeFactors" CALQUL_ACTION: "compute-factors"
before_script: before_script:
- *prepare_deployment - *prepare_deployment
script: script:
...@@ -247,7 +247,7 @@ Build Calqul Git-lfs: ...@@ -247,7 +247,7 @@ Build Calqul Git-lfs:
environment: dev environment: dev
variables: variables:
NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV" NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV"
CALQUL_ACTION: "computeIndices" CALQUL_ACTION: "compute-indices"
before_script: before_script:
- *prepare_deployment - *prepare_deployment
script: script:
...@@ -263,7 +263,7 @@ Build Calqul Git-lfs: ...@@ -263,7 +263,7 @@ Build Calqul Git-lfs:
environment: dev environment: dev
variables: variables:
NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV" NAMESPACE: "ns-$TRIGRAMME-$NAMESPACE_ENV"
CALQUL_ACTION: "dumpDatas" CALQUL_ACTION: "dump-datas"
before_script: before_script:
- *prepare_deployment - *prepare_deployment
script: script:
......
...@@ -54,7 +54,7 @@ comment () { ...@@ -54,7 +54,7 @@ comment () {
# Usage # Usage
usage () { usage () {
comment "$0 [initDatas|computeFactors|computeIndices|dumpDatas|all] $namespace_env $DB_HOST $DB_PORT $DB_NAME $DB_USER" comment "$0 [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 ) # Check the last command return code (must be insterted just after the commend )
...@@ -98,7 +98,7 @@ python3 main.py displayEnv ...@@ -98,7 +98,7 @@ python3 main.py displayEnv
comment "Checking action to do : " comment "Checking action to do : "
case "$action" in case "$action" in
"initDatas"|"computeFactors"|"computeIndices"|"dumpDatas"|"all" ) "init-datas"|"compute-factors"|"compute-indices"|"dump-datas"|"all" )
comment "Action is '$action'." comment "Action is '$action'."
check check
;; ;;
...@@ -109,13 +109,13 @@ case "$action" in ...@@ -109,13 +109,13 @@ case "$action" in
;; ;;
esac esac
if [ $action == "initDatas" ] || [ $action == "all" ]; then if [ $action == "init-datas" ] || [ $action == "all" ]; then
stage "InitDatas" stage "init-datas"
python3 main.py initDatas python3 main.py initDatas
check check
fi fi
if [ $action == "computeFactors" ] || [ $action == "all" ]; then if [ $action == "compute-factors" ] || [ $action == "all" ]; then
stage "Compute Factors & Indices" stage "Compute Factors & Indices"
for NOM_COMMUNE in $( echo "${!LISTE_COMMUNES[@]}" | tr ' ' '\n' | sort ); do for NOM_COMMUNE in $( echo "${!LISTE_COMMUNES[@]}" | tr ' ' '\n' | sort ); do
CODE_INSEE=${LISTE_COMMUNES[$NOM_COMMUNE]} CODE_INSEE=${LISTE_COMMUNES[$NOM_COMMUNE]}
...@@ -125,7 +125,7 @@ if [ $action == "computeFactors" ] || [ $action == "all" ]; then ...@@ -125,7 +125,7 @@ if [ $action == "computeFactors" ] || [ $action == "all" ]; then
done done
fi fi
if [ $action == "computeIndices" ] || [ $action == "all" ]; then if [ $action == "compute-indices" ] || [ $action == "all" ]; then
stage "Compute Indices" stage "Compute Indices"
python3 main.py computeIndices python3 main.py computeIndices
check check
...@@ -134,7 +134,7 @@ fi ...@@ -134,7 +134,7 @@ fi
# Launching everything, it is possible to give a list of townships # Launching everything, it is possible to give a list of townships
# python3 main.py computeAll # python3 main.py computeAll
if [ $action == "dumpDatas" ] || [ $action == "all" ]; then if [ $action == "dump-datas" ] || [ $action == "all" ]; then
stage "Dumping result database" stage "Dumping result database"
# #
# Option "--no-password" is set not to have to provide password by prompt. # Option "--no-password" is set not to have to provide password by prompt.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment