Merge branch 'master' into eide/discord-links-readme

This commit is contained in:
Marcus Eide
2020-03-12 13:27:32 +01:00
committed by GitHub
5 changed files with 27 additions and 15 deletions
+5 -5
View File
@@ -13,15 +13,15 @@ The philosophy behind Backstage is simple: Don't expose your engineers to the fu
## Project roadmap
Backstage has been in production for over 4 years inside Spotify. But the Open Source version is still in an early stage. We are envisioning three phases of the project and we are committed to deliver on all of them:
We created Backstage about 4 years ago. While our internal version of Backstage has had the benefit of time to mature and evolve, the first iteration of our open source version is still nascent. We are envisioning three phases of the project and we have already begun work on various aspects of these phases:
- **Phase 1: Extensible frontend platform** (now) - Backstage helps you get started building a single consistent UI layer for your internal infrastructure. Creating a Plugin is super simple.
- **Phase 1:** Extensible frontend platform (now) - You will be able to easily create a single consistent UI layer for your internal infrastructure and tools. A set of reusable UX patterns and components help ensure a consistent experience between tools.
- **Phase 2: Manage your software inventory** (next 2-3 months) - A central _software inventory_ with clear ownership and the ability to easily create and manage software at scale. Regardless if your developers want to create a new library, see their service's deployment status in Kubernetes or the test coverage for a website -- Backstage provides all of those tools - and many more - in a _single_ developer portal.
- **Phase 2:** Manage your software inventory (next 2-3 months) - A central software inventory with clear ownership and the ability to easily create and manage software at scale. Regardless of whether you want to create a new library, view service deployment status in Kubernetes, or check the test coverage for a website -- Backstage will provide all of those tools - and many more - in a single developer portal.
- **Phase 3: Ecosystem** (later) - Everyone's infrastructure stack is different. By fostering a vibrant community of contributors we hope to provide an ecosystem of Open Source plugins/integrations that allows you to pick the tools that match your stack.
- **Phase 3:** Ecosystem (later) - Everyone's infrastructure stack is different. By fostering a vibrant community of contributors we hope to provide an ecosystem of Open Source plugins/integrations that allows you to pick the tools that match your stack.
The ultimate goal of Backstage is to become the trusted standard toolbox (read: UI layer) for the Open Source infrastructure landscape. We realize this is an ambitious goal. We cant do it alone. If this sounds interesting or you'd like to help us shape our product vision, we'd love to talk. You can email me directly: [alund@spotify.com](mailto:alund@spotify.com).
Our vision for Backstage is for it to become the trusted standard toolbox (read: UI layer) for the open source infrastructure landscape. We realize this is an ambitious goal. We cant do it alone. If this sounds interesting or you'd like to help us shape our product vision, we'd love to talk. You can email me directly: [alund@spotify.com](mailto:alund@spotify.com).
## Overview
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 KiB

After

Width:  |  Height:  |  Size: 1012 KiB

+11 -4
View File
@@ -42,13 +42,15 @@ describe('createPlugin', () => {
it('should generate a valid output with inserted values', () => {
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'test-'));
try {
const sourceData = '{"name": "@spotify-backstage/{{id}}"}';
const targetData = '{"name": "@spotify-backstage/foo"}';
const sourceData =
'{"name": "@spotify-backstage/{{id}}", "version": "{{version}}"}';
const targetData =
'{"name": "@spotify-backstage/foo", "version": "0.0.0"}';
const sourcePath = path.join(tempDir, 'in.hbs');
const targetPath = path.join(tempDir, 'out.json');
fs.writeFileSync(sourcePath, sourceData);
createFileFromTemplate(sourcePath, targetPath, { id: 'foo' });
createFileFromTemplate(sourcePath, targetPath, { id: 'foo' }, '0.0.0');
expect(fs.existsSync(targetPath)).toBe(true);
expect(fs.readFileSync(targetPath).toString()).toBe(targetData);
@@ -77,7 +79,12 @@ describe('createPlugin', () => {
'test.txt',
);
try {
await createFromTemplateDir(templateRootDir, destinationRootDir, {});
await createFromTemplateDir(
templateRootDir,
destinationRootDir,
{},
'0.0.0',
);
expect(fs.existsSync(subDir)).toBe(true);
expect(fs.existsSync(testFile)).toBe(true);
} finally {
+9 -4
View File
@@ -58,11 +58,13 @@ export const createFileFromTemplate = (
source: string,
destination: string,
answers: Answers,
version: string,
) => {
const template = fs.readFileSync(source);
const compiled = handlebars.compile(template.toString());
const contents = compiled({
name: path.basename(destination),
version,
...answers,
});
try {
@@ -102,12 +104,12 @@ const addExportStatement = (file: string, exportStatement: string) => {
export const addPluginDependencyToApp = (
rootDir: string,
pluginName: string,
version: string,
) => {
console.log();
console.log(chalk.green(' Adding plugin as dependency in app:'));
const pluginPackage = `@spotify-backstage/plugin-${pluginName}`;
const pluginPackageVersion = '0.0.0';
const packageFile = path.join(rootDir, 'packages', 'app', 'package.json');
process.stdout.write(
@@ -127,7 +129,7 @@ export const addPluginDependencyToApp = (
);
}
dependencies[pluginPackage] = pluginPackageVersion;
dependencies[pluginPackage] = `^${version}`;
packageFileJson.dependencies = sortObjectByKeys(dependencies);
fs.writeFileSync(
packageFile,
@@ -183,6 +185,7 @@ export const createFromTemplateDir = async (
templateFolder: string,
destinationFolder: string,
answers: Answers,
version: string,
) => {
console.log();
console.log(chalk.green(' Reading template files:'));
@@ -219,6 +222,7 @@ export const createFromTemplateDir = async (
file,
file.replace(templateFolder, destinationFolder).replace(/\.hbs$/, ''),
answers,
version,
);
} else {
try {
@@ -324,6 +328,7 @@ const createPlugin = async () => {
const templateFolder = resolvePath(cliPackage, 'templates', 'default-plugin');
const tempDir = path.join(os.tmpdir(), answers.id);
const pluginDir = path.join(rootDir, 'plugins', answers.id);
const version = require(resolvePath(cliPackage, 'package.json')).version;
console.log();
console.log(chalk.green('Creating the plugin...'));
@@ -331,12 +336,12 @@ const createPlugin = async () => {
try {
checkExists(rootDir, answers.id);
createTemporaryPluginFolder(tempDir);
await createFromTemplateDir(templateFolder, tempDir, answers);
await createFromTemplateDir(templateFolder, tempDir, answers, version);
movePlugin(tempDir, pluginDir, answers.id);
await buildPlugin(pluginDir);
if (existsSync(appPackage)) {
addPluginDependencyToApp(rootDir, answers.id);
addPluginDependencyToApp(rootDir, answers.id, version);
addPluginToApp(rootDir, answers.id);
}
@@ -1,6 +1,6 @@
{
"name": "@spotify-backstage/plugin-{{id}}",
"version": "0.0.0",
"version": "{{version}}",
"main": "dist/cjs/index.js",
"types": "dist/cjs/index.d.ts",
"license": "Apache-2.0",
@@ -11,7 +11,7 @@
"test": "backstage-cli plugin:test"
},
"devDependencies": {
"@spotify-backstage/cli": "^1.2.0"
"@spotify-backstage/cli": "^{{version}}"
},
"dependencies": {
"@material-ui/lab": "4.0.0-alpha.45"