Skip to content

Commit

Permalink
Updated Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Jan 7, 2021
1 parent abf5e5f commit 0ce434e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pipeline {
sh '''docker pull eeacms/eprtr-frontend; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" eeacms/eprtr-frontend cypress'''
} finally {
sh '''mkdir -p cypress-reports'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/cypress/videos cypress-reports/'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/cypress/videos cypress-reports/'''
stash name: "cypress-reports", includes: "cypress-reports/**/*"
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
sh '''echo "$(docker stop $BUILD_TAG-plone; docker rm -v $BUILD_TAG-plone; docker rm -v $BUILD_TAG-cypress)" '''
Expand Down
8 changes: 8 additions & 0 deletions entrypoint-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ function apply_path {
test -n "$API_PATH" && apply_path

echo "Starting Volto"

if [[ "$1" == "cypress"* ]]; then
RAZZLE_API_PATH=$RAZZLE_API_PATH yarn start &

cd /opt/frontend
exec bash -c "wait-on -t $TIMEOUT http://localhost:3000 && CYPRESS_API_PATH=$CYPRESS_API_PATH ./node_modules/cypress/bin/cypress run"
fi

exec "$@"

0 comments on commit 0ce434e

Please sign in to comment.