Skip to content
Snippets Groups Projects
Commit b93c6985 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

initial commit

parents
Branches
No related tags found
No related merge requests found
Showing
with 1072 additions and 0 deletions
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/build/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/public/
/coverage/
/node_modules/
/reports/
/.tmpl/
include:
# Angular template
- project: 'to-be-continuous/angular'
ref: '1.2.0'
file: '/templates/gitlab-ci-angular.yml'
# S3 template
- project: 'to-be-continuous/s3'
ref: '1.2.0'
file: '/templates/gitlab-ci-s3.yml'
variables:
# deploy: landing page (static/), mkdocs build (public/), Angular build (kicker/dist/) and aggregated kicker (kicker-aggregated/)
S3_DEPLOY_FILES: "dist/kicker/"
S3_STAGING_DISABLED: "true"
S3_PROD_DISABLED: "true"
stages:
- build
- test
- deploy
- publish
- production
# override Angular build job to run build only
ng-build:
script:
# build production artifact
- ng $NG_BUILD_ARGS --no-progress
# publish on GitLab pages: only on master
pages:
stage: deploy
script:
- cp -rf dist/kicker public
# generate build.info
- echo -e "Build date= $(date)\nGit Commit Ref= $CI_COMMIT_REF_NAME\nGit Commit SHA= $CI_COMMIT_SHA\n" > public/build.info
artifacts:
name: "kicker app from $CI_COMMIT_REF_SLUG"
paths:
- public
expire_in: 1 day
only:
- master
## Describe the bug
(Describe the problem clearly and concisely.)
## Expected behavior
(Describe the expected behavior clearly and concisely.)
## Actual behavior
(Describe the actual behavior clearly and concisely.)
## Logs and/or screenshots
(Join any relevant logs and/or screenshot. Please use code blocks (```) to format console output, logs, and code.)
## Context & Configuration
Link to a project, pipeline or job facing the bug: (please provide one if possible)
The issue was reproduced using:
* Version of the template: (type in the version)
* GitLab server(s): (Was it gitlab.com? A self-managed server? Which version? CE / EE? Which license?)
* GitLab runner(s): (type in any relevant information about the GitLab runner(s) you used)
Here is the `.gitlab-ci.yml` file:
```yaml
# Add your .gitlab-ci.yml here, if applicable and useful.
```
(If useful, list configured GitLab CI project and/or group variables.)
Configured GitLab CI project or group variables:
* `VARIABLE_1`
* `VARIABLE_2`
* ...
(Finally add any possible additional useful context info here.)
/label ~"kind/bug" ~"status/needs-investigation"
## Description
(Describe the feature clearly and concisely.)
## Implementation ideas
(If you have any implementation ideas, they can go here.)
(Any design change proposal could be also discussed on the _to be continuous_ Google Group: https://groups.google.com/g/tbc-dev.)
/label ~"kind/enhancement" ~"status/needs-investigation"
## Presentation
(Necessarily link to an issue. If it doesn't exist, please create one.)
Fixes #999
## Checklist
* Documented:
* [ ] `README.md` reflects any job, variable or whichever visible change
* [ ] `kicker.json` reflects any job, variable or whichever visible change
* Tested & examplified:
* [ ] (url to a project sample successfully proving the merge request fixes the issue)
/label ~"kind/fix"
## Presentation
(Necessarily link to an issue. If it doesn't exist, please create one.)
Closes #999
## Checklist
* General:
* [ ] use [rules](https://docs.gitlab.com/ee/ci/yaml/#rules) instead of [only/except](https://docs.gitlab.com/ee/ci/yaml/#onlyexcept-advanced)
* [ ] optimized [cache](https://docs.gitlab.com/ee/ci/caching/) configuration (wherever applicable)
* Publicly usable:
* [ ] untagged runners
* [ ] no proxy configuration but support `http_proxy`/`https_proxy`/`no_proxy`
* [ ] no custom CA certificate(s) but supports `$CUSTOM_CA_CERTS` or `$DEFAULT_CA_CERTS` to declare custom CA certificate(s)
* [ ] internet hostnames/urls only
* Used Docker images:
* [ ] **public** images
* [ ] **official** images (when possible)
* [ ] `latest` tag (when possible)
* Documented:
* [ ] `README.md` documents the new feature
* [ ] `kicker.json` describes the new feature
* Tested & examplified:
* [ ] (url to a project sample successfully using the new feature)
/label ~"kind/enhancement"
# Contributors guide
**Want to contribute? Great!**
We try to make it easy, and all contributions, even the smaller ones, are more than welcome.
This includes bug reports, fixes, documentation, examples...
But first, read this page (including the small print at the end).
## Legal
All original contributions to _to be continuous_ are licensed under the
[GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.html),
version 3.0 or later.
All contributions are subject to the [Developer Certificate of Origin](https://developercertificate.org/) (DCO).
The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project.
The DCO text is also included verbatim in the [DCO.txt](DCO.txt) file in the root directory of the repository.
Contributors **must** _sign-off_ that they adhere to these requirements by adding a `Signed-off-by` line to commit messages, as shown below:
```text
This is the commit message
Signed-off-by: John Dev <john.dev@developer.example.org>
```
Git has a handy [`-s` command line option](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) to append this automatically to your commit message:
```bash
$ git commit -s -m 'This is the commit message'
```
## Reporting an issue
This project uses GitLab issues to manage the issues.
Before creating an issue:
1. upgrade your project to the latest released template version, and check whether your bug is still present,
2. have a look in the opened issues if your problem is already known/tracked, and possibly contribute to the thread with your own information.
If none of the above was met, open an issue directly in GitLab, select the appropriate issue template and fill-in each section when applicable.
## Submitting a code change
### Git Setup
Before contributing, make sure you have set up your Git authorship correctly:
```bash
git config --global user.name "Your Full Name"
git config --global user.email your.email@example.com
```
### Workflow
All submissions, including submissions by project members, need to be reviewed before being merged.
To contribute:
1. Create an issue describing the bug or enhancement you want to propose (select the right issue template).
2. Make sure the issue has been reviewed and agreed.
3. Create a Merge Request, from your **own** fork (see [forking workflow](https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html) documentation).
Don't hesitate to mark your MR as `Draft` as long as you think it's not ready to be reviewed.
### Git Commit Conventions
In addition to being signed-off according the [Developer Certificate of Origin](https://developercertificate.org/) (see above),
Git commits in _to be continuous_ shall be:
1. **atomic** (1 commit `=` 1 and only 1 _thing_),
2. **semantic** (using [semantic-release commit message syntax](https://semantic-release.gitbook.io/semantic-release/#commit-message-format)).
You'll find extensive information about Git commit conventions on the [reference documentation website](https://to-be-continuous.gitlab.io/doc/dev/workflow/#git-commit-guidelines).
### Coding Guidelines
The extensive _to be continuous_ coding guidelines can be found on the [reference documentation website](https://to-be-continuous.gitlab.io/doc/dev/guidelines/).
DCO.txt 0 → 100644
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
\ No newline at end of file
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
\ No newline at end of file
# Kicker
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.4.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"kicker": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/kicker",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/boosted/dist/css/orangeHelvetica.css",
"node_modules/boosted/dist/css/boosted.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "kicker:build"
},
"configurations": {
"production": {
"browserTarget": "kicker:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "kicker:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "kicker:serve"
},
"configurations": {
"production": {
"devServerTarget": "kicker:serve:production"
}
}
}
}
}
},
"defaultProject": "kicker"
}
\ No newline at end of file
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
\ No newline at end of file
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
\ No newline at end of file
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('kicker app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-junit-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/kicker'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
junitReporter: {
outputDir: require('path').resolve('reports'),
outputFile: 'junit_test_report.xml',
useBrowserName: false,
}
});
};
{
"$id": "https://gitlab.com/to-be-continuous/kicker/raw/master/kicker-extras-schema-1.json",
"$schema": "http://json-schema.org/schema#",
"title": "Extra templates stuff",
"oneOf": [{"$ref": "#/definitions/root"}],
"definitions": {
"root": {
"type": "object",
"properties": {
"variants": {
"description": "Declared template variants",
"type": "array",
"items": { "$ref": "#/definitions/variant" }
},
"presets": {
"description": "Declared variables presets",
"type": "array",
"items": { "$ref": "#/definitions/preset" }
}
}
},
"preset": {
"description": "Declares a bunch of predefined variables values related to some tool/environment/configuration",
"type": "object",
"required": ["name", "description", "values"],
"properties": {
"name": {
"type": "string",
"description": "The preset display name"
},
"description": {
"type": "string",
"description": "The preset description (plain text only)"
},
"values": {
"description": "The variable values associated to this preset",
"type": "object",
"additionalProperties": {
"type" : "string"
}
}
}
},
"variant": {
"description": "Declares a variant of the template it is declared into",
"type": "object",
"required": ["id" ,"name", "description", "template_path"],
"properties": {
"id": {
"type": "string",
"description": "The variant id (internal)"
},
"name": {
"type": "string",
"description": "The variant display name"
},
"description": {
"type": "string",
"description": "The variant description (plain text or Markdown)"
},
"template_path": {
"description": "The path of the variant template file in the template repository",
"type": "string"
},
"target_project": {
"type": "string",
"description": "The target (template) project path this variant applies to"
},
"variables": {
"description": "The variant overridden global variables",
"type": "array",
"items": { "$ref": "#/definitions/variable" }
},
"features": {
"description": "The variant overridden features",
"type": "array",
"items": { "$ref": "#/definitions/feature" }
}
}
},
"variable": {
"description": "Declares a GitLab CI variable related to template configuration",
"type": "object",
"required": [ "name" ],
"properties": {
"name": {
"type": "string",
"description": "The variable name"
},
"description": {
"type": "string",
"description": "The variable description (plain text or Markdown)"
},
"type": {
"description": "The variable type (default is 'text')",
"type": "string",
"default": "text",
"enum": [ "text", "url", "boolean", "enum", "number"]
},
"values": {
"description": "The different variable values (for an 'enum' type only)",
"type": "array",
"items": {
"type": "string"
}
},
"default": {
"description": "The variable default value",
"type": "string"
},
"advanced": {
"description": "Whether the variable is advanced usage (default is 'false')",
"default": false,
"type": "boolean"
},
"secret": {
"description": "Whether the variable is a secret that shall be stored in the project CI/CD variables (default is 'false')",
"default": false,
"type": "boolean"
},
"mandatory": {
"description": "Whether setting the variable is mandatory to use the template or the feature",
"default": false,
"type": "boolean"
}
}
},
"feature": {
"description": "Declares a template sub feature",
"type": "object",
"required": [
"id",
"name",
"description"
],
"properties": {
"id": {
"type": "string",
"description": "The feature id (internal)"
},
"name": {
"type": "string",
"description": "The feature display name"
},
"description": {
"type": "string",
"description": "The feature description (plain text or Markdown)"
},
"enable_with": {
"type": "string",
"description": "The name of the variable that has to be set to enable the feature (means the feature is disabled by default)"
},
"disable_with": {
"type": "string",
"description": "The name of the variable that has to be set to enable the feature (means the feature is enabled by default)"
},
"variables": {
"description": "The feature variables",
"type": "array",
"items": { "$ref": "#/definitions/variable" }
}
}
}
}
}
{
"$id": "https://gitlab.com/to-be-continuous/kicker/raw/master/kicker-schema-1.json",
"$schema": "http://json-schema.org/schema#",
"title": "Template parameters and features",
"oneOf": [{"$ref": "#/definitions/template"}],
"definitions": {
"template_variant": {
"type": "object",
"required": ["id" ,"name", "description", "template_path"],
"properties": {
"id": {
"type": "string",
"description": "The variant id (internal)."
},
"name": {
"type": "string",
"description": "The variant display name."
},
"description": {
"type": "string",
"description": "The variant description (plain text or Markdown)."
},
"template_path": {
"description": "The path of the variant template file in the template repository.",
"type": "string"
},
"variables": {
"description": "The variant overridden global variables.",
"type": "array",
"items": { "$ref": "#/definitions/variable" }
},
"features": {
"description": "The variant overridden features.",
"type": "array",
"items": { "$ref": "#/definitions/feature" }
}
}
},
"template": {
"type": "object",
"required": ["name", "description", "template_path"],
"properties": {
"name": {
"type": "string",
"description": "The template display name."
},
"description": {
"type": "string",
"description": "The template description (plain text or Markdown)."
},
"template_path": {
"description": "The path of the template file in the template repository.",
"type": "string"
},
"kind": {
"description": "The template kind ('build', 'hosting', 'package', 'analyse' or else).",
"type": "string"
},
"variables": {
"description": "The template global variables.",
"type": "array",
"items": { "$ref": "#/definitions/variable" }
},
"features": {
"description": "The template features.",
"type": "array",
"items": { "$ref": "#/definitions/feature" }
},
"variants": {
"description": "Template variants.",
"type": "array",
"items": { "$ref": "#/definitions/template_variant" }
}
}
},
"variable": {
"type": "object",
"required": [ "name" ],
"properties": {
"name": {
"type": "string",
"description": "The variable name."
},
"description": {
"type": "string",
"description": "The variable description (plain text or Markdown)."
},
"type": {
"description": "The variable type (default is 'text').",
"type": "string",
"default": "text",
"enum": [ "text", "url", "boolean", "enum", "number"]
},
"values": {
"description": "The different variable values (for an 'enum' type only).",
"type": "array",
"items": {
"type": "string"
}
},
"default": {
"description": "The variable default value.",
"type": "string"
},
"advanced": {
"description": "Whether the variable is advanced usage (default is 'false').",
"default": false,
"type": "boolean"
},
"secret": {
"description": "Whether the variable is a secret that shall be stored in the project CI/CD variables (default is 'false').",
"default": false,
"type": "boolean"
},
"mandatory": {
"description": "Whether setting the variable is mandatory to use the template or the feature.",
"default": false,
"type": "boolean"
}
}
},
"feature": {
"type": "object",
"required": [
"id",
"name",
"description"
],
"properties": {
"id": {
"type": "string",
"description": "The feature id (internal)."
},
"name": {
"type": "string",
"description": "The feature display name."
},
"description": {
"type": "string",
"description": "The feature description (plain text or Markdown)."
},
"enable_with": {
"type": "string",
"description": "The name of the variable that has to be set to enable the feature (means the feature is disabled by default)."
},
"disable_with": {
"type": "string",
"description": "The name of the variable that has to be set to enable the feature (means the feature is enabled by default)."
},
"variables": {
"description": "The feature variables.",
"type": "array",
"items": { "$ref": "#/definitions/variable" }
}
}
}
}
}
logo.png 0 → 100644
logo.png

9.16 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment