Last active
January 31, 2017 21:12
-
-
Save Fitzsimmons/afea60ef7acc6db22c8b47d2231b3bd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Pipeline] unstash | |
[Pipeline] } //node | |
[Pipeline] Allocate node : End | |
[Pipeline] End of Pipeline | |
java.io.IOException: Failed to extract input stream | |
at hudson.FilePath.readFromTar(FilePath.java:2300) | |
at hudson.FilePath.access$400(FilePath.java:190) | |
at hudson.FilePath$10.invoke(FilePath.java:720) | |
at hudson.FilePath$10.invoke(FilePath.java:718) | |
at hudson.FilePath.act(FilePath.java:990) | |
at hudson.FilePath.act(FilePath.java:968) | |
at hudson.FilePath.untarFrom(FilePath.java:718) | |
at org.jenkinsci.plugins.workflow.flow.StashManager.unstash(StashManager.java:114) | |
at org.jenkinsci.plugins.workflow.support.steps.stash.UnstashStep$Execution.run(UnstashStep.java:64) | |
at org.jenkinsci.plugins.workflow.support.steps.stash.UnstashStep$Execution.run(UnstashStep.java:54) | |
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49) | |
at hudson.security.ACL.impersonate(ACL.java:213) | |
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47) | |
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:262) | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) | |
at java.lang.Thread.run(Thread.java:745) | |
Caused by: java.io.FileNotFoundException: /var/lib/jenkins/jobs/PackmanagerPipelineTest2/workspace/vendor/bundle/ruby/2.1.0/cache/bundler/git/activerecord-import-c9f2cd833944c9f57d36c8d753d3b6c846f7234c/objects/pack/pack-d97f28c45d6606c2d72aab1d86a0cfc479fd4a22.idx (Permission denied) | |
at java.io.FileOutputStream.open(Native Method) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:221) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:171) | |
at hudson.util.IOUtils.copy(IOUtils.java:38) | |
at hudson.FilePath.readFromTar(FilePath.java:2290) | |
... 17 more | |
Finished: FAILURE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
stage 'Source checkout' | |
git credentialsId: '963f6ef9-259e-46ac-bbe5-f19b35b73ea8', url: '[email protected]:Nulogy/PackManager.git' | |
stash 'source' | |
} | |
node { | |
stage 'Package gems' | |
bootstrap_ruby('Package gems') | |
sh 'bundle package --all' | |
stash includes: 'vendor/cache/**', name: 'gem_package' | |
} | |
def gulp_assets = { | |
node { | |
stage 'Gulp assets' | |
sh '''rm -rf ./node_modules | |
. ~/.nvm/nvm.sh | |
nvm install | |
nvm use | |
npm install | |
npm run build-assets''' | |
stash includes: 'app/assets/**', name: 'gulp_assets' | |
} | |
} | |
def rails_assets = { | |
node { | |
stage 'Rails assets' | |
bootstrap_ruby('Rails assets') | |
bundle() | |
env.RAILS_ENV = 'production' | |
env.PM_PRODUCTION_DATABASE = 'assets_database' | |
sh ''' | |
cp config/amazon_s3.yml.sample config/amazon_s3.yml | |
cp config/resque.yml.sample config/resque.yml | |
sed s/password:\\ password/password:\\ Nulogy4Ever/ config/database.yml.sample > config/database.yml | |
bundle exec rake db:create | |
bundle exec rake i18n:js:extract | |
bundle exec rake assets:precompile | |
''' | |
stash includes: 'public/client-built/**,rev-manifest.json', name: 'rails_assets' | |
} | |
} | |
rails_assets() | |
gulp_assets() | |
// TODO: parallelize | |
def bootstrap_ruby(stage_name) { | |
echo "Bootstrapping ruby for ${stage_name}" | |
unstash 'source' | |
sh '''current_ruby_version=`cat .ruby-version` | |
rbenv install --skip-existing $current_ruby_version && | |
rbenv local $current_ruby_version && | |
gem install engineyard bundler --no-rdoc --no-ri''' | |
} | |
def bundle() { | |
unstash 'gem_package' | |
sh 'bundle install --local' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I am having a very similar issue with unstash. Any info?