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 - master@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 - master@pleroma/pleroma
131 - develop@pleroma/pleroma
132 - /^maint/.*$/@pleroma/pleroma
133 artifacts: &release-artifacts
134 name: "pleroma-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME"
137 # Ideally it would be never for master branch and with the next commit for develop,
138 # but Gitlab does not support neither `only` for artifacts
139 # nor setting it to never from .gitlab-ci.yml
140 # nor expiring with the next commit
143 cache: &release-cache
144 key: $CI_COMMIT_REF_NAME-$CI_JOB_NAME
147 variables: &release-variables
149 before_script: &before-release
150 - echo "import Mix.Config" > config/prod.secret.exs
151 - mix local.hex --force
152 - mix local.rebar --force
154 - mix deps.get --only prod
156 - export PLEROMA_BUILD_BRANCH=$CI_COMMIT_REF_NAME
157 - mix release --path release
162 artifacts: *release-artifacts
164 # TODO: Replace with upstream image when 1.9.0 comes out
165 image: rinpatch/elixir:1.9.0-rc.0-alpine
166 cache: *release-cache
167 variables: *release-variables
168 before_script: &before-release-musl
169 - apk add git gcc g++ musl-dev make
170 - echo "import Mix.Config" > config/prod.secret.exs
171 - mix local.hex --force
172 - mix local.rebar --force
177 artifacts: *release-artifacts
181 # TODO: Replace with upstream image when 1.9.0 comes out
182 image: rinpatch/elixir:1.9.0-rc.0-arm
183 cache: *release-cache
184 variables: *release-variables
185 before_script: *before-release
190 artifacts: *release-artifacts
194 # TODO: Replace with upstream image when 1.9.0 comes out
195 image: rinpatch/elixir:1.9.0-rc.0-arm-alpine
196 cache: *release-cache
197 variables: *release-variables
198 before_script: *before-release-musl
203 artifacts: *release-artifacts
207 # TODO: Replace with upstream image when 1.9.0 comes out
208 image: rinpatch/elixir:1.9.0-rc.0-arm64
209 cache: *release-cache
210 variables: *release-variables
211 before_script: *before-release
216 artifacts: *release-artifacts
220 # TODO: Replace with upstream image when 1.9.0 comes out
221 image: rinpatch/elixir:1.9.0-rc.0-arm64-alpine
222 cache: *release-cache
223 variables: *release-variables
224 before_script: *before-release-musl