mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Toolkit: add deprecation notice to toolkit/ci commands (#33664)
This commit is contained in:
parent
b1a8c67689
commit
36fc37fd0e
@ -15,7 +15,7 @@ import { closeMilestoneTask } from './tasks/closeMilestone';
|
||||
import { pluginDevTask } from './tasks/plugin.dev';
|
||||
import { githubPublishTask } from './tasks/plugin.utils';
|
||||
import { pluginUpdateTask } from './tasks/plugin.update';
|
||||
import { ciBuildPluginDocsTask, ciBuildPluginTask, ciPackagePluginTask, ciPluginReportTask } from './tasks/plugin.ci';
|
||||
import { ciBuildPluginTask, ciPackagePluginTask, ciPluginReportTask } from './tasks/plugin.ci';
|
||||
import { buildPackageTask } from './tasks/package.build';
|
||||
import { pluginCreateTask } from './tasks/plugin.create';
|
||||
import { pluginSignTask } from './tasks/plugin.sign';
|
||||
@ -210,7 +210,7 @@ export const run = (includeInternalScripts = false) => {
|
||||
.command('plugin:ci-build')
|
||||
.option('--finish', 'move all results to the jobs folder', false)
|
||||
.option('--maxJestWorkers <num>|<string>', 'Limit number of Jest workers spawned')
|
||||
.description('Build the plugin, leaving results in /dist and /coverage')
|
||||
.description('[deprecated] Build the plugin, leaving results in /dist and /coverage')
|
||||
.action(async (cmd) => {
|
||||
await execTask(ciBuildPluginTask)({
|
||||
finish: cmd.finish,
|
||||
@ -218,19 +218,12 @@ export const run = (includeInternalScripts = false) => {
|
||||
});
|
||||
});
|
||||
|
||||
program
|
||||
.command('plugin:ci-docs')
|
||||
.description('Build the HTML docs')
|
||||
.action(async (cmd) => {
|
||||
await execTask(ciBuildPluginDocsTask)({});
|
||||
});
|
||||
|
||||
program
|
||||
.command('plugin:ci-package')
|
||||
.option('--signatureType <type>', 'Signature Type')
|
||||
.option('--rootUrls <urls...>', 'Root URLs')
|
||||
.option('--signing-admin', 'Use the admin API endpoint for signing the manifest. (deprecated)', false)
|
||||
.description('Create a zip packages for the plugin')
|
||||
.description('[deprecated] Create a zip packages for the plugin')
|
||||
.action(async (cmd) => {
|
||||
await execTask(ciPackagePluginTask)({
|
||||
signatureType: cmd.signatureType,
|
||||
@ -240,7 +233,7 @@ export const run = (includeInternalScripts = false) => {
|
||||
|
||||
program
|
||||
.command('plugin:ci-report')
|
||||
.description('Build a report for this whole process')
|
||||
.description('[deprecated] Build a report for this whole process')
|
||||
.option('--upload', 'upload packages also')
|
||||
.action(async (cmd) => {
|
||||
await execTask(ciPluginReportTask)({
|
||||
|
@ -41,6 +41,10 @@ export interface PluginCIOptions {
|
||||
*
|
||||
* Anything that should be put into the final zip file should be put in:
|
||||
* ~/ci/jobs/build_xxx/dist
|
||||
*
|
||||
* @deprecated -- this task was written with a specific circle-ci build in mind. That system
|
||||
* has been replaced with Drone, and this is no longer the best practice. Any new work
|
||||
* should be defined in the grafana build pipeline tool or drone configs directly.
|
||||
*/
|
||||
const buildPluginRunner: TaskRunner<PluginCIOptions> = async ({ finish, maxJestWorkers }) => {
|
||||
const start = Date.now();
|
||||
@ -66,37 +70,6 @@ const buildPluginRunner: TaskRunner<PluginCIOptions> = async ({ finish, maxJestW
|
||||
|
||||
export const ciBuildPluginTask = new Task<PluginCIOptions>('Build Plugin', buildPluginRunner);
|
||||
|
||||
/**
|
||||
* 2. Build Docs
|
||||
*
|
||||
* Take /docs/* and format it into /ci/docs/HTML site
|
||||
*
|
||||
*/
|
||||
const buildPluginDocsRunner: TaskRunner<PluginCIOptions> = async () => {
|
||||
const docsSrc = path.resolve(process.cwd(), 'docs');
|
||||
if (!fs.existsSync(docsSrc)) {
|
||||
console.log('No docs src');
|
||||
return;
|
||||
}
|
||||
|
||||
const start = Date.now();
|
||||
const workDir = getJobFolder();
|
||||
await execa('rimraf', [workDir]);
|
||||
fs.mkdirSync(workDir);
|
||||
|
||||
const docsDest = path.resolve(process.cwd(), 'ci', 'docs');
|
||||
fs.mkdirSync(docsDest);
|
||||
|
||||
const exe = await execa('cp', ['-rv', docsSrc + '/.', docsDest]);
|
||||
console.log(exe.stdout);
|
||||
|
||||
fs.writeFileSync(path.resolve(docsDest, 'index.html'), `TODO... actually build docs`, { encoding: 'utf-8' });
|
||||
|
||||
writeJobStats(start, workDir);
|
||||
};
|
||||
|
||||
export const ciBuildPluginDocsTask = new Task<PluginCIOptions>('Build Plugin Docs', buildPluginDocsRunner);
|
||||
|
||||
/**
|
||||
* 2. Package
|
||||
*
|
||||
@ -104,6 +77,11 @@ export const ciBuildPluginDocsTask = new Task<PluginCIOptions>('Build Plugin Doc
|
||||
* 1. merge it into: `~/ci/dist`
|
||||
* 2. zip it into packages in `~/ci/packages`
|
||||
* 3. prepare grafana environment in: `~/ci/grafana-test-env`
|
||||
*
|
||||
*
|
||||
* @deprecated -- this task was written with a specific circle-ci build in mind. That system
|
||||
* has been replaced with Drone, and this is no longer the best practice. Any new work
|
||||
* should be defined in the grafana build pipeline tool or drone configs directly.
|
||||
*/
|
||||
const packagePluginRunner: TaskRunner<PluginCIOptions> = async ({ signatureType, rootUrls }) => {
|
||||
const start = Date.now();
|
||||
@ -224,6 +202,10 @@ export const ciPackagePluginTask = new Task<PluginCIOptions>('Bundle Plugin', pa
|
||||
* 4. Report
|
||||
*
|
||||
* Create a report from all the previous steps
|
||||
*
|
||||
* @deprecated -- this task was written with a specific circle-ci build in mind. That system
|
||||
* has been replaced with Drone, and this is no longer the best practice. Any new work
|
||||
* should be defined in the grafana build pipeline tool or drone configs directly.
|
||||
*/
|
||||
const pluginReportRunner: TaskRunner<PluginCIOptions> = async ({ upload }) => {
|
||||
const ciDir = path.resolve(process.cwd(), 'ci');
|
||||
|
Loading…
Reference in New Issue
Block a user