X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=.gitlab-ci.yml;h=2bc5719718d80d141536e14d7a5d9b32e17e457e;hb=e2a3365b5ce86293a5fed28c06b2e7d9dd97c9d1;hp=fac675e85d73a03ad17ec36fcfa4e8a9a4dbfc3b;hpb=6e7963cca1afbd0cc32dd9910f617b1b3b648a5b;p=akkoma diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fac675e85..2bc571971 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,15 +25,23 @@ before_script: - apt-get update && apt-get install -y cmake - mix local.hex --force - mix local.rebar --force + - mix deps.get - apt-get -qq update - apt-get install -y libmagic-dev build: stage: build script: - - 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 @@ -44,7 +52,6 @@ benchmark: 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 - mix pleroma.load_testing @@ -57,12 +64,11 @@ 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: - apt-get update && apt-get install -y libimage-exiftool-perl ffmpeg - - mix deps.get - mix ecto.create - mix ecto.migrate - mix coveralls --preload-modules @@ -96,7 +102,6 @@ unit-testing-rum: RUM_ENABLED: "true" script: - apt-get update && apt-get install -y libimage-exiftool-perl ffmpeg - - mix deps.get - mix ecto.create - mix ecto.migrate - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" @@ -112,7 +117,6 @@ analysis: stage: test cache: *testing_cache_policy script: - - mix deps.get - mix credo --strict --only=warnings,todo,fixme,consistency,readability docs-deploy: @@ -155,6 +159,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 +199,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 +246,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 +258,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 +271,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 +283,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 +367,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