Remove gitlab-ci
This commit is contained in:
parent
fa30c04815
commit
150ee1b728
1 changed files with 0 additions and 69 deletions
|
@ -1,69 +0,0 @@
|
||||||
image: node:14-alpine
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- publish
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
variables:
|
|
||||||
DOCKER_HOST: tcp://docker:2375
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
DOCKER_TLS_CERTDIR: ''
|
|
||||||
|
|
||||||
# only used for deploy stage
|
|
||||||
default:
|
|
||||||
before_script:
|
|
||||||
- apk update
|
|
||||||
- apk add openssh
|
|
||||||
- apk add rsync
|
|
||||||
- apk add bash
|
|
||||||
- apk add yarn
|
|
||||||
- apk add docker
|
|
||||||
- mkdir /root/.ssh
|
|
||||||
- touch /root/.ssh/id_rsa
|
|
||||||
- echo -e $SSH_KEY | awk '{gsub("\\\\n","\n")};1' >> /root/.ssh/id_rsa
|
|
||||||
- chmod 600 /root/.ssh/id_rsa
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
before_script: []
|
|
||||||
script:
|
|
||||||
- echo "Building app"
|
|
||||||
- yarn
|
|
||||||
- echo "REACT_APP_API_URL=https://oas-api.initdevelopment.com/api/v1" > .env
|
|
||||||
- echo "EXTEND_ESLINT=true" >> .env
|
|
||||||
- yarn build
|
|
||||||
- mv build web-build
|
|
||||||
- echo "Build successful"
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 hour
|
|
||||||
name: web-build
|
|
||||||
paths:
|
|
||||||
- web-build
|
|
||||||
|
|
||||||
publish:
|
|
||||||
stage: publish
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
services:
|
|
||||||
- docker:18.09.7-dind
|
|
||||||
script:
|
|
||||||
- echo "Publishing production app (ID $CI_PIPELINE_ID)"
|
|
||||||
- cp deployment/Dockerfile web-build
|
|
||||||
- cp deployment/nginx.conf web-build
|
|
||||||
- cd web-build
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
- docker build -t $CI_REGISTRY/init/oas/image:dev .
|
|
||||||
- docker push $CI_REGISTRY/init/oas/image:dev
|
|
||||||
- echo "Publishing complete"
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
stage: deploy
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- echo "Deploying (ID $CI_PIPELINE_ID)"
|
|
||||||
- ssh -o StrictHostKeyChecking=no ubuntu@213.108.108.105 /home/ubuntu/run-services.sh
|
|
||||||
environment:
|
|
||||||
name: development
|
|
||||||
url: https://oas.initdevelopment.com
|
|
Loading…
Reference in a new issue