-
Nico Vermaas authoredNico Vermaas authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 1.83 KiB
stages:
- build
- deploy
build-esap-gui:
stage: build
image: node:lts
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
script:
- node -v
- npm -version
- echo "Building deploy package"
- npm install
- CI= npm run build
- ls
- echo "Build successful"
artifacts:
expire_in: 1 hour
paths:
- build
only:
- master
deploy-esap-gui:
stage: deploy
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan dop814.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- echo "Deploying to server"
- scp -r build/static/* sdc@dop814.astron.nl:~/shared/static
- scp -r build/* sdc@dop814.astron.nl:~/shared/public_html/esap-gui
- echo "Deployed"
when: manual
only:
- esap-gui-dev-xxx
- dev-nico-xxx
- master
deploy-esap-gui-acceptance:
stage: deploy
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan dop457.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- echo "Deploying to server"
- scp -r build/static/* vermaas@dop457.astron.nl:/data/shared/static
- scp -r build/* vermaas@dop457.astron.nl:/data/shared/public_html/esap-gui
- echo "Deployed"
when: manual
only:
- acceptance