-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Début d'implémentation des métadonnées associées à la localisation. #9
- Loading branch information
1 parent
643d7c7
commit 247921c
Showing
4 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,32 @@ | ||
#!/bin/bash | ||
# ------------------------------------------------------------------- | ||
# CONFIGURATION | ||
# ------------------------------------------------------------------- | ||
INI_DIR=app-root/runtime/repo/ | ||
INI_FILE=mapif.ini | ||
APP=mapif | ||
BRANCH=master | ||
|
||
# ------------------------------------------------------------------- | ||
# FUNCTIONS | ||
# ------------------------------------------------------------------- | ||
colecho() { echo -e "\033[${1}m[deploy_openshift]> ${2}\033[0m"; } | ||
becho() { colecho 34 "${1}"; } | ||
gecho() { colecho 32 "${1}"; } | ||
recho() { colecho 31 "${1}"; } | ||
ok() { gecho "done."; } | ||
ko() { recho "failed!"; } | ||
|
||
# ------------------------------------------------------------------- | ||
# MAIN SCRIPT | ||
# ------------------------------------------------------------------- | ||
becho "calling git to push latest commit to openshift..." | ||
(git push openshift ${BRANCH} && ok) ||ko | ||
becho "calling rhc to stop app..." | ||
(sudo rhc app stop -a ${APP} && ok) ||ko | ||
becho "calling rhc to deploy app..." | ||
(sudo rhc deploy ${BRANCH} -a ${APP} && ok) ||ko | ||
becho "calling rhc to send configuration file to openshift..." | ||
(sudo rhc scp ${APP} upload ${INI_FILE} ${INI_DIR} && ok) ||ko | ||
becho "calling rhc to restart application..." | ||
(sudo rhc app restart -a ${APP} && ok) ||ko | ||
#becho "calling rhc to restart application..." | ||
#(sudo rhc app restart -a ${APP} && ok) ||ko | ||
becho "calling rhc to read logs after deployement..." | ||
(sudo rhc tail -a ${APP} && ok) ||ko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters