CI: template for change policies based on build stage
This commit is contained in:
parent
e574408b33
commit
6e158bba2c
1 changed files with 7 additions and 31 deletions
|
@ -34,7 +34,7 @@ after_script:
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: &build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
- ".gitlab-ci.yml"
|
||||||
- "**/*.ex"
|
- "**/*.ex"
|
||||||
- "**/*.exs"
|
- "**/*.exs"
|
||||||
|
@ -72,11 +72,7 @@ benchmark:
|
||||||
unit-testing:
|
unit-testing:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: &testing_cache_policy
|
cache: &testing_cache_policy
|
||||||
<<: *global_cache_policy
|
<<: *global_cache_policy
|
||||||
policy: pull
|
policy: pull
|
||||||
|
@ -95,11 +91,7 @@ unit-testing-erratic:
|
||||||
retry: 2
|
retry: 2
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: &testing_cache_policy
|
cache: &testing_cache_policy
|
||||||
<<: *global_cache_policy
|
<<: *global_cache_policy
|
||||||
policy: pull
|
policy: pull
|
||||||
|
@ -132,11 +124,7 @@ unit-testing-erratic:
|
||||||
unit-testing-rum:
|
unit-testing-rum:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: *testing_cache_policy
|
cache: *testing_cache_policy
|
||||||
services:
|
services:
|
||||||
- name: minibikini/postgres-with-rum:12
|
- name: minibikini/postgres-with-rum:12
|
||||||
|
@ -155,11 +143,7 @@ lint:
|
||||||
image: elixir:1.12-alpine
|
image: elixir:1.12-alpine
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: *testing_cache_policy
|
cache: *testing_cache_policy
|
||||||
before_script:
|
before_script:
|
||||||
- apk update
|
- apk update
|
||||||
|
@ -173,11 +157,7 @@ lint:
|
||||||
analysis:
|
analysis:
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: *testing_cache_policy
|
cache: *testing_cache_policy
|
||||||
script:
|
script:
|
||||||
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
|
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
|
||||||
|
@ -186,11 +166,7 @@ cycles:
|
||||||
stage: test
|
stage: test
|
||||||
image: elixir:1.11-alpine
|
image: elixir:1.11-alpine
|
||||||
only:
|
only:
|
||||||
changes:
|
changes: *build_changes_policy
|
||||||
- ".gitlab-ci.yml"
|
|
||||||
- "**/*.ex"
|
|
||||||
- "**/*.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
cache: {}
|
cache: {}
|
||||||
before_script:
|
before_script:
|
||||||
- apk update
|
- apk update
|
||||||
|
|
Loading…
Reference in a new issue