Commit 554597dd authored by Reza Sahebgharan's avatar Reza Sahebgharan

Merge branch 'staging_hisworklist' into 'master'

Staging hisworklist

Closes WAD-7340 and WAD-7215

See merge request !4
parents 2c9af4db 1b1d03c8
......@@ -40,7 +40,7 @@ build_in_staging:
- $env:TAG_VERSION=(git describe --tag --abbrev=0)
- $env:BRANCHFULLNAME=(git name-rev --name-only HEAD)
- $env:BRANCHNAME=$env:BRANCHFULLNAME.Split('/')[$env:BRANCHFULLNAME.Split('/').length - 1]
- echo $env:BRANCHNAME.Split('_')[1]
- $env:CONTAINERNAME=$env:BRANCHNAME.Split('_')[1]
- docker login -u reza.s -p aA123456 repo.marcopacs.com
stage: build_in_staging
tags:
......@@ -56,15 +56,18 @@ build_in_staging:
- cd C:\output\bundle\programs\server
- npm install
- cd ../..
- docker build -t karname-app:$env:TAG_VERSION .
- docker build -t repo.marcopacs.com/karname/karname-app:$env:TAG_VERSION .
- docker push repo.marcopacs.com/karname/karname-app:$env:TAG_VERSION
- echo y | plink -ssh administrator@staging.karname.ir "exit"
- docker save -o ./karname-app.tar karname-app:$env:TAG_VERSION # save docker in scripts folder
- echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./karname-app.tar staging.karname.ir:c:/Users/administrator/karname-app.tar # save docker in remote server
- echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass docker load -i c:/Users/administrator/karname-app.tar -q
# - docker save -o ./karname-app.tar karname-app:$env:TAG_VERSION # save docker in scripts folder
# - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./karname-app.tar staging.karname.ir:c:/Users/administrator/karname-app.tar # save docker in remote server
# - 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:StagingPass ./docker-compose.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"
- New-Item -Path '.\.env' -ItemType File
- Add-Content .\.env "$envtext"
- Set-Variable -Name "envtext1" -Value "CONTAINERNAME=$env:CONTAINERNAME"
- Add-Content .\.env "$envtext1"
- 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@staging.karname.ir -pw $env:StagingPass -m ./command.bat
# - ./scripts/command.ps1
......@@ -72,7 +75,9 @@ build_in_staging:
# only:
# - devel-windows
only:
- /^.*staging_.*/
- /^.*staging.*/
build_in_master:
before_script:
......@@ -86,11 +91,11 @@ build_in_master:
only:
- tags
except:
- /^(?!master).+@/
- /^(?!master$)/
on_build_failure:
stage: cleanup_build
script: RD /S /Q "C:\GitLab-Runner\builds"
when: on_failure
# on_build_failure:
# stage: cleanup_build
# script: RD /S /Q "C:\GitLab-Runner\builds"
# when: on_failure
......@@ -2,9 +2,9 @@ version: "3"
services:
app:
container_name: karname-app
container_name: ${CONTAINERNAME} #karname-app
restart: always
image: "karname-app:${TAG_VERSION}"
image: repo.marcopacs.com/karname/karname-app:${TAG_VERSION} #"karname-app:${TAG_VERSION}"
# ports:
# - "80:3000"
# depends_on:
......
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