Skip to content

Commit

Permalink
build(jenkins): optimization memory manage
Browse files Browse the repository at this point in the history
  • Loading branch information
YDKD committed Apr 12, 2022
1 parent 2531a76 commit 8b1595a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
6 changes: 0 additions & 6 deletions jenkins/script/build-dev.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#! /bin/bash

# set -x
# stop nestjs
docker stop nestjs

npm run build-dev || exit 1

# start nestjs
docker start nestjs

# set +x
13 changes: 13 additions & 0 deletions jenkins/script/restart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /bin/bash

# set -x
# restart mysql
docker start mysql

# restart nestjs
containerId=`docker ps -a | grep -w nestjs | awk '{print $1}'`

if [ "$containerId" != "" ] ; then
docker start $containerId
echo "成功运行容器 $containerId"
fi
14 changes: 14 additions & 0 deletions jenkins/script/stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash

# set -x
# stop nestjs
containerId=`docker ps -a | grep -w nestjs | awk '{print $1}'`

if [ "$containerId" != "" ] ; then
docker stop $containerId
echo "成功停止容器 $containerId"
fi

# stop mysql
docker stop mysql

0 comments on commit 8b1595a

Please sign in to comment.