https://github.com/plopix/platformsh-activity-scripts
Platform.sh Activity Scripts
https://github.com/plopix/platformsh-activity-scripts
automation hosting paas platformsh
Last synced: 11 months ago
JSON representation
Platform.sh Activity Scripts
- Host: GitHub
- URL: https://github.com/plopix/platformsh-activity-scripts
- Owner: Plopix
- License: mit
- Created: 2020-06-01T22:59:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-05T02:56:09.000Z (almost 6 years ago)
- Last Synced: 2025-02-27T14:33:22.872Z (over 1 year ago)
- Topics: automation, hosting, paas, platformsh
- Language: JavaScript
- Size: 145 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Platform.sh Activity Scripts
This repository provides a set of Platform.sh activity scripts useful for any projects.
## Script list:
- **github/env_url.js**: creates a Github Status providing the first URL of a new deployed environnement
- **slack/deploy.js**: sends a rich message to a slack channel
## How to use the script
```
curl ${URLOFTHESCRIPT} --output script.js
platform integration:add --type script --file ./script.js --events event1,event2,event3
rm script.js
```
## Scripts
### slack/deploy.js
This script needs information about your Slack channel incomming Webhook, so you need to create a project variable on Platform.sh
```
https://hooks.slack.com/services/XXXXX/XXXXXX/XXXXX
```
The project variable MUST be `SLACK_URL` and should be set as sensitive.
Then you can install it
```json
curl https://raw.githubusercontent.com/Plopix/platformsh-activity-scripts/master/slack/deploy.js --output script.js
platform integration:add --type script --file ./script.js --events environment.redeploy --states="complete"
rm script.js
```

### github/env_url.js
This script needs information about your GITHUB repository, so you need to create a project variable on Platform.sh
```json
{
"owner": "YourLogin",
"repository": "YourRepo",
"token": "YourToken"
}
```
The project variable MUST be `GITHUB_AUTH` and should be set as sensitive.
Then you can install it
```json
curl https://raw.githubusercontent.com/Plopix/platformsh-activity-scripts/master/github/env_url.js --output script.js
platform integration:add --type script --file ./script.js --events environment.redeploy --states="complete"
rm script.js
```

## LICENCE
[MIT](LICENSE)