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
35 - master@pleroma/pleroma
36 - develop@pleroma/pleroma
39 PLEROMA_BUILD_ENV: prod
53 - name: lainsoykaf/postgres-with-rum
55 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
60 - mix pleroma.load_testing
65 - name: lainsoykaf/postgres-with-rum
67 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
72 - mix coveralls --trace --preload-modules
77 - name: lainsoykaf/postgres-with-rum
79 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
86 - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
87 - mix test --trace --preload-modules
92 - mix format --check-formatted
98 - mix credo --strict --only=warnings,todo,fixme,consistency,readability
104 - stable@pleroma/pleroma
105 - develop@pleroma/pleroma
109 - 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
114 - apk update && apk add openssh-client git
117 name: review/$CI_COMMIT_REF_NAME
118 url: https://$CI_ENVIRONMENT_SLUG.pleroma.online/
119 on_stop: stop_review_app
126 - echo "$CI_ENVIRONMENT_SLUG"
128 - eval $(ssh-agent -s)
129 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
130 - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
131 - (ssh -t dokku@pleroma.online -- apps:create "$CI_ENVIRONMENT_SLUG") || true
132 - 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
133 - (ssh -t dokku@pleroma.online -- postgres:create $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db) || true
134 - (ssh -t dokku@pleroma.online -- postgres:link $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db "$CI_ENVIRONMENT_SLUG") || true
135 - (ssh -t dokku@pleroma.online -- certs:add "$CI_ENVIRONMENT_SLUG" /home/dokku/server.crt /home/dokku/server.key) || true
136 - git push -f dokku@pleroma.online:$CI_ENVIRONMENT_SLUG $CI_COMMIT_SHA:refs/heads/master
142 - apk update && apk add openssh-client git
145 name: review/$CI_COMMIT_REF_NAME
148 - echo "$CI_ENVIRONMENT_SLUG"
150 - eval $(ssh-agent -s)
151 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
152 - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
153 - ssh -t dokku@pleroma.online -- --force apps:destroy "$CI_ENVIRONMENT_SLUG"
154 - ssh -t dokku@pleroma.online -- --force postgres:destroy $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db
158 # TODO: Replace with upstream image when 1.9.0 comes out
159 image: rinpatch/elixir:1.9.0-rc.0
161 - stable@pleroma/pleroma
162 - develop@pleroma/pleroma
163 - /^maint/.*$/@pleroma/pleroma
164 - /^release/.*$/@pleroma/pleroma
165 artifacts: &release-artifacts
166 name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
169 # Ideally it would be never for master branch and with the next commit for develop,
170 # but Gitlab does not support neither `only` for artifacts
171 # nor setting it to never from .gitlab-ci.yml
172 # nor expiring with the next commit
175 cache: &release-cache
176 key: $CI_COMMIT_REF_NAME-$CI_JOB_NAME
179 variables: &release-variables
181 before_script: &before-release
182 - echo "import Mix.Config" > config/prod.secret.exs
183 - mix local.hex --force
184 - mix local.rebar --force
186 - mix deps.get --only prod
188 - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_REF_NAME
189 - mix release --path release
194 artifacts: *release-artifacts
196 # TODO: Replace with upstream image when 1.9.0 comes out
197 image: rinpatch/elixir:1.9.0-rc.0-alpine
198 cache: *release-cache
199 variables: *release-variables
200 before_script: &before-release-musl
201 - apk add git gcc g++ musl-dev make
202 - echo "import Mix.Config" > config/prod.secret.exs
203 - mix local.hex --force
204 - mix local.rebar --force
209 artifacts: *release-artifacts
213 # TODO: Replace with upstream image when 1.9.0 comes out
214 image: rinpatch/elixir:1.9.0-rc.0-arm
215 cache: *release-cache
216 variables: *release-variables
217 before_script: *before-release
222 artifacts: *release-artifacts
226 # TODO: Replace with upstream image when 1.9.0 comes out
227 image: rinpatch/elixir:1.9.0-rc.0-arm-alpine
228 cache: *release-cache
229 variables: *release-variables
230 before_script: *before-release-musl
235 artifacts: *release-artifacts
239 # TODO: Replace with upstream image when 1.9.0 comes out
240 image: rinpatch/elixir:1.9.0-rc.0-arm64
241 cache: *release-cache
242 variables: *release-variables
243 before_script: *before-release
248 artifacts: *release-artifacts
252 # TODO: Replace with upstream image when 1.9.0 comes out
253 image: rinpatch/elixir:1.9.0-rc.0-arm64-alpine
254 cache: *release-cache
255 variables: *release-variables
256 before_script: *before-release-musl