-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
132 lines (115 loc) · 3.93 KB
/
config.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
un-tagged-build:
#machine: true
docker: # run the steps with Docker
- image: buildpack-deps:bionic
steps:
- checkout
- run: git submodule update --init --recursive
# show current variables
- run: echo $CIRCLE_PROJECT_REPONAME
- run: echo $CIRCLE_BRANCH
- run: echo $CIRCLE_TAG
# Install dependences
- run: apt update && apt install -y libev-dev
# Make
- run: ./autogen.sh
- run: ./configure CPPFLAGS=-DNDEBUG && make
# Test
- run: make test
# # build the application image
# - run: docker build --no-cache -t $CIRCLE_PROJECT_REPONAME -f docker/Dockerfile .
#
# # Check created image
# - run: docker run -it --rm --name $CIRCLE_PROJECT_REPONAME $CIRCLE_PROJECT_REPONAME node . -?
#
# # This is place for run unit tests from docker container
tagged-build:
#machine: true
docker: # run the steps with Docker
- image: buildpack-deps:bionic
steps:
- checkout
- run: git submodule update --init --recursive
# show current variables
- run: echo $CIRCLE_PROJECT_REPONAME
- run: echo $CIRCLE_BRANCH
- run: echo $CIRCLE_TAG
# Install dependences
- run: apt update && apt install -y libev-dev
# Make
- run: ./autogen.sh
- run: ./configure CPPFLAGS=-DNDEBUG && make
# Test
- run: make test
# Build DEB package and upload it to repository
- run: ci-build/make_package deb
# # build the application image
# - run: docker build --no-cache -t $CIRCLE_PROJECT_REPONAME -f docker/Dockerfile .
#
# # Check created image
# - run: docker run -it --rm --name $CIRCLE_PROJECT_REPONAME $CIRCLE_PROJECT_REPONAME node . -?
#
# # deploy the image
# - run: docker tag $CIRCLE_PROJECT_REPONAME gitlab.ksproject.org:5000/teonet/wg/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
# - run: docker push gitlab.ksproject.org:5000/teonet/wg/$CIRCLE_PROJECT_REPONAME:$CIRCLE_TAG
# #
# - run: docker tag $CIRCLE_PROJECT_REPONAME gitlab.ksproject.org:5000/teonet/wg/$CIRCLE_PROJECT_REPONAME:latest
# - run: docker push gitlab.ksproject.org:5000/teonet/wg/$CIRCLE_PROJECT_REPONAME:latest
testing: # runs not using Workflows must have a `build` job as entry point
working_directory: ~/mern-starter # directory where steps will run
docker: # run the steps with Docker
- image: circleci/node # ...with this image as the primary container; this is where all `steps` will run
steps: # a collection of executable commands
- run: echo Run tests of $CIRCLE_PROJECT_REPONAME project
# - checkout # special step to check out source code to working directory
# - run:
# name: update-npm
# command: 'sudo npm install -g npm@latest'
# - restore_cache: # special step to restore the dependency cache
# key: dependency-cache-{{ checksum "package.json" }}
# - run:
# name: install-npm-wee
# command: npm install
# - save_cache: # special step to save the dependency cache
# key: dependency-cache-{{ checksum "package.json" }}
# paths:
# - ./node_modules
# - run: # run tests
# name: test
# command: npm test
workflows:
version: 2
un-tagged:
jobs:
- testing:
filters:
tags:
ignore: /^v.*/
- un-tagged-build:
requires:
- testing
filters:
tags:
ignore: /^v.*/
tagged:
jobs:
- testing:
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- tagged-build:
requires:
- testing
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/