Skip to content

Commit

Permalink
feat(drone): clone env from private repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Gimmy committed May 26, 2018
1 parent a4c47ff commit 2e073af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ pipeline:
pre-build:
image: docker:git
pull: true
secrets: [ ssh_key ]
commands:
- mkdir -p ~/.ssh
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- echo -n "$SSH_KEY" > ~/.ssh/id_rsa && chmod 0600 ~/.ssh/id_rsa
- git clone git@github.com:g9308370/cococharge-env.git
- rm -rf $DRONE_WORKSPACE/database/seeds
- rm -rf $DRONE_WORKSPACE/node_modules
- cp cococharge-env/${DRONE_COMMIT_BRANCH}/.env $DRONE_WORKSPACE/.env
- cp -R $DRONE_WORKSPACE $DRONE_WORKSPACE/../src
- mv $DRONE_WORKSPACE/../src $DRONE_WORKSPACE
when:
Expand Down
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_NAME=Laravel
APP_NAME=CocoCharge
APP_ENV=local
APP_KEY=base64:t+QqpJcYGPPgMbInaBMkwutRJ0pAlZ/hfJSGLz/jIq4=
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

Expand Down

0 comments on commit 2e073af

Please sign in to comment.