conf.js 3.5 KB
Newer Older
B
bryk 已提交
1
// Copyright 2015 Google Inc. All Rights Reserved.
2 3 4 5 6
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
B
bryk 已提交
7
//     http://www.apache.org/licenses/LICENSE-2.0
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Common configuration constants used in other build/test files.
 */
import path from 'path';

/**
 * Base path for all other paths.
 */
const basePath = path.join(__dirname, '../');

/**
 * Exported configuration object with common constants used in build pipeline.
27
 */
28
export default {
29 30 31 32 33 34 35 36
  /**
   * Backend application constants.
   */
  backend: {
    /**
     * The name of the backend binary.
     */
    binaryName: 'dashboard',
B
bryk 已提交
37 38 39
    /**
     * Name of the main backend package that is used in go build command.
     */
40
    packageName: 'github.com/kubernetes/dashboard',
41
    /**
42
     * Port number of the backend server. Only used during development.
43
     */
44 45 46 47
    devServerPort: 9091,
    /**
    * Address for the Kubernetes API server.
    */
48
    apiServerHost: 'localhost:8080',
49 50 51 52
    /**
     * Address for the Heapster API server.
     */
    heapsterServerHost: 'localhost:8082',
53 54
  },

55 56 57 58 59 60
  /**
   * Deployment constants configuration.
   */
  deploy: {
    /**
     * The name of the Docker image with the application.
61
     */
62
    imageName: 'kubernetes/dashboard',
63 64
  },

65 66 67 68
  /**
   * Frontend application constants.
   */
  frontend: {
69 70 71 72
    /**
    * Port number to access the dashboard UI
    */
    serverPort: 9090,
73 74 75
    /**
     * The name of the root Angular module, i.e., the module that bootstraps the application.
     */
76
    rootModuleName: 'kubernetesDashboard',
77 78
  },

79 80 81 82 83 84 85
  /**
   * Absolute paths to known directories, e.g., to source directory.
   */
  paths: {
    app: path.join(basePath, 'src/app'),
    assets: path.join(basePath, 'src/app/assets'),
    base: basePath,
86
    backendSrc: path.join(basePath, 'src/app/backend'),
B
bryk 已提交
87
    backendTest: path.join(basePath, 'src/test/backend'),
88
    backendTmp: path.join(basePath, '.tmp/backend'),
89
    backendTmpSrc: path.join(basePath, '.tmp/backend/src/github.com/kubernetes/dashboard'),
90 91
    bowerComponents: path.join(basePath, 'bower_components'),
    build: path.join(basePath, 'build'),
B
bryk 已提交
92
    coverage: path.join(basePath, 'coverage'),
S
Sebastian Florek 已提交
93
    coverageReport: path.join(basePath, 'coverage/lcov'),
94
    deploySrc: path.join(basePath, 'src/app/deploy'),
95
    dist: path.join(basePath, 'dist'),
96
    distPublic: path.join(basePath, 'dist/public'),
B
bryk 已提交
97
    externs: path.join(basePath, 'src/app/externs'),
98 99
    frontendSrc: path.join(basePath, 'src/app/frontend'),
    frontendTest: path.join(basePath, 'src/test/frontend'),
100
    goTools: path.join(basePath, '.tools/go'),
101
    goWorkspace: path.join(basePath, '.go_workspace'),
102
    hyperkube: path.join(basePath, 'build/hyperkube.sh'),
103 104
    integrationTest: path.join(basePath, 'src/test/integration'),
    karmaConf: path.join(basePath, 'build/karma.conf.js'),
B
bryk 已提交
105
    nodeModules: path.join(basePath, 'node_modules'),
106
    partials: path.join(basePath, '.tmp/partials'),
B
bryk 已提交
107
    prodTmp: path.join(basePath, '.tmp/prod'),
108 109 110
    protractorConf: path.join(basePath, 'build/protractor.conf.js'),
    serve: path.join(basePath, '.tmp/serve'),
    src: path.join(basePath, 'src'),
111
    tmp: path.join(basePath, '.tmp'),
B
bryk 已提交
112
  },
113
};