Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunnysideup/silverstripe-release
Release this site - made easy
https://github.com/sunnysideup/silverstripe-release
Last synced: 2 months ago
JSON representation
Release this site - made easy
- Host: GitHub
- URL: https://github.com/sunnysideup/silverstripe-release
- Owner: sunnysideup
- Created: 2021-09-24T05:07:04.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-13T03:11:46.000Z (4 months ago)
- Last Synced: 2024-10-13T11:40:27.489Z (3 months ago)
- Language: Shell
- Size: 111 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This module helps you release your silverstripe (or other) projects.
# install
`composer require sunnysideup/release:dev-master`
# release script usage
This module comes with an opiniated release script that can be used as follows:
### try it...
```shell
vendor/bin/sake-release -h
```### additional settings
To skip flushing the front-end, set the following variable in your `.env` file:
```.env
SS_RELEASE_FRONT_END=false
```### speed up DEV/BUILD
To speed up the dev/build, you can add the following to your `.env` file:
```.env
SS_FAST_DEV_BUILD=true
```---
---
---
Below are some further notes about release strategies
---
---
---# Building a Deployment Strategy / Pipeline
Here are some general notes about releases. Use as you see fit.
## requirements
release should be easy ....
- Whenever you push to a designated branch, it releases on a server (test / production).
- We are able to roll back (db + code)
- Releases should be fast# option 1 - use bitbucket _hook_ with this module.
Here is how:
### set up .env variables
set:
- `SS_RELEASE_TOKEN="ABC_ABC_ABC_ABC_ABC_ABC_ABC_ABC_"` # set to a random string
- `SS_RELEASE_SCRIPT="vendor/bin/sake-release"`in your `.env` file.
### finally
add a hook to bitbucket:
`https://mysite.co.nz/_resources/vendor/sunnysideup/release/client/ReleaseProjectFromBitbucketHook.php?ts=ABC_ABC_ABC_ABC_ABC_ABC_ABC_ABC`
See https://confluence.atlassian.com/bitbucketserver/using-repository-hooks-776639836.html
# option 2 - use BEAM
See https://github.com/heyday/beam/
# option 3 - use bitbucket pipepline with this module
##### a. enable pipelines: https://bitbucket.org/yourorganisation/yourproject/admin/addon/admin/pipelines/settings (see settings / pipelines / settings)
##### b. create ssh key on bitbucket.com (settings > pipelines > ssh keys)
##### c. add public ssh key to server in ~/.ssh/authorized_keys (or through a control panel)
##### d. write file below as `bitbucket-pipelines.yml` in the root of your project
```shell
pipelines:
branches:development:
- step:
script:
- ssh -o StrictHostKeyChecking=no [email protected] 'cd ./var/www/mysite; bash vendor/bin/sake-release develop'master:
- step:
script:
- ssh -o StrictHostKeyChecking=no [email protected] 'cd ./var/www/mysite; bash vendor/bin/sake-release production'```
### example pipelines with extra stuff:
https://github.com/brettt89/silverstripe-docker
# Option 4: use https://deployer.org/