From 9af21af75bb61ee56bc6422c1dece07fd36e7a18 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 13:36:12 +0200 Subject: [PATCH 01/21] =?UTF-8?q?Hoffentlich=20reagiert=20der=20Runner=20j?= =?UTF-8?q?etzt=20nur=20noch=20auf=20=C3=A4nderungen=20im=20Master=20Branc?= =?UTF-8?q?h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58a023de..645e795f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,4 +22,4 @@ update: - cd ~/MetaGer - git pull "$path" only: - - master@gitlab.metager3.de:1234/ \ No newline at end of file + - master \ No newline at end of file -- GitLab From 5ea5380eb61f82770ab5db895eeeb4f6f9d8aa73 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 13:38:46 +0200 Subject: [PATCH 02/21] Jetzt sollte es aber gehen --- .gitlab-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 645e795f..621de309 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,11 +9,8 @@ update: # Pfad zum neu geklonten Repo - path=`pwd` # Klone das Repo neu, falls es noch nicht existiert - - if [ ! -d ~/MetaGer ] ; then git clone "$path" ; fi + - if [ ! -d ~/MetaGer ] ; then git clone "$path" ; cd ~/MetaGer ; composer update ; chmod -R 777 storage/ bootstrap/cache ; fi # Falls notwendig Laravel-Framework initialisieren: - - cd ~/MetaGer - - composer update - - tmp=$(chmod -R 777 storage/ bootstrap/cache) - if [ ! -f .env ] ; then cp .env.example .env ; fi - if [ $(grep "SomeRandomString" .env) ] ; then php artisan key:generate ; fi # Falls notwendig Homestead Server intialisieren: -- GitLab From 64ecf1402a96ecdd533301e6dad2f5b1391b7c22 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 13:41:35 +0200 Subject: [PATCH 03/21] Bugfix --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 621de309..f70f64ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ update: - which php # Pfad zum neu geklonten Repo - path=`pwd` + - cd ~/ # Klone das Repo neu, falls es noch nicht existiert - if [ ! -d ~/MetaGer ] ; then git clone "$path" ; cd ~/MetaGer ; composer update ; chmod -R 777 storage/ bootstrap/cache ; fi # Falls notwendig Laravel-Framework initialisieren: -- GitLab From 76825757628c33ef1b22120ef76cc5d8d73f7b8f Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 14:09:24 +0200 Subject: [PATCH 04/21] =?UTF-8?q?Die=20=C3=9Cberpr=C3=BCfung,=20ob=20der?= =?UTF-8?q?=20Webserver=20l=C3=A4uft=20wurde=20in=20ein=20.sh=20Skript=20a?= =?UTF-8?q?usgelagert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 10 ++-------- deploy/checkServerStatus.sh | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100755 deploy/checkServerStatus.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f70f64ad..67cac2f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,14 +8,8 @@ update: - which php # Pfad zum neu geklonten Repo - path=`pwd` - - cd ~/ - # Klone das Repo neu, falls es noch nicht existiert - - if [ ! -d ~/MetaGer ] ; then git clone "$path" ; cd ~/MetaGer ; composer update ; chmod -R 777 storage/ bootstrap/cache ; fi - # Falls notwendig Laravel-Framework initialisieren: - - if [ ! -f .env ] ; then cp .env.example .env ; fi - - if [ $(grep "SomeRandomString" .env) ] ; then php artisan key:generate ; fi - # Falls notwendig Homestead Server intialisieren: - - cd ~/ + - cd ~/MetaGer + - ./deploy/checkServerStatus.sh script: - cd ~/MetaGer - git pull "$path" diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh new file mode 100755 index 00000000..b450a34d --- /dev/null +++ b/deploy/checkServerStatus.sh @@ -0,0 +1,24 @@ +# Klone das Repo neu, falls es noch nicht existiert +if [ ! -d ~/MetaGer ] +then + cd ~/ + git clone "$path" + cd ~/MetaGer + composer update + chmod -R 777 storage/ bootstrap/cache +fi +# Falls notwendig Laravel-Framework initialisieren: + +if [ ! -f ~/MetaGer/.env ] +then + cd ~/MetaGer + cp .env.example .env +fi +if [ $(grep "SomeRandomString" .env) ] +then + cd ~/MetaGer + php artisan key:generate +fi + # Falls notwendig Homestead Server intialisieren: + # - cd ~/ + # - vagrant box add --provider virtualbox laravel/homestead \ No newline at end of file -- GitLab From dc1b3e8081a7b5b4989fc57018ff54c43cae80e3 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 14:12:19 +0200 Subject: [PATCH 05/21] Bugfix --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67cac2f9..20db1c89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ update: # Pfad zum neu geklonten Repo - path=`pwd` - cd ~/MetaGer - - ./deploy/checkServerStatus.sh + - $("$path/deploy/checkServerStatus.sh") script: - cd ~/MetaGer - git pull "$path" -- GitLab From cc2629163e81ce04f845a4a4f8b39d060c5e224b Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 14:16:53 +0200 Subject: [PATCH 06/21] Bugfix --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20db1c89..f58a2560 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ update: # Pfad zum neu geklonten Repo - path=`pwd` - cd ~/MetaGer - - $("$path/deploy/checkServerStatus.sh") + - $path/deploy/checkServerStatus.sh script: - cd ~/MetaGer - git pull "$path" -- GitLab From fea2f46cbba6d7e22ba87c907586fe4a2c3a9201 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 14:24:53 +0200 Subject: [PATCH 07/21] Bugfix --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f58a2560..95c39233 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,10 @@ update: # Pfad zum neu geklonten Repo - path=`pwd` - cd ~/MetaGer + - if [ -d ~/MetaGer ] ; then + - echo "yai" + - else echo "nope" + - fi - $path/deploy/checkServerStatus.sh script: - cd ~/MetaGer -- GitLab From 80265c8fbb8e7a889350d35f5e60ba161700ef76 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:01:20 +0200 Subject: [PATCH 08/21] Bugfix --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95c39233..d2a23c77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,11 +8,7 @@ update: - which php # Pfad zum neu geklonten Repo - path=`pwd` - - cd ~/MetaGer - - if [ -d ~/MetaGer ] ; then - - echo "yai" - - else echo "nope" - - fi + - cd ~/ - $path/deploy/checkServerStatus.sh script: - cd ~/MetaGer -- GitLab From 9b9e9d802bd7b8fe15e66c678e31fcd6d9a100d2 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:14:31 +0200 Subject: [PATCH 09/21] Bugfix --- .gitlab-ci.yml | 2 +- deploy/checkServerStatus.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2a23c77..d1d9698d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ update: # Pfad zum neu geklonten Repo - path=`pwd` - cd ~/ - - $path/deploy/checkServerStatus.sh + - $path/deploy/checkServerStatus.sh "$path" script: - cd ~/MetaGer - git pull "$path" diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index b450a34d..d038728d 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -1,3 +1,4 @@ +path="$1" # Klone das Repo neu, falls es noch nicht existiert if [ ! -d ~/MetaGer ] then -- GitLab From e9c5dc2930efe98a8c10c75338bea4f535ff0e60 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:30:36 +0200 Subject: [PATCH 10/21] Homestead Server sollte nun aufgesetzt werden, falls er nicht vorhanden ist --- deploy/checkServerStatus.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index d038728d..105c7bee 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -20,6 +20,27 @@ then cd ~/MetaGer php artisan key:generate fi - # Falls notwendig Homestead Server intialisieren: - # - cd ~/ - # - vagrant box add --provider virtualbox laravel/homestead \ No newline at end of file +# Falls notwendig Homestead Server intialisieren: +if [ ! -d ~/Homestead ] +then + cd ~/ + # Wir brauchen unseren öffentlichen ssh Schlüssel: + if [ ! -d .ssh ] + then + mkdir .ssh + chmod 700 .ssh + fi + if [ ! -f .ssh/id_rsa.pub ] + then + cd .ssh + ssh-keygen -t rsa -N "" -f id_rsa + cd ~/ + fi + vagrant box add laravel/homestead + git clone https://github.com/laravel/homestead.git Homestead + cd Homestead/ + bash init.sh + mv -f "$path/deploy/Homestead.yaml" .homestead/ + vagrant up + echo "Your server is now running under http://localhost:8000" +fi -- GitLab From db03eaddb1af344465695cb905a819bc3dbe2270 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:37:25 +0200 Subject: [PATCH 11/21] =?UTF-8?q?Homestead.yaml=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - deploy/Homestead.yaml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 deploy/Homestead.yaml diff --git a/.gitignore b/.gitignore index 6b3af3fe..9ef16fc9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /vendor /node_modules /public/storage -Homestead.yaml Homestead.json .env diff --git a/deploy/Homestead.yaml b/deploy/Homestead.yaml new file mode 100644 index 00000000..c941040a --- /dev/null +++ b/deploy/Homestead.yaml @@ -0,0 +1,34 @@ +--- +ip: "192.168.10.10" +memory: 2048 +cpus: 1 +provider: virtualbox + +authorize: ~/.ssh/id_rsa.pub + +keys: + - ~/.ssh/id_rsa + +folders: + - map: ~/MetaGer + to: /home/vagrant/MetaGer + +sites: + - map: 192.168.10.10 + to: /home/vagrant/MetaGer/public + +databases: + - homestead + +# blackfire: +# - id: foo +# token: bar +# client-id: foo +# client-token: bar + +# ports: +# - send: 50000 +# to: 5000 +# - send: 7777 +# to: 777 +# protocol: udp -- GitLab From 31b688aa4f85743a384c780314366cace91cb2e2 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:40:26 +0200 Subject: [PATCH 12/21] Bugfix --- deploy/checkServerStatus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index 105c7bee..671d785b 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -40,7 +40,7 @@ then git clone https://github.com/laravel/homestead.git Homestead cd Homestead/ bash init.sh - mv -f "$path/deploy/Homestead.yaml" .homestead/ + cp -f "$path/deploy/Homestead.yaml" .homestead/ vagrant up echo "Your server is now running under http://localhost:8000" fi -- GitLab From 785b745b04a616cb3b7d5acb29931b6b19b91e2d Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:43:52 +0200 Subject: [PATCH 13/21] Bugfix --- deploy/checkServerStatus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index 671d785b..a8123662 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -40,7 +40,7 @@ then git clone https://github.com/laravel/homestead.git Homestead cd Homestead/ bash init.sh - cp -f "$path/deploy/Homestead.yaml" .homestead/ + cp -f "$path/deploy/Homestead.yaml" .homestead/Homestead.yaml vagrant up echo "Your server is now running under http://localhost:8000" fi -- GitLab From 5a9f31ddda83a74e551f319ee78da7b4488bfcb4 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:48:44 +0200 Subject: [PATCH 14/21] Bugfix --- deploy/checkServerStatus.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index a8123662..e7ec2593 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -15,7 +15,7 @@ then cd ~/MetaGer cp .env.example .env fi -if [ $(grep "SomeRandomString" .env) ] +if [ $(grep "SomeRandomString" ~/MetaGer/.env) ] then cd ~/MetaGer php artisan key:generate @@ -40,7 +40,8 @@ then git clone https://github.com/laravel/homestead.git Homestead cd Homestead/ bash init.sh - cp -f "$path/deploy/Homestead.yaml" .homestead/Homestead.yaml + cd ~/ + cp -f "$path/deploy/Homestead.yaml" .homestead/ vagrant up echo "Your server is now running under http://localhost:8000" fi -- GitLab From 106a3e7ce8a9bd1f2e8e1b15e5144422b822a9ba Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:52:23 +0200 Subject: [PATCH 15/21] Bugfix --- deploy/checkServerStatus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index e7ec2593..ee995a4c 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -36,7 +36,7 @@ then ssh-keygen -t rsa -N "" -f id_rsa cd ~/ fi - vagrant box add laravel/homestead + vagrant box add --provider virtualbox laravel/homestead git clone https://github.com/laravel/homestead.git Homestead cd Homestead/ bash init.sh -- GitLab From 2e39a7678932ba502f889c822187ef0215b51942 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:53:46 +0200 Subject: [PATCH 16/21] Bugfix --- deploy/checkServerStatus.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/checkServerStatus.sh b/deploy/checkServerStatus.sh index ee995a4c..04fc03e9 100755 --- a/deploy/checkServerStatus.sh +++ b/deploy/checkServerStatus.sh @@ -42,6 +42,7 @@ then bash init.sh cd ~/ cp -f "$path/deploy/Homestead.yaml" .homestead/ + cd Homestead/ vagrant up echo "Your server is now running under http://localhost:8000" fi -- GitLab From 50eeaf88982aafdd592423b62aeaf20fef2c161a Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 15:57:27 +0200 Subject: [PATCH 17/21] Die Webseite wird nur noch aktualisiert, wenn die Version: 1) Im Master Branch ist 2) Getaggt ist ( oder durch die Api getriggert wurde ) --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1d9698d..28a57706 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,4 +14,6 @@ update: - cd ~/MetaGer - git pull "$path" only: - - master \ No newline at end of file + - master + - tags + - triggers \ No newline at end of file -- GitLab From 9015ae9e9d1d4ad9a46ef6768889573eb4c5e127 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 16:00:15 +0200 Subject: [PATCH 18/21] Bugfix --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 28a57706..49fd4446 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,8 @@ update: + only: + - master + - tags + - triggers before_script: # Abhängigkeiten überprüfen - which virtualbox @@ -6,14 +10,10 @@ update: - which composer - which git - which php + script: # Pfad zum neu geklonten Repo - path=`pwd` - cd ~/ - $path/deploy/checkServerStatus.sh "$path" - script: - cd ~/MetaGer - - git pull "$path" - only: - - master - - tags - - triggers \ No newline at end of file + - git pull "$path" \ No newline at end of file -- GitLab From 30046389b8ba9c71da96fef2b6d9eae338d7eb6d Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 16:24:31 +0200 Subject: [PATCH 19/21] Nun reagiert der Runner nur noch auf Tags oder API Trigger --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49fd4446..e8c9df2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,5 @@ update: only: - - master - tags - triggers before_script: -- GitLab From c62d85c93a04cdd3f6a5107138d76940b50d0348 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 16:31:37 +0200 Subject: [PATCH 20/21] test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8c9df2c..5d443dfb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,5 +14,5 @@ update: - path=`pwd` - cd ~/ - $path/deploy/checkServerStatus.sh "$path" - - cd ~/MetaGer + - cd ~/MetaGerssas - git pull "$path" \ No newline at end of file -- GitLab From 5bc59edbac299de2689a4d29920882ed5f533ee1 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig Date: Tue, 3 May 2016 16:32:12 +0200 Subject: [PATCH 21/21] Revert "test" This reverts commit c62d85c93a04cdd3f6a5107138d76940b50d0348 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d443dfb..e8c9df2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,5 +14,5 @@ update: - path=`pwd` - cd ~/ - $path/deploy/checkServerStatus.sh "$path" - - cd ~/MetaGerssas + - cd ~/MetaGer - git pull "$path" \ No newline at end of file -- GitLab