Skip to content

Commit

Permalink
Replace VM executors with Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Pounder authored and Adam Pounder committed Oct 28, 2024
1 parent 2e687bb commit bd4c683
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ jobs:
paths:
- .gradle-home
manual:
machine:
image: ubuntu-2204:2024.05.1
docker:
- image: gebish/ci:v13
environment:
GRADLE_OPTS: "-Xmx1024m -XX:MaxMetaspaceSize=256m"
GRADLE_USER_HOME: ".gradle-home"
resource_class: large
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- restore_cache:
keys:
- gradle-home-manual-machine-{{ .Branch }}
Expand All @@ -42,10 +47,9 @@ jobs:
- run:
command: |
export WORKING_DIRECTORY=`pwd`
docker network create dind
docker run -d --network dind -e DOCKER_TLS_CERTDIR="" --privileged --name dind docker:dind
sleep 20
docker run --network dind -v ${WORKING_DIRECTORY}:/home/circleci/workspace -w /home/circleci/workspace -e DOCKER_HOST="tcp://dind:2375" -e OCI_WRITER_KEY_PASSPHRASE=$OCI_WRITER_KEY_PASSPHRASE gebish/ci:v13 /bin/bash -c "Xvfb :99 -screen 1 1280x1024x16 -nolisten tcp > /dev/null 2>&1 & export DISPLAY=:99 ; GRADLE_OPTS=\"-Xmx1024m -XX:MaxMetaspaceSize=256m\" GRADLE_USER_HOME=\".gradle-home\" ./gradlew --no-daemon --max-workers 4 --parallel -Pci :doc:manual-snippets:check :doc:manual-snippets:fixtures:check :doc:manual-snippets:real-browser:check :doc:manual:build :doc:asciidoctor-extension:check"
Xvfb :99 -screen 1 1280x1024x16 -nolisten tcp > /dev/null 2>&1 &
export DISPLAY=:99
./gradlew --no-daemon --max-workers 4 --parallel -Pci :doc:manual-snippets:check :doc:manual-snippets:fixtures:check :doc:manual-snippets:real-browser:check :doc:manual:build :doc:asciidoctor-extension:check
- run: &collectTestResults
name: Copy all test results to a directory
when: always
Expand All @@ -61,23 +65,24 @@ jobs:
paths:
- .gradle-home
dockerised-cross-browser:
machine:
image: ubuntu-2204:2024.05.1
docker:
- image: gebish/ci:v13
environment:
GRADLE_OPTS: "-Xmx1024m -XX:MaxMetaspaceSize=256m"
GRADLE_USER_HOME: ".gradle-home"
resource_class: large
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- restore_cache:
keys:
- gradle-home-dockerised-crossbrowser-{{ .Branch }}
- gradle-home-dockerised-crossbrowser-master
- gradle-home-dockerised-crossbrowser
- run:
command: |
export WORKING_DIRECTORY=`pwd`
docker network create dind
docker run -d --network dind -e DOCKER_TLS_CERTDIR="" --privileged --name dind docker:dind
sleep 20
docker run --network dind -v ${WORKING_DIRECTORY}:/home/circleci/workspace -w /home/circleci/workspace -e DOCKER_HOST="tcp://dind:2375" -e OCI_WRITER_KEY_PASSPHRASE=$OCI_WRITER_KEY_PASSPHRASE gebish/ci:v13 /bin/bash -c "GRADLE_OPTS=\"-Xmx1024m -XX:MaxMetaspaceSize=256m\" GRADLE_USER_HOME=\".gradle-home\" ./gradlew --no-daemon --max-workers 4 --parallel -Pci allDockerisedCrossBrowserTests"
./gradlew --no-daemon --max-workers 4 --parallel -Pci allDockerisedCrossBrowserTests
- run: *collectTestResults
- store_test_results:
path: ~/test-results/
Expand Down

0 comments on commit bd4c683

Please sign in to comment.