From 9677e8a58442167c52db0e904b4339d0f1771009 Mon Sep 17 00:00:00 2001 From: laughing_man77 <8545282-laughing_man77@users.noreply.gitlab.com> Date: Tue, 10 Jan 2023 15:52:46 +1100 Subject: [PATCH 1/4] Add 2s pause before changing JWT perms, to account for system delays. --- includes/Cli/Install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Cli/Install.php b/includes/Cli/Install.php index c1147688..a5b716e0 100644 --- a/includes/Cli/Install.php +++ b/includes/Cli/Install.php @@ -736,7 +736,7 @@ class Install extends Script shell_exec($cmd); $cmd = "echo -e 'y\\n' | ssh-keygen -t rsa -b 4096 -P '' -m PEM -f $private_key_path >/dev/null & sleep 2"; shell_exec($cmd); - $cmd = "echo -e 'y\\n' | openssl rsa -in $private_key_path -pubout -outform PEM -out $public_key_path"; + $cmd = "echo -e 'y\\n' | openssl rsa -in $private_key_path -pubout -outform PEM -out $public_key_path & sleep 2"; shell_exec($cmd); shell_exec("chmod 600 $private_key_path $public_key_path"); echo "keys generated\n"; -- GitLab From f8420156c313b18bd037c992e7f89b5dcb92629f Mon Sep 17 00:00:00 2001 From: laughing_man77 <8545282-laughing_man77@users.noreply.gitlab.com> Date: Tue, 10 Jan 2023 16:27:03 +1100 Subject: [PATCH 2/4] Turn off automated docker creation, for now. --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d414f62c..6c86c359 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,6 @@ workflow: stages: - test - deploy_phpdoc - - prod_docker ################################## ## TESTS -- GitLab From 198b4f3af96005a7b0832506c725b694811712b5 Mon Sep 17 00:00:00 2001 From: laughing_man77 <8545282-laughing_man77@users.noreply.gitlab.com> Date: Tue, 10 Jan 2023 16:28:26 +1100 Subject: [PATCH 3/4] Turn off automated docker creation, for now. --- .gitlab-ci.yml | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c86c359..8bc5700e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -286,35 +286,35 @@ phpdoc-prod: ## Production Docker ################################## -prod-docker-develop: - stage: prod_docker - rules: - - !reference [.commit_to_apiopenstudio_develop, rules] - variables: - BRANCH: develop - trigger: - project: apiopenstudio/docker_images/apiopenstudio_docker_prod - branch: master - strategy: depend - -prod-docker-master: - stage: prod_docker - rules: - - !reference [.commit_to_apiopenstudio_master, rules] - variables: - BRANCH: master - trigger: - project: apiopenstudio/docker_images/apiopenstudio_docker_prod - branch: master - strategy: depend - -prod-docker-tag: - stage: prod_docker - rules: - - !reference [.tag_to_apiopenstudio_master, rules] - variables: - TAG: $CI_COMMIT_TAG - trigger: - project: apiopenstudio/docker_images/apiopenstudio_docker_prod - branch: master - strategy: depend +#prod-docker-develop: +# stage: prod_docker +# rules: +# - !reference [.commit_to_apiopenstudio_develop, rules] +# variables: +# BRANCH: develop +# trigger: +# project: apiopenstudio/docker_images/apiopenstudio_docker_prod +# branch: master +# strategy: depend +# +#prod-docker-master: +# stage: prod_docker +# rules: +# - !reference [.commit_to_apiopenstudio_master, rules] +# variables: +# BRANCH: master +# trigger: +# project: apiopenstudio/docker_images/apiopenstudio_docker_prod +# branch: master +# strategy: depend +# +#prod-docker-tag: +# stage: prod_docker +# rules: +# - !reference [.tag_to_apiopenstudio_master, rules] +# variables: +# TAG: $CI_COMMIT_TAG +# trigger: +# project: apiopenstudio/docker_images/apiopenstudio_docker_prod +# branch: master +# strategy: depend -- GitLab From 4f21ea4464d2ab5142ebca2470e1af1a0eade526 Mon Sep 17 00:00:00 2001 From: laughing_man77 <8545282-laughing_man77@users.noreply.gitlab.com> Date: Tue, 10 Jan 2023 16:31:06 +1100 Subject: [PATCH 4/4] Add 2s pause before changing JWT perms, to account for system delays. --- includes/Cli/Install.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Cli/Install.php b/includes/Cli/Install.php index a5b716e0..053393e0 100644 --- a/includes/Cli/Install.php +++ b/includes/Cli/Install.php @@ -736,7 +736,8 @@ class Install extends Script shell_exec($cmd); $cmd = "echo -e 'y\\n' | ssh-keygen -t rsa -b 4096 -P '' -m PEM -f $private_key_path >/dev/null & sleep 2"; shell_exec($cmd); - $cmd = "echo -e 'y\\n' | openssl rsa -in $private_key_path -pubout -outform PEM -out $public_key_path & sleep 2"; + $cmd = "echo -e 'y\\n' | openssl rsa -in $private_key_path -pubout -outform PEM -out $public_key_path"; + $cmd .= " & sleep 2"; shell_exec($cmd); shell_exec("chmod 600 $private_key_path $public_key_path"); echo "keys generated\n"; -- GitLab