Merge branch 'ci-tests' into 'master'
feat: Test new caching config See merge request mythic-insight/legendary-doc-site!1
This commit is contained in:
commit
a4f0a27aa0
1 changed files with 24 additions and 8 deletions
|
@ -3,14 +3,6 @@ stages:
|
||||||
- deploy_tags
|
- deploy_tags
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
cache:
|
|
||||||
key: dependencies
|
|
||||||
paths:
|
|
||||||
- _build/
|
|
||||||
- deps/
|
|
||||||
- node_modules/
|
|
||||||
- apps/app/assets/node_modules/
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
POSTGRES_PASSWORD: "postgres"
|
POSTGRES_PASSWORD: "postgres"
|
||||||
POSTGRES_USER: "postgres"
|
POSTGRES_USER: "postgres"
|
||||||
|
@ -26,6 +18,13 @@ test:
|
||||||
image: "elixir:1.10"
|
image: "elixir:1.10"
|
||||||
services:
|
services:
|
||||||
- name: postgres:12
|
- name: postgres:12
|
||||||
|
cache:
|
||||||
|
key:
|
||||||
|
files:
|
||||||
|
- mix.lock
|
||||||
|
paths:
|
||||||
|
- _build/
|
||||||
|
- deps/
|
||||||
script: script/cibuild
|
script: script/cibuild
|
||||||
|
|
||||||
build_image_for_commit:
|
build_image_for_commit:
|
||||||
|
@ -36,6 +35,15 @@ build_image_for_commit:
|
||||||
- master
|
- master
|
||||||
services:
|
services:
|
||||||
- name: docker:19.03.12-dind
|
- name: docker:19.03.12-dind
|
||||||
|
cache:
|
||||||
|
key:
|
||||||
|
files:
|
||||||
|
- mix.lock
|
||||||
|
- apps/app/assets/package-lock.json
|
||||||
|
paths:
|
||||||
|
- _build/
|
||||||
|
- deps/
|
||||||
|
- apps/app/assets/node_modules/
|
||||||
script:
|
script:
|
||||||
- docker login "https://${CI_REGISTRY}" -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
- docker login "https://${CI_REGISTRY}" -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||||
|
@ -48,6 +56,12 @@ deploy_to_tags:
|
||||||
image: "node:15.0"
|
image: "node:15.0"
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
cache:
|
||||||
|
key:
|
||||||
|
files:
|
||||||
|
- package-lock.json
|
||||||
|
paths:
|
||||||
|
- node_modules/
|
||||||
script:
|
script:
|
||||||
- npm install
|
- npm install
|
||||||
- npx semantic-release --repository-url=$CI_REPOSITORY_URL
|
- npx semantic-release --repository-url=$CI_REPOSITORY_URL
|
||||||
|
@ -67,6 +81,8 @@ deploy_commit_image_to_tag:
|
||||||
image: "docker:19.03.12"
|
image: "docker:19.03.12"
|
||||||
services:
|
services:
|
||||||
- name: docker:19.03.12-dind
|
- name: docker:19.03.12-dind
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none # this job does not need the project files, only docker
|
||||||
script:
|
script:
|
||||||
- echo "BUILD_VERSION is ${BUILD_VERSION}"
|
- echo "BUILD_VERSION is ${BUILD_VERSION}"
|
||||||
- docker login "https://${CI_REGISTRY}" -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
- docker login "https://${CI_REGISTRY}" -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||||
|
|
Loading…
Reference in a new issue