diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..84f7adb5282c2b2cd15be06ca0765ac902a9b814
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,21 @@
+image: maven:3.8.6-openjdk-11
+stages:
+  - build
+  - test
+
+variables:
+  MAVEN_CLI_OPTS: "-s ci_settings.xml --batch-mode"
+
+build:
+  stage: build
+  script:
+    - './mvnw $MAVEN_CLI_OPTS compile'
+  tags:
+    - vips-docker
+
+test:
+  stage: test
+  script:
+    - './mvnw $MAVEN_CLI_OPTS test'
+  tags:
+    - vips-docker
\ No newline at end of file
diff --git a/ci_settings.xml b/ci_settings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..da49fc0ffec4b5da556e6482d8f903129998bd81
--- /dev/null
+++ b/ci_settings.xml
@@ -0,0 +1,16 @@
+<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
+    <servers>
+        <server>
+            <id>gitlab-maven</id>
+            <configuration>
+                <httpHeaders>
+                    <property>
+                        <name>Job-Token</name>
+                        <value>${CI_JOB_TOKEN}</value>
+                    </property>
+                </httpHeaders>
+            </configuration>
+        </server>
+    </servers>
+</settings>
\ No newline at end of file