Edited pipeline

This commit is contained in:
2022-03-30 02:40:26 +03:00
parent 3f3e851590
commit f649cc2c14

View File

@@ -1,3 +1,33 @@
kind: pipeline
type: ssh
name: install dependencies
clone:
disable: true
server:
host: warframe.center
user: webmaster
ssh_key:
from_secret: ssh_private_key
steps:
- name: fetch remote
commands:
- "cd /home/webmaster/warframe-center && \
git fetch --all && \
git reset --hard origin/monorepo"
- name: install dependencies
commands:
- "cd /home/webmaster/warframe-center && \
npm install"
trigger:
branch:
- monorepo
---
kind: pipeline kind: pipeline
type: docker type: docker
name: build name: build
@@ -5,21 +35,6 @@ name: build
clone: clone:
disable: true disable: true
steps:
- name: install dependencies
image: kroniak/ssh-client
environment:
SSH_PRIVATE_KEY:
from_secret: ssh_private_key
commands:
- mkdir ~/.ssh
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
- ssh -o StrictHostKeyChecking=no webmaster@warframe.center "cd /home/webmaster/warframe-center && git fetch --all && git reset --hard origin/monorepo && source ~/.profile && npm install"
when:
branch:
- monorepo
- name: bulid frontend - name: bulid frontend
image: node:16 image: node:16
environment: environment:
@@ -37,6 +52,7 @@ steps:
- chmod 400 ~/.ssh/id_rsa - chmod 400 ~/.ssh/id_rsa
- scp -o StrictHostKeyChecking=no -r ./app/.next webmaster@warframe.center:~/warframe.center - scp -o StrictHostKeyChecking=no -r ./app/.next webmaster@warframe.center:~/warframe.center
- ssh -o StrictHostKeyChecking=no webmaster@warframe.center "pm2 restart warframe-center-app-3000" - ssh -o StrictHostKeyChecking=no webmaster@warframe.center "pm2 restart warframe-center-app-3000"
when:
branch: trigger:
- monorepo branch:
- monorepo