@@ -18,8 +18,6 @@ build:
- testwas
script:
- echo "build ....."
-# - path=`pwd`
-# - sudo bash ci/judgePush.sh $path
test:
stage: test
@@ -35,8 +33,9 @@ deploy:
# - echo "deploy ...."
- - path=`pwd`
- - sudo bash ci/judgePush.sh $path
+# - path=`pwd`
+# - sudo bash ci/judgePush.sh $path
- cd /var/www/testwas && git pull
+ -
# only:
# - master
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+project_path=/var/www/testwas
+update_path=/var/www/update
+#重启队列
+#sudo bash runServes.sh
+#进入项目目录
+cd $project_path
+#将项目文件中3分钟之前改动的文件存到update文件
+find -mmin -3 |xargs -I {} cp {} -u -t $update_path
+for file in `ls $update_path`
+ do
+ if test -f $file
+ then
+ echo "file: $file"
+ elif test -d $file
+ echo "path: $file"
+ fi
+ done
@@ -1,6 +1,4 @@
#!/bin/bash
-#sudo su gitlab-runner
echo $1
cd $1
-echo "112233"