1
0
Fork 0
onnx-web/.gitlab-ci.yml

85 lines
1.6 KiB
YAML
Raw Normal View History

2023-01-05 19:12:36 +00:00
stages:
- build
- package
.build-base:
tags:
- platform:k8s
- runner:shared
.build-node:
extends:
- .build-base
image: docker.io/node:18
artifacts:
expire_in: 1 day
paths:
- gui/out/
reports:
coverage_report:
coverage_format: cobertura
path: gui/out/coverage/cobertura-coverage.xml
junit: gui/out/test-results.xml
cache:
key:
files:
- yarn.lock
paths:
- gui/node_modules/
policy: pull-push
.build-dind:
extends:
- .build-base
image: docker.io/docker:20.10
services:
- docker.io/docker:20.10-dind
2023-01-05 19:12:36 +00:00
allow_failure: false
before_script:
- mkdir ${HOME}/.docker
- echo "${DOCKER_SECRET}" | base64 -d > ${HOME}/.docker/config.json
after_script:
- rm -rfv ${HOME}/.docker
variables:
DOCKER_CERT_PATH: "/shared/docker/client"
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2376
DOCKER_NAME: "${CI_PROJECT_PATH}"
DOCKER_TLS_CERTDIR: "/shared/docker"
DOCKER_TLS_VERIFY: 1
IMAGE_FILE: Containerfile
IMAGE_ROOT: "${CI_PROJECT_DIR}"
VERSION_TAG: "${CI_COMMIT_REF_SLUG}"
build-gui-js:
2023-01-05 19:12:36 +00:00
extends:
- .build-node
stage: build
script:
- cd gui
- make ci
package-gui-oci:
2023-01-05 19:12:36 +00:00
extends:
- .build-dind
stage: package
needs:
- build-gui-js
2023-01-05 19:12:36 +00:00
script:
- cd gui
2023-01-05 19:12:36 +00:00
- ${CI_PROJECT_DIR}/scripts/image-build.sh --push
variables:
IMAGE_SUFFIX: gui
2023-01-05 19:12:36 +00:00
package-gui-npm:
2023-01-05 19:12:36 +00:00
extends:
- .build-node
stage: package
needs:
- build-gui-js
2023-01-05 19:12:36 +00:00
only:
- tags
script:
- cd gui
2023-01-05 19:12:36 +00:00
- npm publish