Skip to content

Commit

Permalink
Merge pull request #59 from dokku/test-conf
Browse files Browse the repository at this point in the history
Ensure test runs against vendored app-nginx.conf.sigil and mime.types
  • Loading branch information
josegonzalez authored Sep 11, 2022
2 parents 09fe857 + 9b7f098 commit 2b95cd1
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions bin/ci-pre-deploy
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
#!/bin/sh -l
if [ "$IS_REVIEW_APP" = "true" ]; then
git config --global user.name 'Dokku Bot'
git config --global user.email no-reply@dokku.com

echo "-----> Purging repo cache"
ssh "$SSH_REMOTE" -- repo:purge-cache "$APP_NAME"

echo "-----> Setting the test domain name"
ssh "$SSH_REMOTE" -- domains:set "$APP_NAME" "$APP_NAME.dokku.net"

echo "-----> Setting the buildpack to the current commit"
echo "https://github.com/${GITHUB_REPOSITORY}.git#$GITHUB_SHA" > .buildpacks
echo "-----> Ensure test includes vendored app-nginx.conf.sigil"
cp conf/app-nginx.conf.sigil app-nginx.conf.sigil
git add app-nginx.conf.sigil
git commit -qm "feat: specify custom app-nginx.conf.sigil"

echo "-----> Ensure test includes vendored mime.types"
cp conf/mime.types mime.types
git add mime.types
git commit -qm "feat: specify custom mime.types"

echo "-----> Setting the buildpack to the current ref $GITHUB_HEAD_REF"
echo "https://github.com/${GITHUB_REPOSITORY}.git#$GITHUB_HEAD_REF" > .buildpacks
git add .buildpacks
git config --global user.name 'Dokku Bot'
git config --global user.email no-reply@dokku.com
git commit -qm "feat: specify $GITHUB_SHA as buildpack"
fi

git rev-parse HEAD >ci-commit-override
fi

0 comments on commit 2b95cd1

Please sign in to comment.