Commit 0d2ec3a4 authored by Reza Sahebgharan's avatar Reza Sahebgharan

linux build

parent 739887b1
Pipeline #1130 passed with stage
in 12 seconds
...@@ -20,12 +20,12 @@ build_in_devel: ...@@ -20,12 +20,12 @@ build_in_devel:
- shell - shell
script: script:
- echo "starting build in branch" - echo "starting build in branch"
- npm install # # - npm install
# - npm run test-jest # # - npm run test-jest
- docker-compose config # - docker-compose config
- docker-compose build # - docker-compose build
- docker push 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.marcopacs.ir "exit" - echo y | plink -ssh administrator@staging.marcopacs.ir "exit"
# # - 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:StagingPass ./scripts/karname-app.tar staging.karname.ir: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@staging.karname.ir -pw $env:StagingPass 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
...@@ -34,16 +34,16 @@ build_in_devel: ...@@ -34,16 +34,16 @@ build_in_devel:
# # - Add-Content .\.env "$envtext" # # - Add-Content .\.env "$envtext"
# # - 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 | 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 ./scripts/command.bat # # - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass -m ./scripts/command.bat
# - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./docker-compose-staging.yml staging.marcopacs.ir: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.marcopacs.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"
# - Set-Variable -Name "envtext1" -Value "CONTAINERNAME=$env:CONTAINERNAME" - Set-Variable -Name "envtext1" -Value "CONTAINERNAME=$env:CONTAINERNAME"
# - Add-Content .\.env "$envtext1" - Add-Content .\.env "$envtext1"
# - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env staging.marcopacs.ir:c:/Users/administrator/.env # save .env in remote server - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env staging.marcopacs.ir:c:/Users/administrator/.env # save .env in remote server
# - Set-Variable -Name "batchtext" -Value "cd c:/Users/administrator&&docker-compose config&&docker-compose pull app&&docker-compose -p $env:CONTAINERNAME up -d --force-recreate" - Set-Variable -Name "batchtext" -Value "cd c:/Users/administrator&&docker-compose config&&docker-compose pull app&&docker-compose -p $env:CONTAINERNAME up -d --force-recreate"
# - Add-Content .\command.bat "$batchtext" - Add-Content .\command.bat "$batchtext"
# - echo y | plink -batch -ssh administrator@staging.marcopacs.ir -pw $env:StagingPass -m ./command.bat - echo y | plink -batch -ssh administrator@staging.marcopacs.ir -pw $env:StagingPass -m ./command.bat
allow_failure: true allow_failure: true
only: only:
- /^.*staging.*/ - /^.*staging.*/
......
...@@ -13,7 +13,7 @@ services: ...@@ -13,7 +13,7 @@ services:
# - mongo # - mongo
environment: environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost} ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo-windows:27017/karname MONGO_URL: mongodb://mongo-windows:27018/karname
PORT: 80 PORT: 80
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}' METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes: volumes:
......
...@@ -8,6 +8,7 @@ WORKDIR $APP_SOURCE_FOLDER/ ...@@ -8,6 +8,7 @@ WORKDIR $APP_SOURCE_FOLDER/
# Copy app package.json and package-lock.json into container # Copy app package.json and package-lock.json into container
COPY ./package*.json $APP_SOURCE_FOLDER/ COPY ./package*.json $APP_SOURCE_FOLDER/
RUN npm uninstall cypress
RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh
# Copy app source into container # Copy app source into container
......
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