4 POSTGRES_DB: pleroma_test
5 POSTGRES_USER: postgres
6 POSTGRES_PASSWORD: postgres
11 key: ${CI_COMMIT_REF_SLUG}
23 - mix local.hex --force
24 - mix local.rebar --force
40 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
45 - mix pleroma.load_testing
52 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
57 - mix coveralls --preload-modules
62 - name: minibikini/postgres-with-rum:12
64 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
70 - mix test --trace --only federated
75 - name: minibikini/postgres-with-rum:12
77 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
84 - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
85 - mix test --preload-modules
90 - mix format --check-formatted
96 - mix credo --strict --only=warnings,todo,fixme,consistency,readability
102 - stable@pleroma/pleroma
103 - develop@pleroma/pleroma
107 - curl -X POST -F"token=$DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" https://git.pleroma.social/api/v4/projects/673/trigger/pipeline
112 - apk update && apk add openssh-client git
115 name: review/$CI_COMMIT_REF_NAME
116 url: https://$CI_ENVIRONMENT_SLUG.pleroma.online/
117 on_stop: stop_review_app
124 - echo "$CI_ENVIRONMENT_SLUG"
126 - eval $(ssh-agent -s)
127 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
128 - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
129 - (ssh -t dokku@pleroma.online -- apps:create "$CI_ENVIRONMENT_SLUG") || true
130 - (ssh -t dokku@pleroma.online -- git:set "$CI_ENVIRONMENT_SLUG" keep-git-dir true) || true
131 - ssh -t dokku@pleroma.online -- config:set "$CI_ENVIRONMENT_SLUG" APP_NAME="$CI_ENVIRONMENT_SLUG" APP_HOST="$CI_ENVIRONMENT_SLUG.pleroma.online" MIX_ENV=dokku
132 - (ssh -t dokku@pleroma.online -- postgres:create $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db) || true
133 - (ssh -t dokku@pleroma.online -- postgres:link $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db "$CI_ENVIRONMENT_SLUG") || true
134 - (ssh -t dokku@pleroma.online -- certs:add "$CI_ENVIRONMENT_SLUG" /home/dokku/server.crt /home/dokku/server.key) || true
135 - git push -f dokku@pleroma.online:$CI_ENVIRONMENT_SLUG $CI_COMMIT_SHA:refs/heads/master
141 - apk update && apk add openssh-client git
144 name: review/$CI_COMMIT_REF_NAME
147 - echo "$CI_ENVIRONMENT_SLUG"
149 - eval $(ssh-agent -s)
150 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
151 - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
152 - ssh -t dokku@pleroma.online -- --force apps:destroy "$CI_ENVIRONMENT_SLUG"
153 - ssh -t dokku@pleroma.online -- --force postgres:destroy $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db
157 # TODO: Replace with upstream image when 1.9.0 comes out
158 image: rinpatch/elixir:1.9.0-rc.0
160 - stable@pleroma/pleroma
161 - develop@pleroma/pleroma
162 - /^maint/.*$/@pleroma/pleroma
163 - /^release/.*$/@pleroma/pleroma
164 artifacts: &release-artifacts
165 name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
168 # Ideally it would be never for master branch and with the next commit for develop,
169 # but Gitlab does not support neither `only` for artifacts
170 # nor setting it to never from .gitlab-ci.yml
171 # nor expiring with the next commit
174 cache: &release-cache
175 key: $CI_COMMIT_REF_NAME-$CI_JOB_NAME
178 variables: &release-variables
180 before_script: &before-release
181 - echo "import Mix.Config" > config/prod.secret.exs
182 - mix local.hex --force
183 - mix local.rebar --force
185 - mix deps.get --only prod
187 - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_REF_NAME
188 - mix release --path release
193 artifacts: *release-artifacts
195 # TODO: Replace with upstream image when 1.9.0 comes out
196 image: rinpatch/elixir:1.9.0-rc.0-alpine
197 cache: *release-cache
198 variables: *release-variables
199 before_script: &before-release-musl
200 - apk add git gcc g++ musl-dev make
201 - echo "import Mix.Config" > config/prod.secret.exs
202 - mix local.hex --force
203 - mix local.rebar --force
208 artifacts: *release-artifacts
212 # TODO: Replace with upstream image when 1.9.0 comes out
213 image: rinpatch/elixir:1.9.0-rc.0-arm
214 cache: *release-cache
215 variables: *release-variables
216 before_script: *before-release
221 artifacts: *release-artifacts
225 # TODO: Replace with upstream image when 1.9.0 comes out
226 image: rinpatch/elixir:1.9.0-rc.0-arm-alpine
227 cache: *release-cache
228 variables: *release-variables
229 before_script: *before-release-musl
234 artifacts: *release-artifacts
238 # TODO: Replace with upstream image when 1.9.0 comes out
239 image: rinpatch/elixir:1.9.0-rc.0-arm64
240 cache: *release-cache
241 variables: *release-variables
242 before_script: *before-release
247 artifacts: *release-artifacts
251 # TODO: Replace with upstream image when 1.9.0 comes out
252 image: rinpatch/elixir:1.9.0-rc.0-arm64-alpine
253 cache: *release-cache
254 variables: *release-variables
255 before_script: *before-release-musl