Fun with Cloud9 IDE and CP3

Today I had a bit of fun with Cloud9 IDE, which is one of the better cloud-based IDEs I've found. It is geared mostly towards front-end web development but has a fully functional Ubuntu OS underneath running in a Docker instance, so you can pretty much do anything.

I wanted to see if I could setup a CP3 project and push files via WebDAV to an OSC test site and came up with a custom runner and a simple bash script to push files via curl. It does require each modified file to be 'run' and pushed individually, and expects a project folder structure that mirrors the OSC WebDAV file structure. Here's how to set it up once you've downloaded and unpacked the attached zip:

  1. In your Cloud9 workspace, select the Run menu -> Run With -> New Runner
  2. Paste the JSON data from the unpacked OSC Deploy file into your new runner file
  3. Modify the OSC_HOST and OSC_USERNAME environment settings for your test site (the only required changes) and save the runner
    (you can create separate runners for each test site or interface you want to push to)
  4. Next, click the little gear icon in the workspace explorer, select "Show Hidden Files", and drill into the .c9/runners directory
  5. Highlight the runners directory and select the File menu -> Upload Local Files... and upload the deploy.sh bash script
  6. Set deploy.sh to be executable by right-clicking on the runners directory, selecting Open Terminal Here, and typing
    chmod 0744 deploy.sh

If everything is setup correctly, you should be able to open and edit any project file, select Run -> Run With -> [name of your runner] to quickly push the file up to your test site! By default the runner requires password input and file overwrite confirmation, but this behavior can be configured so no manual input is required, just read the comments in the runner file for details.

Comments

Sweet stuff. I wonder if node + grunt + grunt-watch could be utilized to call the bash script automatically on save.

"came up with a custom runner and a simple bash script to push files via curl".
1) custom runner - I have configured custom runner as you specified
2) simple bash script to push files via curl - I dont know this. Can you give me a little more detailed instruction regarding this?

Zircon - This is a contributing Drupal Theme
Design by WeebPal.