File tree Expand file tree Collapse file tree
circle_template/_circleci Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ module . exports = {
2+ GITLAB_CI : 'gitlab_ci' ,
3+ AZURE_PIPELINES : 'azure_pipelines' ,
4+ CIRCLE_CI : 'circle_ci' ,
5+ } ;
Original file line number Diff line number Diff line change 1+ version : 2.1
2+ jobs :
3+ build :
4+ docker :
5+ - image : node
6+ steps :
7+ - checkout
8+ - run :
9+ name : Install
10+ command : |
11+ yarn
12+ - run :
13+ name : Lint
14+ command : |
15+ yarn lint
16+ - run :
17+ name : Test
18+ command : |
19+ yarn test:unit
20+ - run :
21+ name : Build
22+ command : |
23+ yarn build
24+ - store_artifacts :
25+ path : dist/
Original file line number Diff line number Diff line change 1+ const AGENTS = require ( '../agents.const' ) ;
2+
13module . exports = ( api , options , rootOptions ) => {
2- if ( options . agent === 'gitlab' ) {
4+ if ( options . agent === AGENTS . GITLAB_CI ) {
35 api . render ( './gitlab_template' )
46 }
57
6- if ( options . agent === 'azure' ) {
7- api . render ( './azure_template' , {
8- appName : rootOptions . projectName . replace ( ' ' , '' )
9- } )
8+ if ( options . agent === AGENTS . AZURE_PIPELINES ) {
9+ api . render ( './azure_template' )
10+ }
11+
12+ if ( options . agent === AGENTS . CIRCLE_CI ) {
13+ api . render ( './circle_template' )
1014 }
11- }
15+ } ;
Original file line number Diff line number Diff line change 1- module . exports = ( api ) => { }
1+ module . exports = ( api ) => { } ;
Original file line number Diff line number Diff line change 1+ const AGENTS = require ( './agents.const' ) ;
2+
13module . exports = [
24 {
35 type : 'list' ,
46 name : 'agent' ,
57 message : 'Which agent for your CI?' ,
68 choices : [
7- { name : 'GitLab' , value : 'gitlab' } ,
8- { name : 'Azure DevOps' , value : 'azure' }
9+ { name : 'GitLab' , value : AGENTS . GITLAB_CI } ,
10+ { name : 'Azure DevOps' , value : AGENTS . AZURE_PIPELINES } ,
11+ { name : 'CircleCI' , value : AGENTS . CIRCLE_CI }
912 ] ,
1013 } ,
11- ]
14+ ] ;
You can’t perform that action at this time.
0 commit comments