Comments (8)
@atmos Can you please help?
from heaven.
Hi @gogames. Actually, you don't need to run git clone
in your Fabric since it is Heaven's responsibility to checkout (a.k.a. clone) your repository. Heaven mainly does three things:
- Listen to GitHub, waiting for
deployment
event - When it receives such an event, it clones the repository
- Once cloned, it goes into this repository and applies the configured strategy (Fabric in your case)
So, what you should do in your deploy
method is not to clone the repo, but the actual deployment process (like compiling assets, pushing the build to a server, etc.)
from heaven.
@willdurand Thank you!
How can I send the repository to remote server and then compile the project on that server? The point is I do not want to do compilation on Heaven and then push the executable file to remote server.
That would be perfect if I can have a sample fabfile.py file.
Thank you so much!
from heaven.
I don't use Fabric anymore unfortunately. Yet, IMO Heaven's main use case is to create a build (or artifact or executable), hence it should do compilation.
What I would do in your case would be to:
git archive
the current state of your repo (what Heaven cloned)- Push the archive to your remote server
- Do compilation
Based on what you wrote here, it should work with no extra credentials, since Heaven knows how to git clone
, and your Fabric should know how to ssh your remote server.
from heaven.
According to document of providers, heaven simply execute a command fab -R %{environment} %{task}:branch_name=%{ref}
which means I do not have the chance to ask heaven to push the archive to remote server and do the rest.
Please correct me if I misunderstand the document.
from heaven.
The problem is simplified: how to push the archive to remote servers?
.
Thanks @willdurand for help.
from heaven.
Well, this is your job to write the fabfile
, so you can put everything you want. Here is what might work:
def deploy(branch_name):
local('git archive --format=tar --output=/tmp/archive.tar --prefix=dist/ %s' % branch_name)
run('scp /tmp/archive.tar user@remove_server:~/') # see also `put()`, which might be better
run('tar xf ~/archive.tar')
with cd('~/dist/')
run('compile')
from heaven.
Awesome it should work! Let me close the issue now. Thank you!
from heaven.
Related Issues (20)
- Update provider libraries to download tarball vs cloning a git repository HOT 8
- Possible to use a different version of Ruby in bundler_capistrano? HOT 3
- Cannot Deploy to Heroku using web UI HOT 2
- Why DEPLOYMENT_PRIVATE_KEY don't take effect? HOT 2
- Remove formation size from app.json
- github oauth issue
- Heroku deploy button not working HOT 4
- 404 error page on "/resque" (after OAuth'ing with GitHub) HOT 3
- Is it possible to limit which repositories can be deployed? HOT 6
- Archive downloads break deployments HOT 2
- Documentation question HOT 3
- Heaven installation HOT 2
- Elastic Beanstalk doesn't work! HOT 3
- Default value for GITHUB_TEAM_ID
- A question on `github_authenticate` HOT 3
- How to host heaven on ubuntu14.04 instead of heroku HOT 8
- New payload for deployment statuses HOT 4
- DEPLOYMENT_PRIVATE_KEY doesn't get used HOT 4
- Heroku API Deprecation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heaven.