Updated for buildpack move to github.com/heroku
This commit is contained in:
Родитель
99faf38ec9
Коммит
e3240da4dc
|
@ -2,7 +2,7 @@
|
|||
|
||||
This sample uses unlocked second generation packages (2GPs) to deploy project updates. If you're looking to perform metadata deploys instead, please use [https://github.com/wadewegner/salesforce-dx-pipeline-mdapi-sample](https://github.com/wadewegner/salesforce-dx-pipeline-mdapi-sample).
|
||||
|
||||
Using this sample app and the resources in this repo, you can setup a Heroku Pipeline to drive CI / CD for Salesforce DX. This sample uses the [salesforce-dx-buildpack](https://github.com/wadewegner/salesforce-dx-buildpack) and the [salesforce-cli-buildpack](https://github.com/wadewegner/salesforce-cli-buildpack).
|
||||
Using this sample app and the resources in this repo, you can setup a Heroku Pipeline to drive CI / CD for Salesforce DX. This sample uses the [salesforce-dx-buildpack](https://github.com/heroku/salesforce-buildpack) and the [salesforce-cli-buildpack](https://github.com/heroku/salesforce-cli-buildpack).
|
||||
|
||||
![image](https://user-images.githubusercontent.com/746259/36068129-5c8a19b2-0e82-11e8-96b5-a9fed295a33d.png)
|
||||
|
||||
|
|
4
app.json
4
app.json
|
@ -14,10 +14,10 @@
|
|||
"devDependencies": {},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/wadewegner/salesforce-cli-buildpack"
|
||||
"url": "https://github.com/heroku/salesforce-cli-buildpack"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/wadewegner/salesforce-dx-buildpack#develop"
|
||||
"url": "https://github.com/heroku/salesforce-buildpack#develop"
|
||||
}
|
||||
],
|
||||
"env": {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
heroku pipelines:destroy pipeline1521514727
|
||||
heroku apps:destroy -a dev1521514727 -c dev1521514727
|
||||
heroku apps:destroy -a staging1521514727 -c staging1521514727
|
||||
heroku apps:destroy -a prod1521514727 -c prod1521514727
|
||||
rm -- "destroy1521514727.sh"
|
25
setup.sh
25
setup.sh
|
@ -51,12 +51,15 @@ fi
|
|||
echo "heroku pipelines:destroy $HEROKU_PIPELINE_NAME
|
||||
heroku apps:destroy -a $HEROKU_DEV_APP_NAME -c $HEROKU_DEV_APP_NAME
|
||||
heroku apps:destroy -a $HEROKU_STAGING_APP_NAME -c $HEROKU_STAGING_APP_NAME
|
||||
heroku apps:destroy -a $HEROKU_PROD_APP_NAME -c $HEROKU_PROD_APP_NAME" > destroy.sh
|
||||
heroku apps:destroy -a $HEROKU_PROD_APP_NAME -c $HEROKU_PROD_APP_NAME
|
||||
rm -- \"destroy$TICKS.sh\"" > destroy$TICKS.sh
|
||||
|
||||
echo ""
|
||||
echo "Run ./destroy.sh to remove resources"
|
||||
echo "Run ./destroy$TICKS.sh to remove resources"
|
||||
echo ""
|
||||
|
||||
chmod +x "destroy$TICKS.sh"
|
||||
|
||||
# Create three Heroku apps to map to orgs
|
||||
heroku apps:create $HEROKU_DEV_APP_NAME $HEROKU_TEAM_FLAG
|
||||
heroku apps:create $HEROKU_STAGING_APP_NAME $HEROKU_TEAM_FLAG
|
||||
|
@ -101,21 +104,23 @@ stagingSfdxAuthUrl=$(sfdx force:org:display --verbose -u $PROD_USERNAME --json |
|
|||
heroku config:set SFDX_AUTH_URL=$stagingSfdxAuthUrl -a $HEROKU_PROD_APP_NAME
|
||||
|
||||
# Add buildpacks to apps
|
||||
heroku buildpacks:add -i 1 https://github.com/wadewegner/salesforce-cli-buildpack -a $HEROKU_DEV_APP_NAME
|
||||
heroku buildpacks:add -i 1 https://github.com/wadewegner/salesforce-cli-buildpack -a $HEROKU_STAGING_APP_NAME
|
||||
heroku buildpacks:add -i 1 https://github.com/wadewegner/salesforce-cli-buildpack -a $HEROKU_PROD_APP_NAME
|
||||
heroku buildpacks:add -i 1 https://github.com/heroku/salesforce-cli-buildpack -a $HEROKU_DEV_APP_NAME
|
||||
heroku buildpacks:add -i 1 https://github.com/heroku/salesforce-cli-buildpack -a $HEROKU_STAGING_APP_NAME
|
||||
heroku buildpacks:add -i 1 https://github.com/heroku/salesforce-cli-buildpack -a $HEROKU_PROD_APP_NAME
|
||||
|
||||
heroku buildpacks:add -i 2 https://github.com/wadewegner/salesforce-dx-buildpack#develop -a $HEROKU_DEV_APP_NAME
|
||||
heroku buildpacks:add -i 2 https://github.com/wadewegner/salesforce-dx-buildpack#develop -a $HEROKU_STAGING_APP_NAME
|
||||
heroku buildpacks:add -i 2 https://github.com/wadewegner/salesforce-dx-buildpack#develop -a $HEROKU_PROD_APP_NAME
|
||||
heroku buildpacks:add -i 2 https://github.com/heroku/salesforce-buildpack -a $HEROKU_DEV_APP_NAME
|
||||
heroku buildpacks:add -i 2 https://github.com/heroku/salesforce-buildpack -a $HEROKU_STAGING_APP_NAME
|
||||
heroku buildpacks:add -i 2 https://github.com/heroku/salesforce-buildpack -a $HEROKU_PROD_APP_NAME
|
||||
|
||||
# Create Pipeline
|
||||
# Valid stages: "test", "review", "development", "staging", "production"
|
||||
heroku pipelines:create $HEROKU_PIPELINE_NAME -a $HEROKU_DEV_APP_NAME -s development $HEROKU_TEAM_FLAG
|
||||
heroku pipelines:add $HEROKU_PIPELINE_NAME -a $HEROKU_STAGING_APP_NAME -s staging
|
||||
heroku pipelines:add $HEROKU_PIPELINE_NAME -a $HEROKU_PROD_APP_NAME -s production
|
||||
# bug: https://github.com/heroku/heroku-pipelines/issues/80
|
||||
# heroku pipelines:setup $HEROKU_PIPELINE_NAME $GITHUB_REPO -y $HEROKU_TEAM_FLAG
|
||||
|
||||
# Setup your pipeline
|
||||
heroku pipelines:connect $HEROKU_PIPELINE_NAME --repo $GITHUB_REPO
|
||||
heroku reviewapps:enable -p $HEROKU_PIPELINE_NAME -a $HEROKU_DEV_APP_NAME --autodeploy --autodestroy
|
||||
|
||||
heroku ci:config:set -p $HEROKU_PIPELINE_NAME SFDX_DEV_HUB_AUTH_URL=$devHubSfdxAuthUrl
|
||||
heroku ci:config:set -p $HEROKU_PIPELINE_NAME SFDX_AUTH_URL=$devSfdxAuthUrl
|
||||
|
|
Загрузка…
Ссылка в новой задаче