Commit 82e7fad1 authored by Reza Sahebgharan's avatar Reza Sahebgharan

test karname on staging.karname.ir

parent 24b06daa
Pipeline #404 passed with stages
in 2 minutes and 22 seconds
...@@ -20,14 +20,14 @@ build_in_branch: ...@@ -20,14 +20,14 @@ build_in_branch:
- docker-compose config - docker-compose config
- docker-compose build - docker-compose build
- docker save -o ./scripts/karname-app.tar karname/app:$env:TAG_VERSION # save docker in scripts folder - docker save -o ./scripts/karname-app.tar karname/app:$env:TAG_VERSION # save docker in scripts folder
- echo y | pscp.exe -batch -l administrator -pw $env:WinRunPass ./scripts/karname-app.tar WinRun:c:/Users/administrator/karname-app.tar # save docker in remote server - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./scripts/karname-app.tar staging.karname.ir:c:/Users/administrator/karname-app.tar # save docker in remote server
- echo y | plink -batch -ssh administrator@WinRun -pw $env:WinRunPass docker load -i c:/Users/administrator/karname-app.tar -q - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass docker load -i c:/Users/administrator/karname-app.tar -q
- echo y | pscp.exe -batch -l administrator -pw $env:WinRunPass ./docker-compose-staging.yml WinRun:c:/Users/administrator/docker-compose.yml # save docker-compose.yml in remote server - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./docker-compose-staging.yml staging.karname.ir:c:/Users/administrator/docker-compose.yml # save docker-compose.yml in remote server
- Set-Variable -Name "envtext" -Value "TAG_VERSION=$env:TAG_VERSION" - Set-Variable -Name "envtext" -Value "TAG_VERSION=$env:TAG_VERSION"
- New-Item -Path '.\.env' -ItemType File - New-Item -Path '.\.env' -ItemType File
- Add-Content .\.env "$envtext" - Add-Content .\.env "$envtext"
- echo y | pscp.exe -batch -l administrator -pw $env:WinRunPass ./.env WinRun:c:/Users/administrator/.env # save .env in remote server - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env staging.karname.ir:c:/Users/administrator/.env # save .env in remote server
- echo y | plink -batch -ssh administrator@WinRun -pw $env:WinRunPass -m ./scripts/command.bat - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass -m ./scripts/command.bat
# - ./scripts/command.ps1 # - ./scripts/command.ps1
allow_failure: true allow_failure: true
except: except:
...@@ -43,6 +43,8 @@ build_in_master: ...@@ -43,6 +43,8 @@ build_in_master:
- echo "starting build in master" - echo "starting build in master"
- npm install - npm install
- npm run test-jest - npm run test-jest
- docker-compose config
- docker-compose build
- docker-compose up -d --force-recreate - docker-compose up -d --force-recreate
allow_failure: true allow_failure: true
only: only:
......
...@@ -7,7 +7,7 @@ services: ...@@ -7,7 +7,7 @@ services:
restart: on-failure restart: on-failure
image: "karname/app:${TAG_VERSION}" image: "karname/app:${TAG_VERSION}"
ports: ports:
- '5050:3000' - '80:3000'
depends_on: depends_on:
- mongo - mongo
links: links:
......
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