-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #372 from ipfs-shipyard/fix/tests-timeout
CI and Tests stabilization
- Loading branch information
Showing
7 changed files
with
168 additions
and
26 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM node:9.4.0-alpine | ||
RUN apk add --update make gcc g++ python git | ||
FROM node:9.5.0 | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
ENV PATH="/usr/src/app/node_modules/.bin:${PATH}" | ||
COPY package.json /usr/src/app/package.json | ||
COPY yarn.lock /usr/src/app/yarn.lock | ||
RUN yarn | ||
RUN npm run ci:install | ||
COPY . /usr/src/app |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
node(label: 'linux') { | ||
checkout scm | ||
sh 'docker build -t ipfs-companion .' | ||
sh 'docker run -i ipfs-companion yarn test' | ||
sh 'docker run -i -v $(pwd)/build:/usr/src/app/build ipfs-companion yarn build' | ||
archiveArtifacts artifacts: 'build/*.zip' | ||
stage('git:checkout') { | ||
cleanWs() | ||
checkout scm | ||
sh 'printenv' | ||
} | ||
stage('ci:install') { | ||
sh 'docker build -t ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER} .' | ||
} | ||
catchError { | ||
stage('ci:test') { | ||
sh 'docker run -i --rm -e JUNIT_REPORT_PATH=test/report.xml -v $(pwd)/test:/usr/src/app/test:rw ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER} npm run ci:test' | ||
} | ||
} | ||
junit allowEmptyResults: true, testResults: 'test/report.xml' | ||
catchError { | ||
stage('ci:build') { | ||
sh 'mkdir -p $(pwd)/build' | ||
sh 'docker run -i --rm -v $(pwd)/build:/usr/src/app/build:rw -v $(pwd)/add-on:/usr/src/app/add-on:rw ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER} npm run ci:build' | ||
archiveArtifacts artifacts: 'build/*.zip', fingerprint: true | ||
} | ||
stage('lint:web-ext') { | ||
sh 'docker run -i --rm -v $(pwd)/add-on:/usr/src/app/add-on:ro ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER} npm run lint:web-ext' | ||
} | ||
} | ||
sh 'docker rmi -f ipfs-companion:${JOB_BASE_NAME}-${BUILD_NUMBER}' | ||
sh 'ls -lh .' | ||
sh 'ls -Rlh add-on' | ||
sh 'ls -Rlh build' | ||
cleanWs() | ||
} |
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
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
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