diff --git a/.gitpod/README.md b/.gitpod/README.md deleted file mode 100644 index 658c01b..0000000 --- a/.gitpod/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Setting up a new version for DrupalPod - -## Build custom Gitpod image - -1. Update `.gitpod/images/Dockerfile`: - - 1. Update `ddev` latest version. - 1. Update `minio` latest version. - 1. Update `gitui` latest version. - 1. Update `lazygit` latest version. - -1. Generate new custom docker image: - - 1. Run `docker login` to authenticate and push new images to docker hub. - 1. In `/.gitpod/images` run `./push.sh` command to build and push the new custom docker image. - 1. Confirm the process run without errors and that the new custom image gets uploaded to . - 1. Update `/.gitpod.yml` with the new image file. - -1. Push code, and re-open Gitpod workspace, to use latest custom docker image. - -1. Run manual prebuild (to load ddev's images) - -1. Confirm latest setup - 1. Open new workspace. - 1. Check if there are any updates (ie. DDEV's default settings files). - -1. Test various scenarios with DrupalPod browser extension - 1. Confirm core issues work as expected. - 1. Confirm contrib issue work as expected. - -1. Merge PR into `main` branch - -1. Confirm `main` branch work as expected 🎉 diff --git a/.gitpod/utils/ddev-in-gitpod-setup.sh b/.gitpod/utils/ddev-in-gitpod-setup.sh deleted file mode 100755 index c03dfe6..0000000 --- a/.gitpod/utils/ddev-in-gitpod-setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -if [ -n "$DEBUG_SCRIPT" ] || [ -n "$GITPOD_HEADLESS" ]; then - set -x -fi - -# Misc housekeeping before start -ddev config global --instrumentation-opt-in=true diff --git a/.gitpod/utils/env-setup.sh b/.gitpod/utils/env-setup.sh deleted file mode 100755 index 84361ac..0000000 --- a/.gitpod/utils/env-setup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -if [ -n "$DEBUG_SCRIPT" ]; then - set -x -fi - -cd "${GITPOD_REPO_ROOT}"/.gitpod/utils/script-templates || exit - -# Create a phpstorm command -sudo cp phpstorm.template.sh /usr/local/bin/phpstorm - -# Create a preview command -sudo cp preview.template.sh /usr/local/bin/preview - -# Create a protect-my-git command -sudo cp protect-my-git.template.sh /usr/local/bin/protect-my-git - -# Create php command (run php inside ddev container) -sudo cp ddev-php.template.sh /usr/local/bin/php - -# Create drush command (run drush inside ddev container) -sudo cp ddev-drush.template.sh /usr/local/bin/drush - -# Create yarn command (run yarn inside ddev container) -sudo cp ddev-yarn.template.sh /usr/local/bin/yarn - -# Create composer command (run composer inside ddev container) -sudo cp ddev-composer.template.sh /usr/local/bin/composer - -# Create node command (run composer inside ddev container) -sudo cp ddev-node.template.sh /usr/local/bin/node - -# Create nvm command (run composer inside ddev container) -sudo cp ddev-nvm.template.sh /usr/local/bin/nvm - -# Create npx command (run composer inside ddev container) -sudo cp ddev-npx.template.sh /usr/local/bin/npx diff --git a/.gitpod/utils/script-templates/ddev-composer.template.sh b/.gitpod/utils/script-templates/ddev-composer.template.sh deleted file mode 100755 index 138f48b..0000000 --- a/.gitpod/utils/script-templates/ddev-composer.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'composer $*' in ddev" -ddev exec_d composer "$@" diff --git a/.gitpod/utils/script-templates/ddev-drush.template.sh b/.gitpod/utils/script-templates/ddev-drush.template.sh deleted file mode 100755 index 7ac0f90..0000000 --- a/.gitpod/utils/script-templates/ddev-drush.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'drush $*' in ddev" -ddev exec_d drush "$@" diff --git a/.gitpod/utils/script-templates/ddev-node.template.sh b/.gitpod/utils/script-templates/ddev-node.template.sh deleted file mode 100755 index 5a30952..0000000 --- a/.gitpod/utils/script-templates/ddev-node.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'node $*' in ddev" -ddev exec_d node "$@" diff --git a/.gitpod/utils/script-templates/ddev-npx.template.sh b/.gitpod/utils/script-templates/ddev-npx.template.sh deleted file mode 100755 index 73eeeee..0000000 --- a/.gitpod/utils/script-templates/ddev-npx.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'npx $*' in ddev" -ddev exec_d npx "$@" diff --git a/.gitpod/utils/script-templates/ddev-nvm.template.sh b/.gitpod/utils/script-templates/ddev-nvm.template.sh deleted file mode 100755 index acd5c45..0000000 --- a/.gitpod/utils/script-templates/ddev-nvm.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'nvm $*' in ddev" -ddev exec_d nvm "$@" diff --git a/.gitpod/utils/script-templates/ddev-php.template.sh b/.gitpod/utils/script-templates/ddev-php.template.sh deleted file mode 100755 index 610926b..0000000 --- a/.gitpod/utils/script-templates/ddev-php.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'php $*' in ddev" -ddev exec_d php "$@" diff --git a/.gitpod/utils/script-templates/ddev-yarn.template.sh b/.gitpod/utils/script-templates/ddev-yarn.template.sh deleted file mode 100755 index d3ffa81..0000000 --- a/.gitpod/utils/script-templates/ddev-yarn.template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -echo "Notice: running 'yarn $*' in ddev" -ddev exec_d yarn "$@" diff --git a/.gitpod/utils/script-templates/phpstorm.template.sh b/.gitpod/utils/script-templates/phpstorm.template.sh deleted file mode 100755 index 48c04d2..0000000 --- a/.gitpod/utils/script-templates/phpstorm.template.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -if [ -n "$DEBUG_SCRIPT" ]; then - set -x -fi - -if [ ! -x ~/.projector/configs/PhpStorm/run.sh ]; then - echo "PhpStorm runner not found" && exit 1 -fi - -# When port 9999 is ready - open that port in a new browser tab -gp await-port 9999 && gp preview "$(gp url 9999)" --external & - -# Run PHPStorm -~/.projector/configs/PhpStorm/run.sh "$GITPOD_REPO_ROOT" diff --git a/.gitpod/utils/script-templates/preview.template.sh b/.gitpod/utils/script-templates/preview.template.sh deleted file mode 100755 index 916a7fc..0000000 --- a/.gitpod/utils/script-templates/preview.template.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -if [ -n "$DEBUG_SCRIPT" ]; then - set -x -fi - -# Preview port 8080 -gp preview "$(gp url 8080)" diff --git a/.gitpod/utils/script-templates/protect-my-git.template.sh b/.gitpod/utils/script-templates/protect-my-git.template.sh deleted file mode 100755 index d9e7f82..0000000 --- a/.gitpod/utils/script-templates/protect-my-git.template.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -if [ -n "$DEBUG_SCRIPT" ]; then - set -x -fi - -# Remove access to user's Git credentials (restore by restart workspace) -git config --global --unset credential.helper diff --git a/.gitpod/utils/send-a-message-gcs.sh b/.gitpod/utils/send-a-message-gcs.sh deleted file mode 100755 index 5c53aba..0000000 --- a/.gitpod/utils/send-a-message-gcs.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# Get current user and current branch -branch_user="$GITPOD_GIT_USER_NAME, $(git branch --show-current)" - -# Load env vars during prebuild using `gp env` command -if [ -z "$IFTTT_TOKEN" ]; then - eval "$(gp env -e | grep IFTTT_TOKEN)" -fi - -# Load env vars during prebuild using `gp env` command -if [ -z "$DP_GOOGLE_ACCESS_KEY" ]; then - eval "$(gp env -e | grep DP_GOOGLE_ACCESS_KEY)" -fi - -# Load env vars during prebuild using `gp env` command -if [ -z "$DP_GOOGLE_SECRET" ]; then - eval "$(gp env -e | grep DP_GOOGLE_SECRET)" -fi - -# Establish connection with Google Cloud through Minio client -mc config host add gcs https://storage.googleapis.com "$DP_GOOGLE_ACCESS_KEY" "$DP_GOOGLE_SECRET" - -# If there's a problem send the error code -if mc find gcs/drupalpod/ready-made-envs.tar.gz; then - message="Success: Google Cloud is ready" -else - message="Error: Envs file wasn't found, it will be recreated" -fi - -# Send a message through IFTTT -curl -X POST -H "Content-Type: application/json" -d "{\"value1\":\"$branch_user\",\"value2\":\"$message\"}" https://maker.ifttt.com/trigger/drupalpod_prebuild_initiated/with/key/"$IFTTT_TOKEN" diff --git a/.gitpod/utils/send-a-message-gitpod.sh b/.gitpod/utils/send-a-message-gitpod.sh deleted file mode 100755 index b0de49c..0000000 --- a/.gitpod/utils/send-a-message-gitpod.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Get current user and current branch -branch_user="$GITPOD_GIT_USER_NAME, $(git branch --show-current)" - -# Load env vars during prebuild using `gp env` command -if [ -z "$DP_READY_MADE_ENVS_URL" ]; then - eval "$(gp env -e | grep DP_READY_MADE_ENVS_URL)" -fi - -# Load env vars during prebuild using `gp env` command -if [ -z "$IFTTT_TOKEN" ]; then - eval "$(gp env -e | grep IFTTT_TOKEN)" -fi - -# Check the status of ready-made envs file -# https://stackoverflow.com/a/53358157/5754049 -url_status=$(wget --server-response --spider --quiet "${DP_READY_MADE_ENVS_URL}" 2>&1 | awk 'NR==1{print $2}') - -# If there's a problem send the error code -if [ "$url_status" = '200' ]; then - message="100%" -else - message="Error: $url_status - $DP_READY_MADE_ENVS_URL" -fi - -# Send a message through IFTTT -curl -X POST -H "Content-Type: application/json" -d "{\"value1\":\"$branch_user\",\"value2\":\"$message\"}" https://maker.ifttt.com/trigger/drupalpod_prebuild_initiated/with/key/"$IFTTT_TOKEN" diff --git a/.gitpod/utils/set-base-environment.sh b/.gitpod/utils/set-base-environment.sh deleted file mode 100755 index 6305af8..0000000 --- a/.gitpod/utils/set-base-environment.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -if [ -n "$DEBUG_SCRIPT" ]; then - set -x -fi - -# Load default envs -# export "$(grep -v '^#' "$GITPOD_REPO_ROOT"/.env | xargs -d '\n')" - -# Clone Drupal core repo -mkdir -p "${GITPOD_REPO_ROOT}"/repos -cd "${GITPOD_REPO_ROOT}"/repos && time git clone https://git.drupalcode.org/project/drupal.git diff --git a/README.md b/README.md index cc0682a..12d960b 100644 --- a/README.md +++ b/README.md @@ -19,26 +19,6 @@ We expect most projects using this package will start with the composer.json in Once you have run a `composer create-project` command, it is usually desirable to commit the composer.lock file to your project repository and use this lock file to control the specific version of packages that you deploy to dev, test and ultimately production hosting environments. -## Gitpod - -Gitpod allows you to run a virtual development environment in the cloud in your browser. - -This can be very useful for testing functionality, reviewing pull requests, or working on features. - -### Before you start - -You will need an account on Gitpod. - -If you authenticate with your Github account, you will be able to push commits back to the repository you are working on. - -[Sign up for gitpod.io](https://gitpod.io/login), if you haven't already. - -### Spin up LocalGov Drupal with - -Click on the "Open in Gitpod" button below - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/localgovdrupal/localgov_project) - ## Maintainers This project is currently maintained by: