This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BLUE=\\x1B[34m | |
YELLOW=\\x1B[33m | |
GREEN=\\x1B[32m | |
RED=\\x1B[31m | |
RESET=\\x1b[0m | |
## Replicates a deploy in a platform.sh environment | |
## Usage: fin replicate_deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
module.exports.endpoint = async (event, context, callback) => { | |
const queryParams = event.queryStringParameters; | |
if (!queryParams) callback("No query params"); | |
const devUser = queryParams.user; | |
const site = queryParams.site; | |
const key = queryParams.key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BLUE=\\x1B[34m | |
YELLOW=\\x1B[33m | |
GREEN=\\x1B[32m | |
RED=\\x1B[31m | |
RESET=\\x1b[0m | |
## Useful to refresh your local .env file | |
## Usage: fin refresh_env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BLUE=\\x1B[34m | |
YELLOW=\\x1B[33m | |
GREEN=\\x1B[32m | |
RED=\\x1B[31m | |
RESET=\\x1b[0m | |
## Custom `pull` command to sync your local files with a remote env. | |
## Usage: fin sync_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Tails the logs output by CraftCMS | |
## Usage: fin logs | |
# Forces whole job to error on failure | |
set -e | |
fin exec "tail -f storage/logs/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BLUE=\\x1B[34m | |
YELLOW=\\x1B[33m | |
GREEN=\\x1B[32m | |
RED=\\x1B[31m | |
RESET=\\x1b[0m | |
## Removes any previous containers this project may have created, then starts and executes npm install/composer install | |
## Usage: fin init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Saves the local DB to a file. If not supplied with a path, stored in /tmp/ with current timestamp | |
## Usage: fin db_dump [path] | |
# Forces whole job to error on failure | |
set -e | |
TRANSACTION_ID=$(date +"%Y-%m-%d_%H-%M-%S") | |
SAVE_PATH=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
SITE_ALIAS="arbitrary_name" # in case of multiple | |
# The amazon S3 bucket to save the backups to (must already exist) | |
S3BUCKET="my-craftcms-backups" | |
# Optionally specify bucket region | |
S3BUCKETREGION="us-east-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This activity script gets | |
* the URL of the new environment from PSH, | |
* then requests the originating branch from the Github API (Github is largely unaware of PR branches it seems) | |
* then triggers a Github Action to build a linux container that runs cypress tests against the PR environment | |
*/ | |
const ghUser = 'github user that owns the repo'; // found in the url e.g. github.com/ghUser/ghRepo | |
const ghRepo = 'repo name'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/cypress.yml | |
name: Manually Triggered Cypress Tests with installation job | |
on: | |
workflow_dispatch: | |
inputs: | |
baseUrl: | |
description: 'Testing Domain' | |
required: true |