Use extends instead of anchors in gitlab-ci.yml
This commit is contained in:
parent
e8a69cb498
commit
f970a9a536
@ -9,7 +9,8 @@ stages:
|
|||||||
- push
|
- push
|
||||||
- versioning
|
- versioning
|
||||||
|
|
||||||
.docker-image: &docker-image
|
.docker-image:
|
||||||
|
stage: push
|
||||||
image: docker:19.03.5
|
image: docker:19.03.5
|
||||||
services:
|
services:
|
||||||
- docker:19.03.5-dind
|
- docker:19.03.5-dind
|
||||||
@ -21,7 +22,8 @@ version_scheduled_job:
|
|||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
|
|
||||||
.prepare_nix: &prepare_nix
|
.nix:
|
||||||
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
- nix
|
- nix
|
||||||
before_script:
|
before_script:
|
||||||
@ -30,8 +32,7 @@ version_scheduled_job:
|
|||||||
|
|
||||||
# The binary produced is useless by itself
|
# The binary produced is useless by itself
|
||||||
binary:
|
binary:
|
||||||
stage: build
|
extends: .nix
|
||||||
<<: *prepare_nix
|
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- dev
|
- dev
|
||||||
@ -40,8 +41,7 @@ binary:
|
|||||||
- nix-build nix -A ligo-bin
|
- nix-build nix -A ligo-bin
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
stage: build
|
extends: .nix
|
||||||
<<: *prepare_nix
|
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- dev
|
- dev
|
||||||
@ -54,8 +54,7 @@ doc:
|
|||||||
- doc
|
- doc
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: build
|
extends: .nix
|
||||||
<<: *prepare_nix
|
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- dev
|
- dev
|
||||||
@ -69,8 +68,7 @@ test:
|
|||||||
|
|
||||||
# FIXME For some reason, e2e tests can't build on CI.
|
# FIXME For some reason, e2e tests can't build on CI.
|
||||||
.webide-e2e:
|
.webide-e2e:
|
||||||
stage: build
|
extends: .nix
|
||||||
<<: *prepare_nix
|
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- tools/webide/**
|
- tools/webide/**
|
||||||
@ -81,12 +79,11 @@ test:
|
|||||||
- nix-build nix -A ligo-editor.e2e
|
- nix-build nix -A ligo-editor.e2e
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
stage: build
|
extends: .nix
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- dev
|
- dev
|
||||||
- /^.*-run-dev$/
|
- /^.*-run-dev$/
|
||||||
<<: *prepare_nix
|
|
||||||
script:
|
script:
|
||||||
- nix-build nix -A ligo-docker
|
- nix-build nix -A ligo-docker
|
||||||
- cp -L result ligo.tar.gz
|
- cp -L result ligo.tar.gz
|
||||||
@ -95,8 +92,7 @@ docker:
|
|||||||
- ligo.tar.gz
|
- ligo.tar.gz
|
||||||
|
|
||||||
docker-push:
|
docker-push:
|
||||||
stage: push
|
extends: .docker-image
|
||||||
<<: *docker-image
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- docker
|
- docker
|
||||||
needs:
|
needs:
|
||||||
@ -113,12 +109,11 @@ docker-push:
|
|||||||
- docker push "${LIGO_REGISTRY_FULL_NAME}"
|
- docker push "${LIGO_REGISTRY_FULL_NAME}"
|
||||||
|
|
||||||
webide-docker:
|
webide-docker:
|
||||||
stage: build
|
extends: .nix
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- dev
|
- dev
|
||||||
- /^.*-run-dev$/
|
- /^.*-run-dev$/
|
||||||
<<: *prepare_nix
|
|
||||||
script:
|
script:
|
||||||
- nix-build nix -A ligo-editor-docker
|
- nix-build nix -A ligo-editor-docker
|
||||||
- cp -L result webide.tar.gz
|
- cp -L result webide.tar.gz
|
||||||
@ -128,8 +123,7 @@ webide-docker:
|
|||||||
|
|
||||||
|
|
||||||
webide-push:
|
webide-push:
|
||||||
stage: push
|
extends: .docker-image
|
||||||
<<: *docker-image
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- webide-docker
|
- webide-docker
|
||||||
needs:
|
needs:
|
||||||
@ -145,8 +139,7 @@ webide-push:
|
|||||||
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
||||||
|
|
||||||
static-binary:
|
static-binary:
|
||||||
stage: build
|
extends: .nix
|
||||||
<<: *prepare_nix
|
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- dev
|
- dev
|
||||||
@ -161,9 +154,8 @@ static-binary:
|
|||||||
paths:
|
paths:
|
||||||
- ligo
|
- ligo
|
||||||
|
|
||||||
.website: &website
|
.website:
|
||||||
stage: build
|
extends: .nix
|
||||||
<<: *prepare_nix
|
|
||||||
script:
|
script:
|
||||||
- nix-build nix -A ligo-website
|
- nix-build nix -A ligo-website
|
||||||
- cp -Lr --no-preserve=mode,ownership,timestamps result/ public
|
- cp -Lr --no-preserve=mode,ownership,timestamps result/ public
|
||||||
@ -172,15 +164,13 @@ static-binary:
|
|||||||
- public
|
- public
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: build
|
extends: .website
|
||||||
<<: *website
|
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_REF_NAME == "dev" && $CI_PROJECT_PATH == "ligolang/ligo"'
|
- if: '$CI_COMMIT_REF_NAME == "dev" && $CI_PROJECT_PATH == "ligolang/ligo"'
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
pages-attempt:
|
pages-attempt:
|
||||||
stage: build
|
extends: .website
|
||||||
<<: *website
|
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- /^.*-run-dev$/
|
- /^.*-run-dev$/
|
||||||
|
Loading…
Reference in New Issue
Block a user