Skip to content

Commit

Permalink
chore: add api gov job (#524)
Browse files Browse the repository at this point in the history
* chore: add api gov job

* chore: target specs

* chore: add docker login

* chore: remove layer cache

* chore: move to own job

* chore: adjust it

* chore: change to token

* chore: remove cp

* chore: fix linebreak

* chore: fix copy into docker

* chore: add checkout

* chore: update spec

* chore: ignore internal functions
  • Loading branch information
Caele committed Oct 30, 2020
1 parent ee191cc commit c7529f5
Show file tree
Hide file tree
Showing 7 changed files with 941 additions and 1,012 deletions.
34 changes: 32 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ aliases:
jobs:
build:
docker:
- image: circleci/node:10.19.0
- image: circleci/node:12.15.0
- image: qlikcore/engine:12.792.0
command: |
-S AcceptEULA=yes
Expand All @@ -38,7 +38,6 @@ jobs:

steps:
- checkout

# start the SSE plugin as early as possible so that the engine
# image has enough time to connect to it before tests are run
- run:
Expand Down Expand Up @@ -116,3 +115,34 @@ jobs:
path: generated/barchart/screenshots
- store_artifacts:
path: test/mashup/__artifacts__
api-governance:
machine: true
working_directory: ~/project
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Login for Docker
command: echo $DOCKER_TOKEN | docker login -u "$DOCKER_USER" --password-stdin
- run:
name: API Governance Compliance
command: |
docker pull qlik/asmquery
docker create -v /specs --name specs alpine:3.4 /bin/true
docker cp ./apis/stardust/api-spec/spec.json specs:/specs
docker run --volumes-from specs -e target=Colony -e runMode=failBuild -e apiId=abdc47c2-921a-45d3-ba5c-80d448574c5b -e specPath='/specs/spec.json' -e commit="$CIRCLE_SHA1" qlik/asmquery
workflows:
version: 2
build-deploy:
jobs:
- build:
filters:
tags:
only:
- /v.*/
- api-governance:
filters:
tags:
only:
- /v.*/
81 changes: 34 additions & 47 deletions apis/stardust/api-spec/spec.conf.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,41 @@
module.exports = {
fromJsdoc: {
glob: [
'!*.spec.js',
'../nucleus/src/**/*.js',
'../nucleus/src/**/*.jsx',
'../supernova/src/**/*.js',
'../locale/src/translator.js',
'../theme/src/**/*.js',
],
api: {
stability: 'stable',
glob: [
'!*.spec.js',
'../nucleus/src/**/*.js',
'../nucleus/src/**/*.jsx',
'../supernova/src/**/*.js',
'../locale/src/translator.js',
'../theme/src/**/*.js',
],
api: {
stability: 'stable',
},
output: {
sort: {
alpha: false,
},
output: {
sort: {
alpha: false,
file: './api-spec/spec.json',
},
parse: {
types: {
'qae.NxAppLayout': {},
'enigma.GenericObject': {},
'enigma.Global': {},
'enigma.Doc': {
url: 'https://github.com/qlik-oss/enigma.js/blob/master/docs/api.md#generated-api',
},
file: './api-spec/spec.json',
},
parse: {
types: {
'qae.NxAppLayout': {},
'enigma.GenericObject': {},
'enigma.Global': {},
'enigma.Doc': {
url: 'https://github.com/qlik-oss/enigma.js/blob/master/docs/api.md#generated-api',
},
'qae.GenericObjectLayout': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#genericobjectlayout',
},
'qae.GenericObjectProperties': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#genericobjectproperties',
},
'qae.NxDimension': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#nxdimension',
},
'qae.NxMeasure': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#nxmeasure',
},
'qae.GenericObjectLayout': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#genericobjectlayout',
},
'qae.GenericObjectProperties': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#genericobjectproperties',
},
'qae.NxDimension': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#nxdimension',
},
'qae.NxMeasure': {
url: 'https://core.qlik.com/services/qix-engine/apis/qix/definitions/#nxmeasure',
},
},
},
toMd: {
output: '../../docs/stardust-api.md',
type(e) {
if (e.indexOf('qae.') === 0) {
return {
url: `https://core.qlik.com/services/qix-engine/apis/qix/definitions/#${e.substr(4).toLowerCase()}`,
};
}
return undefined;
},
},
};
Loading

0 comments on commit c7529f5

Please sign in to comment.