...
 
Commits (2)
......@@ -54,10 +54,25 @@ deploy_development:
name: development
only:
- development
#deploy_staging:
# stage: deploy
# script:
# environment:
# name: staging
# only:
# - staging
deploy_staging:
stage: deploy
script:
# edit & send docker file
- sed -i s/"{SSH_USER_PASS}"/${SSH_USER_PASS}/g install.sh
- sed -i s/"{SSH_PORT}"/${SSH_PORT}/g install.sh
- sed -i s/"{SSH_USER_NAME}"/${SSH_USER_NAME}/g install.sh
- sed -i s/"{CI_BUILD_REF_NAME}"/${CI_BUILD_REF_NAME}/g install.sh
- sed -i s/"{ENVIRONMENT}"/STG/g install.sh
# copy install script
- sshpass -e scp -o stricthostkeychecking=no -P ${SSH_PORT} install.sh ${SSH_USER_NAME}@91.121.9.53:/tmp/install.sh
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker cp /tmp/install.sh ymirfrostgiant_stg_console:/tmp/install.sh
# start container & run install
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker start ymirfrostgiant_stg_console
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker exec -t ymirfrostgiant_stg_console bash /tmp/install.sh
# remove install script
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker exec -t ymirfrostgiant_stg_console rm /tmp/install.sh
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 rm -R /tmp/install.sh
environment:
name: staging
only:
- staging
......@@ -211,7 +211,7 @@ def patchTrainingsession(id,trainingChunkSize,saveInterval,comments):
checkresponse(response)
# summarize
def summarizeTrainingsession(id):
URL=endPointURL+'/'+TrainerResourcePathType.GLOBAL_TRAININGSESSION.value.replace(TrainerResourceValueType.PERCEPTRON.value,str(id))
URL=endPointURL+'/'+TrainerResourcePathType.TRAININGSESSION_SUMMARY.value.replace(TrainerResourceValueType.PERCEPTRON.value,str(id))
response = get(URL)
checkresponse(response)
print(response.text)
......