strider-cd / strider-custom Goto Github PK
View Code? Open in Web Editor NEWSupport for custom prepare, test and deploy phases in Strider
Support for custom prepare, test and deploy phases in Strider
I wanted to set up a custom script to ensure a specific ruby version and run my ruby tests.
However, when the scripts are run there are no bash variables imported.
So after a while I figure out I could do something similar to this:
bash --login -c "rvm use 1.9.3; bundle exec rspec"
If the strider-custom.json could also contain a shell arguments and shell option that could be used in process I'm free to choose my own shell and thus be able to import variables based on the user running strider. Making it much easier to start using Strider with other languages.
example:
{
"command": 'bash',
"args": ['-x', '-c', '--login', command]
"prepare": "echo executed prepare statement!",
"test": "echo executed deploy statement!",
"deploy": "echo deploy && git push heroku master --force"
}
In theory this could also open up for use with other environments such as powershell on Windows.
Is there a way to setup one project deployment to be dependent on another project?
Hey, quick question here.
I have one repo and build products from it via custom scripts and there are few build/deploy scripts for different products (frontends, backend, API, etc).
When my repo is OK I want to run script for one of my product manually. I can resolve stage/production issue via using different branches.
But is it possible to have few deploy targets? Or is it only "one branch โ one deploy" approach?
Hello,
We have a build that uses the git provider.
It successfully clones our node repo, runs install, runs tests, then starts our custom script.
Our custom script run an npm prune --production, then an npm pack, we then push the new tarball into aws S3. Finally we run npm version patch with a commit message.
Everything up to this point works fine up to this point. The problem comes when we try to push the tags and the modified package.json file back into github.
+ git push --follow-tags origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
How can we successfully complete this process buy pushing to github?
Our build script in case it helps:
appName=`node -e "console.log(require('./package.json').name);"`
npm version patch -m "%s (production deployment)"
npm prune --production
npm pack
# push to s3
version=`node -e "console.log(require('./package.json').version);"`
mv ./${appName}-*.tgz ./${appName}.tgz || exit 1
aws s3 cp --sse AES256 ./${appName}.tgz s3://${bucket}/deployables/${appName}-aws/${appName}-${version}.tgz|| exit 1
# bump the version again for development
npm version patch -m "%s (development)"
git push --follow-tags origin master
I just created a new project and chose custom (head for version 1.4.0). It creates the project, I can load the custom plugin which I had to add manually.
Then run the project, and it just fetches the code from github. It doesn't run the steps specified in my custom-strider.json file.
Since there are a fix and new commits maybe a new release is needed here.
I think we need to change some logic in strider to make things less heroku dependant.
Or should strider-custom set deploy_config
on the repo?
Most of the time when I hit save on the strider-custom config page,nothing happens and the script isn't saved.
However, even when I tried using a strider-custom.json file to the root of my project, it still didn't override the existing behavior which runs 'npm test'. Is there something I'm missing here, is strider-custom meant to override the existing behaviors?
Is there possible to use GIT commit ID as shell variable (e.g. GIT_COMMIT_ID) ?
Hi,
One of our projects is using Strider to deploy a WordPress plugin using SVN.
One of the commands, adds to svn all the new files doing the following
svn status | grep '\?' | awk '{print $2}'| xargs svn add
with the following output
+ awk '{print $2}'
+ svn status
+ xargs svn add
+ grep '\?'
For some reason, this stop working and after check the logs, the output change like the pipes where executing in the other way
+ xargs svn add
+ awk '{print $2}'
+ grep '\?'
+ svn status
adn after update the command to
xargs svn add | awk '{print $2}' | grep '\?' | svn status
it is working again.
Is there any reason for this awkward issue?
I expected it to. Does that make sense? I mean, if I have a nodejs and I want it to do something other than npm test
(not just in addition to) how would I do that?
I like travisci's paradigm of replacement.
ansible-playbook -i playbooks/inventory.ini playbooks/deploy.yml
PLAY [webapp] *****************************************************************
GATHERING FACTS ***************************************************************
previous known host file not found
fatal: [IP] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
TASK: [Git clone/update if needed from github] ********************************
FATAL: no hosts matched or all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/strider/deploy.retry
would be nice
I am trying to run the yeoman build script within strider in a ubuntu VM, and it takes forever. When I run the same script on the same box using sh, it takes a few seconds.
Looking at the code, it looks like the forkProc must be restricting resources. I am trying to track this down, but is there a quick fix for this kind of issues?
Thanks.
Hello,
When using custom scripts, we often apply them to multiple branches. The ejs feature from Strider-CD/strider-ssh-deploy#15 would be awesome to have in this package. It's a pretty simple change. Any objections?
Seems that npm test
is ran before the custom test script, and in my case, the package.json
isn't in the main directory so it errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.