@@ -20,25 +20,22 @@ trait BootstrapTrait {
2020 * The Pantheon machine token.
2121 * @param string $github_token
2222 * The GitHub personal access token for a user with access to this project.
23- * @param string $docker_mirror_url
24- * The Docker mirror URL. Optional, but expect CI failures if not set,
25- * this is due to rate limiting on Docker Hub.
2623 * @param string $http_basic_auth_user
2724 * The HTTP basic auth user. Optional. If set, all the Pantheon environments
2825 * will be protected with HTTP basic auth.
2926 * @param string $http_basic_auth_password
3027 * The HTTP basic auth password. Optional.
3128 */
32- public function bootstrapProject (string $ project_name , string $ github_repository_url , string $ terminus_token , string $ github_token , string $ docker_mirror_url = '' , string $ http_basic_auth_user = '' , string $ http_basic_auth_password = '' ) {
29+ public function bootstrapProject (string $ project_name , string $ github_repository_url , string $ terminus_token , string $ github_token , string $ http_basic_auth_user = '' , string $ http_basic_auth_password = '' ) {
3330 // Extract project name from $github_repository_url.
3431 // The syntax is like: git@github.com:Organization/projectname.git .
3532 preg_match ('/github.com[:\/](.*)\/(.*)\.git/ ' , $ github_repository_url , $ matches );
3633 $ github_organization = $ matches [1 ];
3734 $ project_machine_name = $ matches [2 ];
3835
39- $ this ->verifyRequirements ($ project_name , $ github_organization , $ project_machine_name , $ terminus_token , $ github_token , $ docker_mirror_url , $ http_basic_auth_user , $ http_basic_auth_password );
36+ $ this ->verifyRequirements ($ project_name , $ github_organization , $ project_machine_name , $ terminus_token , $ github_token , $ http_basic_auth_user , $ http_basic_auth_password );
4037
41- $ this ->prepareGithubRepository ($ project_name , $ github_organization , $ project_machine_name , $ github_repository_url, $ docker_mirror_url );
38+ $ this ->prepareGithubRepository ($ project_name , $ github_organization , $ project_machine_name , $ github_repository_url );
4239
4340 $ this ->createPantheonProject ($ terminus_token , $ project_name , $ project_machine_name );
4441
@@ -59,8 +56,8 @@ public function bootstrapProject(string $project_name, string $github_repository
5956 $ this ->say ("You might want to run the following commands to properly place the project: " );
6057 $ this ->say ("mv .bootstrap ../ $ project_machine_name " );
6158 $ this ->say ("mv .pantheon ../ $ project_machine_name/.pantheon " );
62- $ this ->say ("To configure autodeployment to pantheon run: " );
63- $ this ->say ("ddev robo deploy:config-autodeploy $ terminus_token, $ github_token " );
59+ $ this ->say ("To configure autodeployment to Pantheon run: " );
60+ $ this ->say ("ddev robo deploy:config-autodeploy $ terminus_token $ github_token " );
6461 }
6562
6663 /**
@@ -74,10 +71,8 @@ public function bootstrapProject(string $project_name, string $github_repository
7471 * The project machine name in GH slug.
7572 * @param string $github_repository_url
7673 * The clone URL of the GitHub repository.
77- * @param string $docker_mirror_url
78- * The Docker mirror URL. Optional, but expect CI failures if not set.
7974 */
80- protected function prepareGithubRepository (string $ project_name , string $ organization , string $ project_machine_name , string $ github_repository_url, string $ docker_mirror_url = '' ) {
75+ protected function prepareGithubRepository (string $ project_name , string $ organization , string $ project_machine_name , string $ github_repository_url ) {
8176 $ temp_remote = 'bootstrap_ ' . time ();
8277 $ this ->taskExec ("git remote add $ temp_remote $ github_repository_url " )
8378 ->run ();
@@ -370,14 +365,12 @@ public function lockPantheonEnvironments(string $project_machine_name, string $h
370365 * The Pantheon machine token.
371366 * @param string $github_token
372367 * The GitHub token.
373- * @param string $docker_mirror_url
374- * The Docker mirror URL.
375368 * @param string $http_basic_auth_user
376369 * The HTTP basic auth user.
377370 * @param string $http_basic_auth_password
378371 * The HTTP basic auth password.
379372 */
380- protected function verifyRequirements (string $ project_name , string $ organization , string $ project_machine_name , string $ terminus_token , string $ github_token , string $ docker_mirror_url , $ http_basic_auth_user , $ http_basic_auth_password ) {
373+ protected function verifyRequirements (string $ project_name , string $ organization , string $ project_machine_name , string $ terminus_token , string $ github_token , $ http_basic_auth_user , $ http_basic_auth_password ) {
381374 if (is_dir ('.bootstrap ' )) {
382375 throw new \Exception ('The .bootstrap directory already exists. Please remove / move it and try again. ' );
383376 }
@@ -402,12 +395,6 @@ protected function verifyRequirements(string $project_name, string $organization
402395 if (empty (trim ($ github_token ))) {
403396 throw new \Exception ('The GitHub token is empty. ' );
404397 }
405- if (empty (trim ($ docker_mirror_url ))) {
406- throw new \Exception ('The Docker mirror URL is empty. ' );
407- }
408- if (!empty ($ docker_mirror_url ) && !filter_var ($ docker_mirror_url , FILTER_VALIDATE_URL )) {
409- throw new \Exception ('The Docker mirror URL is not a valid URL. ' );
410- }
411398 }
412399
413400}
0 commit comments