Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial gitlab integration #137

Open
wants to merge 3,819 commits into
base: 7.x-1.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
3819 commits
Select commit Hold shift + click to select a range
4419530
Save correct hosting task arguments.
jonpugh Dec 15, 2016
d9554a0
We need to queue a deploy task so the codebase is up to date.
jonpugh Dec 15, 2016
3a59601
Show message when no environments were found. Go ahead and act on dis…
jonpugh Dec 15, 2016
0aa76a4
Syntax error.
jonpugh Dec 15, 2016
cc7ace7
Include git_ref in deployment task.
jonpugh Dec 15, 2016
44f5248
Fixing URLs for github commit status to match the site node page.
jonpugh Dec 15, 2016
c1db55a
Comment out warning about git ref not present in remote.
jonpugh Dec 16, 2016
d415530
Replacing removed check for enabled site.
jonpugh Dec 19, 2016
126eba2
Lookup existing PR before writing the record.
jonpugh Dec 21, 2016
29debaa
Use a try/catch for drupal_write_record.
jonpugh Dec 21, 2016
01498ae
More messaging to determine GitHub API errors.
jonpugh Dec 21, 2016
e427e10
Output a 500 response if an exception is thrown.
jonpugh Dec 21, 2016
06dbb22
Typo in variable name.
jonpugh Dec 21, 2016
8390f88
Only throw 500 error when branch is not out of date.
jonpugh Dec 21, 2016
d2881ff
Commenting out print_r on environment.
jonpugh Dec 21, 2016
244caaa
Check for environment record in the database, not the project objects.
jonpugh Dec 21, 2016
e1473c0
Use try/catch for drupal_write_record.
jonpugh Dec 21, 2016
2e798a6
Fix db_select()
jonpugh Dec 21, 2016
dcd4d2f
Fixing condition check.
jonpugh Dec 21, 2016
2a541a4
Better messaging to github api.
jonpugh Dec 21, 2016
ce2dedd
Respond with 500 error if something went wrong with deployment status.
jonpugh Dec 21, 2016
7d32045
Continue if environment is not found.
jonpugh Dec 21, 2016
3226a55
Fixing inverse logic.
jonpugh Dec 21, 2016
648ffd8
Better message for no environments found.
jonpugh Dec 21, 2016
bd71529
Avoid sending two deployment statuses if "reinstall" is selected.
jonpugh Dec 21, 2016
ce8f3fa
Use install_method context option instead of environment settings.
jonpugh Dec 21, 2016
16b5368
Properly lookup package instances.
jonpugh Dec 21, 2016
764d28d
Remove debug message.
jonpugh Dec 21, 2016
6da08c9
Ensure "install_method" options are saved when site form is saved.
jonpugh Aug 25, 2017
02b86d4
Merge pull request #79 from opendevshop/install-method-loss
jonpugh Aug 28, 2017
5b46998
Merge pull request #78 from opendevshop/pr-reinstall
jonpugh Aug 28, 2017
bd66eda
Commenting out unused drupal core version.
jonpugh Aug 31, 2017
859cd20
Set hosting back to 7.x-3.x. Set hosting logs to 3.x. Whitespace for …
jonpugh Aug 31, 2017
088e25c
Update views and bootstrap and set contrib hosting to x.x
jonpugh Aug 31, 2017
36ea5d0
default hosting to download version method.
jonpugh Aug 31, 2017
aa03b1b
Removing accidental commit of testing makefile parts.
jonpugh Aug 31, 2017
de6069d
Add a make.yml file to make all modules download as git repos.
jonpugh Aug 31, 2017
7cebda8
Peg as many modules to fixed versions as we can by default.
jonpugh Aug 31, 2017
34a3ad2
Adding git checkot for devshop_stats to makefile.
jonpugh Aug 31, 2017
eea97db
Temporarily commenting out development makefile to give travis a chan…
jonpugh Aug 31, 2017
9b32926
Putting back development make yml.
jonpugh Aug 31, 2017
bb09ac9
Load PR data into environment settings so it gets saved in context.
jonpugh Aug 25, 2017
21fe9b7
Verify site after install and deploy.
jonpugh Aug 25, 2017
e663d50
Check for drupal version before showing export/import config.
jonpugh Jul 19, 2017
3f758ac
Use correct task name for Features Revert task.
jonpugh Jul 21, 2017
54b4b61
Finally Fixes opendevshop/devshop#28: Respect project vs global envir…
jonpugh Jul 18, 2017
c89de9a
Remove no longer used code for add environment page.
jonpugh Jul 18, 2017
a3fc36e
Update default environment domain name pattern to be http://PROJECT.E…
jonpugh Dec 15, 2016
320fae7
Changing git commit task to use d()->platform->repo_root.
jonpugh Aug 17, 2017
0b2f24d
Don't run drush status, we don't know if a site is available.
jonpugh Jul 17, 2017
8d46e26
Only write drush aliases if project name was found.
jonpugh Jul 11, 2017
ab4d51f
Massive improvements to Sync UI
jonpugh Jul 14, 2017
802bf57
Add target=_blank to environment links.
jonpugh Jul 15, 2017
81befce
Check node/add/site when deciding to show add environment button.
jonpugh Jul 18, 2017
ecb38a4
Merge pull request #80 from opendevshop/updates
jonpugh Aug 31, 2017
e42d646
Merge pull request #81 from opendevshop/improvements
jonpugh Sep 1, 2017
51fff17
Revert "Load PR data into environment settings so it gets saved in co…
jonpugh Sep 5, 2017
7956b1e
Pulling devshop_prepare_platform_node() function from makefiles branc…
jonpugh Sep 5, 2017
4e3aa15
Merge pull request #82 from opendevshop/prepare-platform
jonpugh Sep 5, 2017
da9b177
Always load $site_node->profile_name. Site's cloned from sites instal…
jonpugh Sep 5, 2017
96720d5
Merge pull request #83 from opendevshop/clone-of-custom-profile-fail
jonpugh Sep 5, 2017
b0ae814
Renaming function devshop_drush_process() to just devshop_process().
jonpugh Sep 6, 2017
f75301d
Merge pull request #84 from opendevshop/rename-devshop-process
jonpugh Sep 6, 2017
c953a37
Bumping aegir SSH to 1.0.
jonpugh Sep 6, 2017
882960e
Reverting changes that shouldn't have been merged re:makefiles.
jonpugh Sep 6, 2017
29351fe
Set correct aegir logs folder.
jonpugh Sep 6, 2017
e68ac16
Enable fix_permissions and fix_ownership modules on install.
jonpugh Sep 7, 2017
6b0ac01
Fixes opendevshop/devshop#170: Ajax for domain aliases breaking becau…
jonpugh Sep 7, 2017
9d6d779
Link to the site edit page, not the project sub url.
jonpugh Sep 7, 2017
b6591fa
Remove commented out code.
jonpugh Sep 7, 2017
c1a40c6
Link to the site edit page, not the project sub url.
jonpugh Sep 7, 2017
e464bc9
Remove unused node/%/edit/env/NAME page.
jonpugh Sep 7, 2017
a392044
Merge pull request #86 from opendevshop/fix-domain-add
jonpugh Sep 7, 2017
73de3bb
Merge branch '1.x' of github.com:opendevshop/devmaster into fix-domai…
jonpugh Sep 7, 2017
01fc553
Bumping Hosting Tasks Extras to 3.111
jonpugh Sep 7, 2017
09f1266
Adding drupal-org-core.make and build-devmaster.make so drupal.org ca…
jonpugh Sep 7, 2017
7a32c7f
Merge pull request #85 from opendevshop/add-fix-permissions
jonpugh Sep 14, 2017
34885a3
Load profile_name into site nodes if profile is empty. Fixes opendev…
jonpugh Sep 21, 2017
ab91d62
Merge pull request #88 from opendevshop/236-missing-profile-on-clone
jonpugh Sep 21, 2017
21143d2
Bump all Aegir modules to 3.120
jonpugh Sep 22, 2017
318d21e
Bumping versions of aegir config, aegir ansible, and aegir cloud.
jonpugh Sep 25, 2017
d0b71d3
Fixes opendevshop/devshop#228: Git Submodules don't init when checkin…
jonpugh Sep 25, 2017
fd3600a
Merge pull request #90 from opendevshop/228-submodule-init-on-tag
jonpugh Sep 25, 2017
a307bf4
Avoid problems if we lost the platform ID
jonpugh Sep 25, 2017
626de12
Moving contrib modules to drupal-org.make.
jonpugh Sep 25, 2017
1367cbe
Merge pull request #92 from opendevshop/drupal-org-make
jonpugh Sep 26, 2017
cf1ef31
Replacing accidentally lost versions in makefile.
jonpugh Sep 26, 2017
2565efc
Merge branch '1.x' of github.com:opendevshop/devmaster into drupal-or…
jonpugh Sep 26, 2017
4791c73
Merge pull request #93 from opendevshop/drupal-org-make
jonpugh Sep 26, 2017
762b0f9
Remove duplicate include statement for development make yml.
jonpugh Sep 26, 2017
bbd2f38
Removing quotes from version for easier sed.
jonpugh Sep 26, 2017
4a7041e
Comment out hosting_https from makefile.
jonpugh Sep 26, 2017
d2e735c
whitespace in makefile
jonpugh Sep 26, 2017
f00309d
Removing devel module from drupal-org.make file since it is now in bu…
jonpugh Sep 26, 2017
7b4a09e
Remove fix_permissions and fix_ownership from devmaster install.
jonpugh Sep 26, 2017
205eaf8
Disable and uninstall the module. We can remove it on the next release.
jonpugh Sep 26, 2017
ad98fc3
Removing distro_update from devmaster install profile.
jonpugh Sep 26, 2017
01558d5
Bumping bootstrap module to 3.15
jonpugh Sep 26, 2017
3df2e2d
Merge branch '1.x' into remove-distro-update
jonpugh Sep 26, 2017
ef851a7
Moving all development makefile data to build-devmaster-dev.make.yml.…
jonpugh Sep 26, 2017
1054fbb
Merge pull request #95 from opendevshop/yml-dev-makefile
jonpugh Sep 26, 2017
2600ce9
Merge branch '1.x' into remove-distro-update
jonpugh Sep 26, 2017
8951b4c
Merge pull request #94 from opendevshop/remove-distro-update
jonpugh Sep 26, 2017
1a83e56
Use --no-dev option so we use build-devmaster.make for now. Travis c…
jonpugh Sep 26, 2017
b2fc410
Update old hosting_context records for projects that may have been sa…
jonpugh Sep 27, 2017
63c0a8b
Attempt to override development make yml instead of build-devmaster.make
jonpugh Sep 27, 2017
e208244
Fixing YML formatting in Travis.yml
jonpugh Sep 27, 2017
d919246
Copy the devmaster makefile for travis forks over the default makefil…
jonpugh Sep 27, 2017
06f0d95
Merge pull request #97 from opendevshop/travis-dev-yml
jonpugh Sep 27, 2017
87e0a32
Merge pull request #96 from opendevshop/update-contexts
jonpugh Sep 27, 2017
b9fcb6f
Removing manual addition of + icon. Apparently bootstrap theme does t…
jonpugh Dec 18, 2017
93ba8a6
Handle no install profiles, just in case. Seeing tons of warnings com…
jonpugh Dec 18, 2017
cc27876
Fix Project aliases so they are written before every task.
jonpugh Dec 19, 2017
5beae4c
Don't run composer install in our own module. Git hooks should handle…
jonpugh Dec 27, 2017
647760a
Don't just include once. Settings.php might get bootstrapped more tha…
jonpugh Jan 30, 2018
d8c51e4
Environment and project properties are now just strings.
jonpugh Jan 30, 2018
b4c8fc7
Merge branch '7.x-1.x' of git.drupal.org:project/devmaster into 7.x-1.x
jonpugh Jan 30, 2018
125baf5
Merge branch 'hosting-git-hooks' into 1.x
jonpugh Jan 30, 2018
c4518d5
Removing Aegir Ansible and Aegir Cloud from devmaster. These two are …
jonpugh Jan 30, 2018
675d41a
Set --force option in Delete task, to ensure bad sites get deleted.
jonpugh Jan 31, 2018
dcc468b
Also force delete platforms.
jonpugh Jan 31, 2018
4830f84
Make sure to check for enabled platform.
jonpugh Jan 31, 2018
8459aff
Partial revert of 675d41adc78415dba10dc4a24b3eb9868da7d2f9 : Hosting …
jonpugh Jan 31, 2018
193fc2f
Set hosting_delete_force variable in install profile and update hook.
jonpugh Jan 31, 2018
a9b1e87
Update contrib.
jonpugh Feb 20, 2018
bb05cd8
Merge pull request #99 from opendevshop/contrib-updates
jonpugh Feb 20, 2018
1e21079
Fix variable name to avoid notice.
jonpugh Feb 20, 2018
0b4f0c8
Removing unused cloned indicator.
jonpugh Feb 20, 2018
5b100f1
Add a dummy filter to avoid missing argument problems.
jonpugh Feb 20, 2018
9453ed0
Merge branch '1.x' of github.com:opendevshop/devmaster into 1.x
jonpugh Feb 20, 2018
ae96ff9
Don't use & in foreach(), it causes hanging in PHP7!
jonpugh Feb 20, 2018
256f9c3
Fix checking for "unfinished project" message.
jonpugh Feb 20, 2018
258a6fa
Fixing eldir version.
jonpugh Feb 20, 2018
506558d
Fixing detection of "create" vs "edit" submissions.
jonpugh Feb 20, 2018
f974129
Remove more reference foreach variables.
jonpugh Feb 20, 2018
8d373b2
Merge branch '1.x' into project-settings-error-2
jonpugh Feb 21, 2018
32a0321
Merge branch '1.x' into allow-domain-change
jonpugh Feb 21, 2018
8c5d14a
Merge pull request #101 from opendevshop/project-settings-error-2
jonpugh Feb 21, 2018
7a54e58
Merge pull request #100 from opendevshop/allow-domain-change
jonpugh Feb 21, 2018
ecb0811
Bumping to Drupal 7.57
jonpugh Feb 22, 2018
75ea0a0
Fixing incorrect contrib versions
jonpugh Feb 22, 2018
d744f5b
Merge pull request #102 from opendevshop/drupal-757
jonpugh Feb 22, 2018
d2221f7
Bumping hosting.module to 3.14.1
jonpugh Feb 22, 2018
c5b191a
Don't write aliases for servers.
jonpugh Mar 2, 2018
d6ba944
Load full server nodes into environment->servers, then use that to ad…
jonpugh Mar 2, 2018
72a661a
Don't load tasks by "type", because multiple verify tasks overwrite e…
jonpugh Mar 9, 2018
95effde
Don't alter the port of the link if port is 0.
jonpugh Mar 13, 2018
c2602b5
Allow verification link for projects.
jonpugh Mar 13, 2018
2ad2e95
Show a bigger error message with a button to fix it, instead of the w…
jonpugh Mar 13, 2018
bb429a3
Remove the composer deploy hook configuration. Provision now always r…
jonpugh Mar 13, 2018
4e4a5a5
Add "private" directory to recommended git ignore.
jonpugh Mar 27, 2018
416cd18
Enable aegir download, commit, update, and config.
jonpugh Mar 27, 2018
db0a227
Enable aegir download, commit, update, and config.
jonpugh Mar 27, 2018
08c3b14
Fix update hook to also enable aegir_features.
jonpugh Mar 27, 2018
8ca5dbd
Fixing suggested git ignore.
jonpugh Mar 27, 2018
2e1372a
Updating ctools and bootstrap.
jonpugh Mar 27, 2018
0664599
Test 7.x-1.x branch.
jonpugh Mar 27, 2018
519f8dd
Add a "Commit & Push" checkbox to the Update Drupal task form, and us…
jonpugh Mar 27, 2018
873bfdf
Limit git diff on commit form to 1000 lines, just like we do on envir…
jonpugh Mar 27, 2018
8612e3d
Detect drupal8, and if composer.json is present, run composer update …
jonpugh Mar 27, 2018
df11744
Use the branch of hosting_git that allows you to tag releases.
jonpugh Mar 28, 2018
1099843
Refactoring environment_menu code to move all items to the hook, and …
jonpugh Mar 28, 2018
3838f3c
Adding update hook to enable hosting_git_tag module
jonpugh Mar 28, 2018
9f89eb9
Merge pull request #105 from opendevshop/git-tag
jonpugh Mar 28, 2018
cde5aba
Bumping to future drupal 7.58
jonpugh Mar 28, 2018
cc9491c
Merge pull request #106 from opendevshop/drupal-7.58
jonpugh Mar 28, 2018
081a5ba
If not empty, then print.
jonpugh Mar 29, 2018
f25b6ee
Don't append to a variable that doesn't exist.
jonpugh Mar 29, 2018
87919f0
Merge branch '1.x' of github.com:opendevshop/devmaster into 1.x
jonpugh Mar 29, 2018
eca37b1
Merge branch '1.x' into 7.x-1.x
jonpugh Mar 29, 2018
f08c81b
Check for array before using current.
jonpugh Mar 29, 2018
64e91b9
Check for array before using current, also check that tasks exists at…
jonpugh Mar 29, 2018
341c1bf
Improve help text for "path to drupal" field.
jonpugh Apr 18, 2018
138ad8e
Return errorOutput if process failed.
jonpugh Apr 18, 2018
22aea06
Check output of hook commands to offer instructions when the PHP vers…
jonpugh Apr 18, 2018
b050026
Change "Tag a Release" to "Create a Tag" to be more literal. We might…
jonpugh Apr 25, 2018
42ab68c
Revert hosting_git back to version.
jonpugh Apr 25, 2018
24e818d
Add an ID to the webhook form element so we can target it.
jonpugh Apr 25, 2018
9ea9784
Adding pull request test, step and dummy payload JSON object.
jonpugh Apr 25, 2018
dde09b4
Updating Drupal core 7.59 and Views and Bootstrap modules.
jonpugh Apr 25, 2018
5693ddb
Print found webhook URL.
jonpugh Apr 25, 2018
287e7fc
Update hosting to 3.146
jonpugh Apr 25, 2018
858af93
Update tests to either save the output to a file or print the output …
jonpugh Apr 25, 2018
02884f3
use 3.x of hosting git to get the tag feature.
jonpugh Apr 25, 2018
b7a3f3e
Merge pull request #107 from opendevshop/7.x-3.x-github-pr-tests
jonpugh Apr 25, 2018
0ec3247
Merge branch '7.x-1.x' of github.com:opendevshop/devmaster into core-…
jonpugh Apr 25, 2018
babedb2
comment out tests until we figure out what is going on here.
jonpugh Apr 25, 2018
4cefbaa
Commenting out PR test
jonpugh Apr 25, 2018
8ed809e
Merge branch '7.x-1.x' of github.com:opendevshop/devmaster into 7.x-1.x
jonpugh Apr 25, 2018
cfd4a9a
Merge branch '7.x-1.x' into core-update
jonpugh Apr 25, 2018
af1ef0a
Merge pull request #108 from opendevshop/core-update
jonpugh Apr 25, 2018
ac734ef
Adding CAS version 1.7.
jonpugh Apr 30, 2018
a0bf4d4
Adding hosting_https back into the makefile now that there is a stabl…
jonpugh Apr 30, 2018
ad4f152
Fix version for hosting_https
jonpugh Apr 30, 2018
06c1049
Enable hosting_https instead.
jonpugh May 1, 2018
a974ce1
Enabling hosting_apache_https
jonpugh May 1, 2018
a56c8d3
Merge pull request #110 from opendevshop/hosting_https
jonpugh May 1, 2018
336c425
Updating hosting, views, and bootstrap modules
jonpugh May 1, 2018
9b7f552
Bump version of hosting_tasks_extras.
jonpugh May 1, 2018
028bc07
Bumping hosting_git to 3.141
jonpugh May 1, 2018
7e7f6e0
Merge branch '7.x-1.x' of github.com:opendevshop/devmaster into 7.x-1.x
jonpugh May 1, 2018
3c8923b
Merge branch 'cas-server' of git.drupal.org:project/devmaster into ca…
jonpugh May 1, 2018
ecd48af
Adding phpCAS library.
jonpugh May 1, 2018
48f43bc
Adding hybridauth module.
jonpugh May 1, 2018
d8b3505
Adding hybridauth library.
jonpugh May 1, 2018
76708fb
Merge pull request #109 from opendevshop/cas-server
jonpugh May 1, 2018
6986a45
Merge branch '7.x-1.x' into cas-server
jonpugh May 1, 2018
a7d6c8c
Change the permission we check for for the Create Tag task.
jonpugh May 4, 2018
f901f87
Adding intercom from git fork and adding composer autoload module.
jonpugh May 21, 2018
1691dd6
fixing module name
jonpugh May 21, 2018
c323b16
Adding cas_attributes to the devmaster makefile.
jonpugh May 21, 2018
0ae0411
Updating contrib module version
May 21, 2018
64a22c8
Updating AEGIR contrib
May 21, 2018
fdb397e
Fixing devshop_process() refactor: output was not logging using drush…
jonpugh May 31, 2018
41ce46b
Fixes opendevshop/devshop#263: Fixing devshop_process() refactor: out…
jonpugh May 31, 2018
efaba71
Merge branch '7.x-1.x' of git.drupal.org:project/devmaster into 7.x-1.x
jonpugh May 31, 2018
ded6175
#265 - fixing project task check order for latest version
May 31, 2018
b3c0839
Removing docker tests for now. Something changed on travis and our do…
jonpugh Jun 5, 2018
13ec592
Adding slack notifications for travis runs.
jonpugh Jun 5, 2018
f5aeaa0
Merge pull request #114 from opendevshop/remove-docker-tests
StephanieF Jun 5, 2018
42b222e
Merge branch '7.x-1.x' into project-bug
jonpugh Jun 5, 2018
fe5d205
Merge pull request #113 from opendevshop/project-bug
jonpugh Jun 5, 2018
88011e5
commenting out libs
Jun 5, 2018
ce29a04
putting back the dehydrated module
Jun 5, 2018
f5e3158
Merge pull request #115 from opendevshop/drupal-org-make-updates
jonpugh Jun 6, 2018
e5dd276
Set logo to enabled by default so we dont get a missing image on the …
jonpugh Jun 7, 2018
68c48f0
Adding a footer menu with links to documentation, chat, devshop suppo…
jonpugh Jun 7, 2018
1983421
Adding .git so dehydrated passes whitelist.
jonpugh Jun 7, 2018
b86bd97
Removing hybridauth because it seems to include the makefile in the p…
jonpugh Jun 7, 2018
e1961bb
Adding a big call to action link to the welcome to devshop page for d…
jonpugh Jun 12, 2018
185cb40
Fixed bug blocking project drush aliases to be written on project ver…
jonpugh Jun 12, 2018
8985dbb
Fix sync data form when using DevShop Remote Aliases.
jonpugh Jun 12, 2018
be28de2
Delete the platform confs for this project as well.
jonpugh Jul 3, 2018
67a3dc5
Fill in the http password fields and check that they are set.
jonpugh Jul 3, 2018
0f051ba
Test on 16.04 as well.
jonpugh Jul 3, 2018
229c5e2
Does --no-dev need to be set to 1?
jonpugh Jul 3, 2018
53a717a
Revert "Does --no-dev need to be set to 1?"
jonpugh Jul 3, 2018
104a446
Use the fork option to ensure we copy the profile from the travis git…
jonpugh Jul 3, 2018
4e28708
Add patch for HTE for http passwords.
jonpugh Jul 3, 2018
8beb1f4
test for http password.
jonpugh Jul 3, 2018
1f8b5d3
Just pass the tests for now.
jonpugh Jul 3, 2018
470a97c
Print out the apache virtualhost file for debugging.
jonpugh Jul 5, 2018
0018a9c
Update project.create.feature
jonpugh Jul 5, 2018
4e5475a
Update project.create.feature
jonpugh Jul 5, 2018
16997d6
Comment out the 401 check.
jonpugh Jul 5, 2018
8c5a79a
Removing patch from makefile now that its been merged
jonpugh Jul 5, 2018
fbc623e
Merge branch 'http-pass-tests' of github.com:opendevshop/devmaster in…
jonpugh Jul 5, 2018
703d015
Move check for password to the end.
jonpugh Jul 5, 2018
4d2b6cb
Merge pull request #116 from opendevshop/http-pass-tests
jonpugh Jul 5, 2018
2cb33dc
initial gitlab integration
chrisfromredfin Nov 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix sync data form when using DevShop Remote Aliases.
  • Loading branch information
jonpugh committed Jun 12, 2018
commit 8985dbb3745a211f0efb6138b765c6811ee31965
23 changes: 18 additions & 5 deletions modules/devshop/devshop_projects/inc/forms.inc
Original file line number Diff line number Diff line change
@@ -569,13 +569,25 @@ function devshop_projects_form_alter(&$form, &$form_state, $form_id) {
if ($_GET['source'] == 'other') {
$source = '';
}
else {
elseif (is_int($_GET['source'])) {
$source = node_load($_GET['source']);
if (isset($source->nid) && $source->type != 'site') {
break;
}
$source_alias = $source->environment->system_alias;
}
elseif (isset($node->project->settings->aliases[$_GET['source']])) {
$alias_name = $source = $_GET['source'];
$source_alias = "@{$node->project->name}.{$alias_name}";
$alias_data = $node->project->settings->aliases[$_GET['source']];
}
else {
return;
}

// print_r($source); die;
// print $source_alias ; die;

drupal_set_title(t('Sync Data to Environment "@env"', array('@env' => $node->environment->name)), PASS_THROUGH);
$environment = $node->environment;

@@ -595,10 +607,9 @@ function devshop_projects_form_alter(&$form, &$form_state, $form_id) {
else {

$source_environment = $source->environment;

$form['parameters']['source'] = array(
'#type' => 'value',
'#value' => $source->environment->system_alias,
'#value' => $source_alias,
);
$form['parameters']['destination'] = array(
'#type' => 'value',
@@ -630,12 +641,14 @@ function devshop_projects_form_alter(&$form, &$form_state, $form_id) {
$destroyed = t('This environment will be destroyed.');
$source = t('This environment will be copied.');

$source_environment_url = $source_environment->url? $source_environment->url: 'http://' . $alias_data['uri'];
$source_environment_name = $source_environment->name? $source_environment->name: $alias_name;
$html = <<<HTML

<div class="container no-wrap">
<div class="inline">
<a href="$source_environment->url" target="_blank" class="btn btn-default btn-lg"><span class="text-lg"><i class="fa fa-globe"></i> {$source_environment->name} </span>
<br/> <small>$source_environment->url</small>
<a href="$source_environment_url" target="_blank" class="btn btn-default btn-lg"><span class="text-lg"><i class="fa fa-globe"></i> {$source_environment_name} </span>
<br/> <small>$source_environment_url</small>
</a>
<br/> <em class="text-sm">$source</em>

42 changes: 21 additions & 21 deletions modules/devshop/devshop_remotes/devshop_remotes.module
Original file line number Diff line number Diff line change
@@ -318,27 +318,27 @@ function devshop_remotes_form_hosting_task_confirm_form_alter(&$form, &$form_sta
return;
}

$site = $form_state['build_info']['args'][0];

if (isset($_GET['source']) && isset($site->project->settings->aliases[$_GET['source']])) {
$alias_name = $_GET['source'];
$alias_record = $site->project->settings->aliases[$alias_name];
$actual_alias = "@{$site->project->name}.{$alias_name}";

$form['parameters']['source']['#type'] = 'value';
$form['parameters']['source']['#value'] = $actual_alias;

$form['source_display'] = array(
'#type' => 'item',
'#title' => t('Source'),
'#markup' => l($alias_record['uri'], 'http://' . $alias_record['uri'], array(
'attributes' => array(
'target' => '_blank',
),
)),
'#weight' => -10,
);
}
// $site = $form_state['build_info']['args'][0];
//
// if (isset($_GET['source']) && isset($site->project->settings->aliases[$_GET['source']])) {
// $alias_name = $_GET['source'];
// $alias_record = $alias_name. $site->project->settings->aliases[$alias_name];
// $actual_alias = "@{$site->project->name}.{$alias_name}";
//
//// $form['parameters']['source']['custom_alias']['text']['#type'] = 'value';
// $form['parameters']['source']['#default_value'] = 'wtf';
//
// $form['source_display'] = array(
// '#type' => 'item',
// '#title' => t('Source'),
// '#markup' => l($alias_record['uri'], 'http://' . $alias_record['uri'], array(
// 'attributes' => array(
// 'target' => '_blank',
// ),
// )),
// '#weight' => -10,
// );
// }
}

/**