summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2021-03-02 19:54:30 +0000
committerlain <lain@soykaf.club>2021-03-02 19:54:30 +0000
commitb221d77a6da07c684bdbc63ddf4500e0d7ffeae8 (patch)
tree0015c7c3ea57f7340fbf80fd230a5f5e1c548148 /.gitlab-ci.yml
parentc2186a62d54043ea9638d33f80c7576aba9783e8 (diff)
parent0a589c887bd4215e7d443a34c194fd0a3bde8f72 (diff)
Merge branch 'release/2.3.0' into 'stable'
Release/2.3.0 See merge request pleroma/pleroma!3354
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml61
1 files changed, 52 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fac675e85..c7e8291d8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,6 +34,14 @@ build:
- mix deps.get
- mix compile --force
+spec-build:
+ stage: test
+ artifacts:
+ paths:
+ - spec.json
+ script:
+ - mix pleroma.openapi_spec spec.json
+
benchmark:
stage: benchmark
when: manual
@@ -57,7 +65,7 @@ unit-testing:
policy: pull
services:
- - name: postgres:9.6
+ - name: postgres:13
alias: postgres
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
script:
@@ -155,6 +163,20 @@ review_app:
- (ssh -t dokku@pleroma.online -- certs:add "$CI_ENVIRONMENT_SLUG" /home/dokku/server.crt /home/dokku/server.key) || true
- git push -f dokku@pleroma.online:$CI_ENVIRONMENT_SLUG $CI_COMMIT_SHA:refs/heads/master
+spec-deploy:
+ stage: deploy
+ artifacts:
+ paths:
+ - spec.json
+ only:
+ - develop@pleroma/pleroma
+ image: alpine:latest
+ before_script:
+ - apk add curl
+ script:
+ - curl -X POST -F"token=$API_DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" -F"variables[JOB_REF]=$CI_JOB_ID" https://git.pleroma.social/api/v4/projects/1130/trigger/pipeline
+
+
stop_review_app:
image: alpine:3.9
stage: deploy
@@ -181,7 +203,6 @@ amd64:
- develop@pleroma/pleroma
- /^maint/.*$/@pleroma/pleroma
- /^release/.*$/@pleroma/pleroma
- - /^build-release/.*$/@pleroma/pleroma
artifacts: &release-artifacts
name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
paths:
@@ -229,8 +250,8 @@ arm:
artifacts: *release-artifacts
only: *release-only
tags:
- - arm32
- image: elixir:1.10.3
+ - arm32-specified
+ image: arm32v7/elixir:1.10.3
cache: *release-cache
variables: *release-variables
before_script: *before-release
@@ -241,8 +262,8 @@ arm-musl:
artifacts: *release-artifacts
only: *release-only
tags:
- - arm32
- image: elixir:1.10.3-alpine
+ - arm32-specified
+ image: arm32v7/elixir:1.10.3-alpine
cache: *release-cache
variables: *release-variables
before_script: *before-release-musl
@@ -254,7 +275,7 @@ arm64:
only: *release-only
tags:
- arm
- image: elixir:1.10.3
+ image: arm64v8/elixir:1.10.3
cache: *release-cache
variables: *release-variables
before_script: *before-release
@@ -266,8 +287,7 @@ arm64-musl:
only: *release-only
tags:
- arm
- # TODO: Replace with upstream image when 1.9.0 comes out
- image: elixir:1.10.3-alpine
+ image: arm64v8/elixir:1.10.3-alpine
cache: *release-cache
variables: *release-variables
before_script: *before-release-musl
@@ -351,3 +371,26 @@ docker-release:
- dind
only:
- /^release/.*$/@pleroma/pleroma
+
+docker-adhoc:
+ stage: docker
+ image: docker:latest
+ cache: {}
+ dependencies: []
+ variables: *docker-variables
+ before_script: *before-docker
+ allow_failure: true
+ script:
+ script:
+ - mkdir -p /root/.docker/cli-plugins
+ - wget "${DOCKER_BUILDX_URL}" -O ~/.docker/cli-plugins/docker-buildx
+ - echo "${DOCKER_BUILDX_HASH} /root/.docker/cli-plugins/docker-buildx" | sha1sum -c
+ - chmod +x ~/.docker/cli-plugins/docker-buildx
+ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
+ - docker buildx create --name mbuilder --driver docker-container --use
+ - docker buildx inspect --bootstrap
+ - docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --push --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 .
+ tags:
+ - dind
+ only:
+ - /^build-docker/.*$/@pleroma/pleroma \ No newline at end of file