4 POSTGRES_DB: pleroma_test
5 POSTGRES_USER: postgres
6 POSTGRES_PASSWORD: postgres
11 key: ${CI_COMMIT_REF_SLUG}
22 - mix local.hex --force
23 - mix local.rebar --force
34 - name: lainsoykaf/postgres-with-rum
36 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
41 - mix coveralls --trace --preload-modules
46 - name: lainsoykaf/postgres-with-rum
48 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
55 - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
56 - mix test --trace --preload-modules
61 - mix format --check-formatted
67 - mix credo --strict --only=warnings,todo,fixme,consistency,readability
73 - stable@pleroma/pleroma
74 - develop@pleroma/pleroma
78 - 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
83 - apk update && apk add openssh-client git
86 name: review/$CI_COMMIT_REF_NAME
87 url: https://$CI_ENVIRONMENT_SLUG.pleroma.online/
88 on_stop: stop_review_app
95 - echo "$CI_ENVIRONMENT_SLUG"
97 - eval $(ssh-agent -s)
98 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
99 - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
100 - (ssh -t dokku@pleroma.online -- apps:create "$CI_ENVIRONMENT_SLUG") || true
101 - 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
102 - (ssh -t dokku@pleroma.online -- postgres:create $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db) || true
103 - (ssh -t dokku@pleroma.online -- postgres:link $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db "$CI_ENVIRONMENT_SLUG") || true
104 - (ssh -t dokku@pleroma.online -- certs:add "$CI_ENVIRONMENT_SLUG" /home/dokku/server.crt /home/dokku/server.key) || true
105 - git push -f dokku@pleroma.online:$CI_ENVIRONMENT_SLUG $CI_COMMIT_SHA:refs/heads/master
111 - apk update && apk add openssh-client git
114 name: review/$CI_COMMIT_REF_NAME
117 - echo "$CI_ENVIRONMENT_SLUG"
119 - eval $(ssh-agent -s)
120 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
121 - ssh-keyscan -H "pleroma.online" >> ~/.ssh/known_hosts
122 - ssh -t dokku@pleroma.online -- --force apps:destroy "$CI_ENVIRONMENT_SLUG"
123 - ssh -t dokku@pleroma.online -- --force postgres:destroy $(echo $CI_ENVIRONMENT_SLUG | sed -e 's/-/_/g')_db
127 # TODO: Replace with upstream image when 1.9.0 comes out
128 image: rinpatch/elixir:1.9.0-rc.0
130 - stable@pleroma/pleroma
131 - develop@pleroma/pleroma
132 - /^maint/.*$/@pleroma/pleroma
133 - /^release/.*$/@pleroma/pleroma
134 artifacts: &release-artifacts
135 name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
138 # Ideally it would be never for master branch and with the next commit for develop,
139 # but Gitlab does not support neither `only` for artifacts
140 # nor setting it to never from .gitlab-ci.yml
141 # nor expiring with the next commit
144 cache: &release-cache
145 key: $CI_COMMIT_REF_NAME-$CI_JOB_NAME
148 variables: &release-variables
150 before_script: &before-release
151 - echo "import Mix.Config" > config/prod.secret.exs
152 - mix local.hex --force
153 - mix local.rebar --force
155 - mix deps.get --only prod
157 - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_REF_NAME
158 - mix release --path release
163 artifacts: *release-artifacts
165 # TODO: Replace with upstream image when 1.9.0 comes out
166 image: rinpatch/elixir:1.9.0-rc.0-alpine
167 cache: *release-cache
168 variables: *release-variables
169 before_script: &before-release-musl
170 - apk add git gcc g++ musl-dev make
171 - echo "import Mix.Config" > config/prod.secret.exs
172 - mix local.hex --force
173 - mix local.rebar --force
178 artifacts: *release-artifacts
182 # TODO: Replace with upstream image when 1.9.0 comes out
183 image: rinpatch/elixir:1.9.0-rc.0-arm
184 cache: *release-cache
185 variables: *release-variables
186 before_script: *before-release
191 artifacts: *release-artifacts
195 # TODO: Replace with upstream image when 1.9.0 comes out
196 image: rinpatch/elixir:1.9.0-rc.0-arm-alpine
197 cache: *release-cache
198 variables: *release-variables
199 before_script: *before-release-musl
204 artifacts: *release-artifacts
208 # TODO: Replace with upstream image when 1.9.0 comes out
209 image: rinpatch/elixir:1.9.0-rc.0-arm64
210 cache: *release-cache
211 variables: *release-variables
212 before_script: *before-release
217 artifacts: *release-artifacts
221 # TODO: Replace with upstream image when 1.9.0 comes out
222 image: rinpatch/elixir:1.9.0-rc.0-arm64-alpine
223 cache: *release-cache
224 variables: *release-variables
225 before_script: *before-release-musl