diff --git a/packages/config/.eslintrc b/packages/config/.eslintrc index 78ee62445..37fdd0772 100644 --- a/packages/config/.eslintrc +++ b/packages/config/.eslintrc @@ -1,6 +1,6 @@ { "extends": ["../../.eslintrc.js"], - "ignorePatterns": ["!**/*"], + "ignorePatterns": ["!**/*", "**/*.yaml"], "rules": { "@typescript-eslint/no-var-requires": "off" } diff --git a/packages/config/src/lib/config.test.js b/packages/config/src/lib/config.test.js index a1dac7b76..e1f45476b 100644 --- a/packages/config/src/lib/config.test.js +++ b/packages/config/src/lib/config.test.js @@ -1,6 +1,6 @@ import config from './createConfig'; -const configBuilder = (c) => config({ rootFolder: '', ...c }); +const configBuilder = (c) => config({ rootFolder: '', frontendCRDPath: './crd-mock.yaml', ...c }); describe('should create dummy config with no options', () => { const { mode, optimization, entry, output, devServer } = config({ diff --git a/packages/config/src/lib/crd-mock.yaml b/packages/config/src/lib/crd-mock.yaml new file mode 100644 index 000000000..a86c4f4ca --- /dev/null +++ b/packages/config/src/lib/crd-mock.yaml @@ -0,0 +1,32 @@ + +apiVersion: v1 +kind: Template +metadata: + name: mock-frontend +objects: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + metadata: + name: mock-frontend + spec: + API: + versions: + - v1 + envName: ${ENV_NAME} + title: Mock app + deploymentRepo: https://github.com/RedHatInsights/mock + frontend: + paths: + - /apps/mock-app + image: ${IMAGE}:${IMAGE_TAG} + module: + manifestLocation: '/apps/mock/fed-mods.json' + modules: [] + +parameters: + - name: ENV_NAME + required: true + - name: IMAGE_TAG + required: true + - name: IMAGE + value: quay.io/cloudservices/foo