Commit b96b832e authored by Reza Sahebgharan's avatar Reza Sahebgharan

build staging

parent d5444f01
Pipeline #384 passed with stages
in 27 seconds
variables:
TAG_VERSION: ""
TAG_VERSION: ''
REMOTE_USERNAME: 'administrator'
REMOTE_IP: 'WinRun'
stages:
- build_in_branch
- cleanup_build
......@@ -13,10 +14,13 @@ build_in_branch:
tags:
- shell
script:
- echo "starting build in branch"
- echo "starting build in branch"
- echo $env:WinRunPass
- docker save -o ./scripts/karname-app.tar karname/app:$env:TAG_VERSION
- echo y | pscp.exe -batch -pw $env:WinRunPass ./scripts/karname-app.tar administrator@WinRun:c:/Users/administrator/karname-app.tar
- docker save -o ./scripts/karname-app.tar karname/app:$env:TAG_VERSION # save docker in scripts folder
- echo y | pscp.exe -batch -pw $env:WinRunPass ./scripts/karname-app.tar $env:REMOTE_USERNAME@$env:REMOTE_IP:c:/Users/$env:REMOTE_USERNAME/karname-app.tar # save docker in remote server
- echo y | plink -batch -ssh administrator@WinRun -pw $env:WinRunPass docker load -i c:/Users/$env:REMOTE_USERNAME/karname-app.tar -q
- echo y | pscp.exe -batch -pw $env:WinRunPass ./docker-compose.yml $env:REMOTE_USERNAME@$env:REMOTE_IP:c:/Users/$env:REMOTE_USERNAME/docker-compose.yml # save docker-compose.yml in remote server
- echo y | plink -batch -ssh administrator@WinRun -pw $env:WinRunPass cd c:/Users/$env:REMOTE_USERNAME/ ; docker-compose up -d --force-recreate
- ./scripts/command.ps1
allow_failure: true
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment