Skip to content

Commit

Permalink
Switch to better workaround for docker cp
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Feb 10, 2018
1 parent eb023fe commit db1873a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ node(label: 'linux') {
catchError {
stage('ci:build') {
sh 'docker run -i --name ipfs-companion-build-${JOB_BASE_NAME}-${BUILD_NUMBER} ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER} npm run ci:build'
sh 'docker wait ipfs-companion-build-${JOB_BASE_NAME}-${BUILD_NUMBER}' // fix random 'docker cp' errors that copy nothing
sh 'docker cp ipfs-companion-build-${JOB_BASE_NAME}-${BUILD_NUMBER}:/usr/src/app/build/. build/ || true' // copy package
sh 'docker cp ipfs-companion-build-${JOB_BASE_NAME}-${BUILD_NUMBER}:/usr/src/app/add-on/. add-on/ || true' // needed for lint:web-ext
archiveArtifacts artifacts: 'build/*.zip', fingerprint: true
}
stage('lint:web-ext') {
sh 'docker cp ipfs-companion-build-${JOB_BASE_NAME}-${BUILD_NUMBER}:/usr/src/app/add-on/. add-on/ || true' // needed for lint:web-ext
sh 'docker run -i --rm -v $(pwd)/add-on:/usr/src/app/add-on ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER} npm run lint:web-ext'
}
}
sh 'docker rm ipfs-companion-build-${JOB_BASE_NAME}-${BUILD_NUMBER}'
sh 'docker rmi -f ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER}'
sh 'ls -R add-on'
sh 'ls -R build'
sh 'ls -Rlh add-on'
sh 'ls -Rlh build'
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ci": "run-s ci:*",
"ci:install": "npx yarn@1.3.2 install --frozen-lockfile",
"ci:test": "npx yarn@1.3.2 test",
"ci:build": "npx yarn@1.3.2 build",
"ci:build": "npx yarn@1.3.2 build && shx chmod -R ugo+rw build/ add-on/",
"yarn-build": "npx yarn@1.3.2 && npx yarn@1.3.2 build"
},
"private": true,
Expand Down

0 comments on commit db1873a

Please sign in to comment.