Skip to content
Snippets Groups Projects
Commit c733147c authored by Jure's avatar Jure
Browse files

ci: optimize builds for speed

parent 49b625c2
No related branches found
No related tags found
No related merge requests found
...@@ -16,12 +16,12 @@ build: ...@@ -16,12 +16,12 @@ build:
- docker:19.03.12-dind - docker:19.03.12-dind
stage: build stage: build
script: script:
- docker version
- docker build -t $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA .
- if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi - if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device" - docker pull $IMAGE_ORG/$IMAGE_NAME:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -tag $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA $IMAGE_ORG/$IMAGE_NAME:latest .
- docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA - docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
- docker push $IMAGE_ORG/$IMAGE_NAME:latest
lint: lint:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
...@@ -53,6 +53,7 @@ test-chrome: ...@@ -53,6 +53,7 @@ test-chrome:
test-firefox: test-firefox:
allow_failure: true # at this point Cypress' support for Firefox is not stable
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test stage: test
variables: variables:
......
...@@ -13,7 +13,8 @@ RUN [ "yarn", "install", "--frozen-lockfile" ] ...@@ -13,7 +13,8 @@ RUN [ "yarn", "install", "--frozen-lockfile" ]
ENV NODE_ENV ${NODE_ENV} ENV NODE_ENV ${NODE_ENV}
RUN [ "npx", "pubsweet", "build"] # Disabling the build for now, as it runs in the test server again
# RUN [ "npx", "pubsweet", "build"]
EXPOSE ${PORT} EXPOSE ${PORT}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment