QuestionValidator: Create
[akkoma] / .gitlab-ci.yml
index e4bd8d2824a821118569c39190cd9a548bceaf85..c9ab848926f21debe460cee18509380aefdc3ffb 100644 (file)
@@ -1,4 +1,4 @@
-image: elixir:1.8.1
+image: elixir:1.9.4
 
 variables: &global_variables
   POSTGRES_DB: pleroma_test
@@ -48,6 +48,7 @@ benchmark:
 
 unit-testing:
   stage: test
+  retry: 2
   cache: &testing_cache_policy
     <<: *global_cache_policy
     policy: pull
@@ -57,29 +58,29 @@ unit-testing:
     alias: postgres
     command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
   script:
+    - apt-get update && apt-get install -y libimage-exiftool-perl
     - mix deps.get
     - mix ecto.create
     - mix ecto.migrate
     - mix coveralls --preload-modules
 
-# Removed to fix CI issue. In this early state it wasn't adding much value anyway.
-# TODO Fix and reinstate federated testing
-# federated-testing:
-#   stage: test
-#   cache: *testing_cache_policy
-#   services:
-#   - name: minibikini/postgres-with-rum:12
-#     alias: postgres
-#     command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
-#   script:
-#     - mix deps.get
-#     - mix ecto.create
-#     - mix ecto.migrate
-#     - epmd -daemon
-#     - mix test --trace --only federated
+federated-testing:
+  stage: test
+  cache: *testing_cache_policy
+  services:
+  - name: minibikini/postgres-with-rum:12
+    alias: postgres
+    command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+  script:
+    - mix deps.get
+    - mix ecto.create
+    - mix ecto.migrate
+    - epmd -daemon
+    - mix test --trace --only federated
 
 unit-testing-rum:
   stage: test
+  retry: 2
   cache: *testing_cache_policy
   services:
   - name: minibikini/postgres-with-rum:12
@@ -89,6 +90,7 @@ unit-testing-rum:
     <<: *global_variables
     RUM_ENABLED: "true"
   script:
+    - apt-get update && apt-get install -y libimage-exiftool-perl
     - mix deps.get
     - mix ecto.create
     - mix ecto.migrate
@@ -168,8 +170,7 @@ stop_review_app:
 
 amd64:
   stage: release
-  # TODO: Replace with upstream image when 1.9.0 comes out
-  image: rinpatch/elixir:1.9.0-rc.0
+  image: elixir:1.10.3
   only: &release-only
   - stable@pleroma/pleroma
   - develop@pleroma/pleroma
@@ -206,8 +207,7 @@ amd64-musl:
   stage: release
   artifacts: *release-artifacts
   only: *release-only
-  # TODO: Replace with upstream image when 1.9.0 comes out
-  image: rinpatch/elixir:1.9.0-rc.0-alpine
+  image: elixir:1.10.3-alpine 
   cache: *release-cache
   variables: *release-variables
   before_script: &before-release-musl
@@ -223,8 +223,7 @@ arm:
   only: *release-only
   tags:
     - arm32
-  # TODO: Replace with upstream image when 1.9.0 comes out
-  image: rinpatch/elixir:1.9.0-rc.0-arm
+  image: elixir:1.10.3
   cache: *release-cache
   variables: *release-variables
   before_script: *before-release
@@ -236,8 +235,7 @@ arm-musl:
   only: *release-only
   tags:
     - arm32
-  # TODO: Replace with upstream image when 1.9.0 comes out
-  image: rinpatch/elixir:1.9.0-rc.0-arm-alpine
+  image: elixir:1.10.3-alpine
   cache: *release-cache
   variables: *release-variables
   before_script: *before-release-musl
@@ -249,8 +247,7 @@ arm64:
   only: *release-only
   tags:
     - arm
-  # TODO: Replace with upstream image when 1.9.0 comes out
-  image: rinpatch/elixir:1.9.0-rc.0-arm64
+  image: elixir:1.10.3
   cache: *release-cache
   variables: *release-variables
   before_script: *before-release
@@ -263,7 +260,7 @@ arm64-musl:
   tags:
     - arm
   # TODO: Replace with upstream image when 1.9.0 comes out
-  image: rinpatch/elixir:1.9.0-rc.0-arm64-alpine
+  image: elixir:1.10.3-alpine
   cache: *release-cache
   variables: *release-variables
   before_script: *before-release-musl
@@ -288,7 +285,7 @@ docker:
     - export CI_VCS_REF=$CI_COMMIT_SHORT_SHA
   allow_failure: true
   script:
-    - docker build --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
+    - docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST .
     - docker push $IMAGE_TAG
     - docker push $IMAGE_TAG_SLUG
     - docker push $IMAGE_TAG_LATEST
@@ -306,7 +303,7 @@ docker-stable:
   before_script: *before-docker
   allow_failure: true
   script:
-    - docker build --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
+    - docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t $IMAGE_TAG_SLUG -t $IMAGE_TAG_LATEST_STABLE .
     - docker push $IMAGE_TAG
     - docker push $IMAGE_TAG_SLUG
     - docker push $IMAGE_TAG_LATEST_STABLE
@@ -324,7 +321,7 @@ docker-release:
   before_script: *before-docker
   allow_failure: true
   script:
-    - docker build --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t       $IMAGE_TAG_SLUG .
+    - docker build --cache-from $IMAGE_TAG_SLUG --build-arg VCS_REF=$CI_VCS_REF --build-arg BUILD_DATE=$CI_JOB_TIMESTAMP -t $IMAGE_TAG -t       $IMAGE_TAG_SLUG .
     - docker push $IMAGE_TAG
     - docker push $IMAGE_TAG_SLUG
   tags: