-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
44 lines (39 loc) · 1.01 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# _ __ ___ ___ __ _ _ __ __ _
# | '_ \ / _ \/ __|/ _` | '_ \ / _` |
# | | | | (_) \__ \ (_| | | | | (_| |
# |_| |_|\___/|___/\__,_|_| |_|\__,_|
include:
- project: nosana-ci/tools/cicd/gitlab-ci
file: docker-container.yml
variables:
DOCKERFILE_DIR: .
CONTAINER_PLATFORMS: linux/amd64
REG_REPOSITORY: nosana/nosana-cli
npm prettier:
image: node:20.11.1
stage: test
script:
- npm ci
- npm run prettier # todo: fix eslint
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
npm test:
image: node:20.11.1
stage: test
script:
- npm ci
- npm run test:coverage
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
npm publish:
image: node:20.11.1
stage: deploy
script:
- sed -i "s/0.0.0/${CI_COMMIT_TAG:1}/" package.json
- npm ci
- npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- npm run publish:public
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_TAG != "latest"