Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
1d7605c
Add lighthouse
sblausten Mar 17, 2022
9c1c1e7
test relative docs
sblausten Mar 28, 2022
9c45b46
Add more docs examples
sblausten Mar 28, 2022
8d6bb2d
Fix index
sblausten Mar 28, 2022
45816ce
test
sblausten Mar 28, 2022
40363c9
test
sblausten Mar 28, 2022
828f230
test
sblausten Mar 28, 2022
a4f44f3
Mermaid
sblausten Mar 29, 2022
a5e7eda
Remove big toc
sblausten Mar 29, 2022
16fc935
darkmode on
sblausten Mar 29, 2022
68409a2
darkmode on
sblausten Mar 29, 2022
5658408
darkmode on
sblausten Mar 29, 2022
5e0c2aa
darkmode on
sblausten Mar 29, 2022
043f8b2
white background
sblausten Mar 29, 2022
5076091
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
bc707e8
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
d71fcf9
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
fc25cff
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
561d1ac
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
dc66082
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
da58d48
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
558ffd9
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
e0668b3
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
57d37d5
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
6ba7f80
Delete big-table-of-contents.md
sblausten Mar 29, 2022
feed43c
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
6f700f3
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
9019c08
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
543b59a
Update mermaid-diagram-test1.md
sblausten Mar 29, 2022
c772d8a
Update catalog-info.yaml
sblausten Mar 31, 2022
884d9a6
Update catalog-info.yaml
sblausten Mar 31, 2022
98edb06
Update catalog-info.yaml
sblausten Mar 31, 2022
b71ce5c
add tags
sblausten Apr 1, 2022
0f05a0e
Update catalog-info-1.yaml
sblausten Apr 1, 2022
c7eec7b
Update catalog-info-4.yaml
sblausten Apr 1, 2022
eaaeb2b
Set up CI with Azure Pipelines
sblausten Apr 4, 2022
995441d
test-azure devops
sblausten Apr 4, 2022
a9645b4
Update catalog-info.yaml
sblausten Apr 5, 2022
73828b8
Update catalog-info.yaml
sblausten Apr 5, 2022
7ab5187
Update catalog-info.yaml
sblausten Apr 5, 2022
d5d9f2d
Update catalog-info.yaml
sblausten Apr 5, 2022
8beb4b7
Update catalog-info.yaml
sblausten Apr 5, 2022
3a5ebde
Update catalog-info.yaml
sblausten Apr 5, 2022
095da0f
Update catalog-info.yaml
sblausten Apr 5, 2022
da26088
Update catalog-info.yaml
sblausten Apr 5, 2022
01c6309
Update catalog-info.yaml
sblausten Apr 5, 2022
b92c0d9
Update demo_template.yaml
sblausten Apr 7, 2022
d36437d
Add templates
sblausten Jun 9, 2022
5e3b3c6
Merge branch 'main' of github.com:sblausten/sample-service
sblausten Jun 9, 2022
6147458
update
sblausten Jun 9, 2022
a24f2a1
update
sblausten Jun 9, 2022
0f964e1
test
sblausten Jun 9, 2022
d60ae18
test
sblausten Jun 9, 2022
f19d36d
test
sblausten Jun 9, 2022
9ffeb48
test
sblausten Jun 9, 2022
62751c0
test
sblausten Jun 9, 2022
909baf9
test
sblausten Jun 9, 2022
a5efef1
test
sblausten Jun 9, 2022
2faed6a
Update github-actions-template.yaml
sblausten Jun 9, 2022
174c4fb
Test escape
sblausten Jun 10, 2022
6232d60
Add dynamic workflow
sblausten Jun 10, 2022
083f589
Spacing
sblausten Jun 10, 2022
bf4bd33
update
sblausten Jun 10, 2022
051f545
update
sblausten Jun 10, 2022
8ba36b4
update
sblausten Jun 10, 2022
840f1ec
update
sblausten Jun 10, 2022
a79e131
update
sblausten Jun 10, 2022
c04cda8
update
sblausten Jun 10, 2022
2ec4c26
update
sblausten Jun 10, 2022
e49064d
update
sblausten Jun 10, 2022
756918d
update
sblausten Jun 10, 2022
9faa1f1
Merge pull request #1 from sblausten/sblausten-patch-1
sblausten Jun 16, 2022
4b03b91
test 2
sblausten Jun 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
19 changes: 19 additions & 0 deletions another-service/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Docs for sample-service-1

Anyone who has spent more than a month working in a decently sized software engineering department
can tell you the pain of finding documentation. Everyone wishes that great docs for internal
services were the norm but few people are willing to spend the time it takes to make fantastic
docs a reality.

Even when you do take the time to write good docs, they end up being so difficult to find that you
might as well not have bothered. Motivated teams will create a dedicated website for the software
they have lovingly crafted. But searching for internal software isn’t like searching the open web,
Google doesn’t index your internal subdomains (hopefully!).

It’s no wonder that software teams struggle to summon the motivation to produce great docs.
They’re hard to write and nobody will see them anyway.

Backstage solves this problem by co-locating documentation with the service it is for. Write
your docs-as-code in whatever format you like ([MkDocs](https://www.mkdocs.org/) is currently
supported out of the box), publish it whereever you like, and Backstage will display it in context
where it is easy to find.
12 changes: 12 additions & 0 deletions another-service/docs/local-development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Development

First add some secrets to the `.env` file in the root. See the `.env.sample` file for suggestions
of required environment variables.

Then run the software locally like this:

```shell
yarn start
curl :3000/
```

9 changes: 9 additions & 0 deletions another-service/docs/mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
site_name: 'sample-service'

nav:
- Home: intro.md
- Local Development: local-development.md
- test: test-doc.md

plugins:
- techdocs-core
19 changes: 19 additions & 0 deletions another-service/docs/test-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This is my testing document


```diff
diff --git a/src/components/CallToAction/EmailCaptureForm.js b/src/components/CallToAction/EmailCaptureForm.js index eb154ca..9450b93 100644
--- a/src/components/CallToAction/EmailCaptureForm.js
+++ b/src/components/CallToAction/EmailCaptureForm.js
@@ -56,7 +56,7 @@

const EmailCaptureForm = ({
<Button
text={buttonText}
disabled={disabled}
- icon={<PaperAirplaneIcon className="h-4 w-4 mr-1" />}
+ prefixIcon={<PaperAirplaneIcon />}
id={buttonId}
fullWidth
color="primary"
```
19 changes: 19 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- main

pool:
vmImage: ubuntu-latest

steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'

- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script test 2'
1 change: 1 addition & 0 deletions catalog-info-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
snyk.io/org-name: roadie
snyk.io/project-ids: 63ac09c4-fd65-4f53-b9b2-c31d2dee3291
backstage.io/kubernetes-label-selector: 'app.kubernetes.io/name=sample-service'
dev.azure.com/project-repo: roadie-test/roadie-test
spec:
type: service
owner: sample-team
Expand Down
2 changes: 2 additions & 0 deletions catalog-info-4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Component
metadata:
name: sample-service-4
title: Sample Service 4
tags:
- test
description: |
A service for testing Backstage functionality. Configured for GitHub Actions, Sentry, AWS Lambda.
annotations:
Expand Down
1 change: 1 addition & 0 deletions catalog-info-roadie-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
pagerduty.com/integration-key: 1cf15c07f6f440e0a8d65b7ce80be834
snyk.io/org-name: dtuite
snyk.io/project-ids: b6ab231c-a019-4def-a148-4a10a79d6302
lighthouse.com/website-url: https://api.development.env.tryflux.com/lighthouse-audit
spec:
type: service
owner: engineering
Expand Down
5 changes: 4 additions & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ metadata:
backstage.io/techdocs-ref: dir:.
snyk.io/org-name: roadie
snyk.io/project-ids: 63ac09c4-fd65-4f53-b9b2-c31d2dee3291
dev.azure.com/project-repo: roadie-test/sample-service
dev.azure.com/project: roadie-test
dev.azure.com/build-definition: sblausten.sample-service
spec:
type: other
lifecycle: unknown
owner: 'user:iain@roadie.io'
owner: 'user:sam@roadie.io'
169 changes: 169 additions & 0 deletions ddb-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: create-documentdb
title: Create DocumentDB instance
description: Will create a new DocumentDB instance
tags:
- aws
- database
- infrastructure
spec:
owner: Ops
type: infrastructure
parameters:
- title: "Provide information"
required:
- owner
- instance_name
- docdb_version
- instance_class
- instance_number
- product_line
properties:
owner:
title: "Owner"
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
instance_name:
title: "instance_name"
type: string
description: Unique name of your DocumentDB cluster
docdb_version:
title: "Version of DocumentDB"
type: string
description: DocumentDB cluster version
anyOf:
- type: string
title: 3.6.0
enum:
- "3.6.0"
- type: string
title: 4.0.0
enum:
- "4.0.0"
instance_class:
title: "Instance class"
type: string
description: Choose an DocumentDB instance class
anyOf:
- type: string
title: db.t4.medium(2cpu, 4Gib RAM)
enum:
- "db.t4.medium"
- type: string
title: db.r6g.large(2cpu, 16Gib RAM)
enum:
- "db.r6g.large"
- type: string
title: db.r6g.xlarge(4cpu, 32Gib RAM)
enum:
- "db.r6g.xlarge"
- type: string
title: db.r6g.2xlarge(4cpu, 64Gib RAM)
enum:
- "db.r6g.2xlarge"
instance_number:
title: "Number of instances"
type: string
description: Choose an DocumentDB instance number
anyOf:
- type: string
title: "1"
enum:
- "1"
- type: string
title: "2"
enum:
- "2"
- type: string
title: "3"
enum:
- "3"
- type: string
title: "4"
enum:
- "4"
product_line:
title: "Product line"
type: string
description: Choose your product line
anyOf:
- type: string
title: ugc
enum:
- "ugc"
- type: string
title: communication
enum:
- "communication"
- type: string
title: platform
enum:
- "platform"
- type: string
title: data-group
enum:
- "data-group"
- type: string
title: loyalty
enum:
- "loyalty"
- type: string
title: infra
enum:
- "infra"
- type: string
title: subscriptions
enum:
- "subscriptions"
- type: string
title: smsbump
enum:
- "smsbump"
- type: string
title: app-infra
enum:
- "app-infra"
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
targetPath: temp
copyWithoutRender:
- .github/workflows/*
values:
instance_name: '${{ parameters.instance_name }}'
instance_class: '${{ parameters.instance_class }}'
instance_number: '${{ parameters.instance_number }}'
docdb_version: '${{ parameters.docdb_version }}'
product_line: '${{ parameters.product_line }}'
- id: "file rename"
name: Renamne the configuration
action: fs:rename
input:
files:
- from: temp/documentDB-template.tf
to: ${{ parameters.instance_name}}.tf
- id: publish
name: Create a pull request
action: publish:github:pull-request
input:
repoUrl: 'github.com?owner=sblausten&repo=terraform-ddb-test'
targetPath: 'terraform/rds'
title: "feat(backstage): 'add backstage docdb entities for ${{ parameters.instance_name }}'"
branchName: add-docdb-backstage-entities-for-${{ parameters.instance_name }}
description: |
# Add docdb ackstage entities for: ${{parameters.instance_name}}
${{ parameters.instance_name if parameters.instance_name else "" }}

output:
links:
- url: ${{steps.publish.output.remoteUrl}}
text: "Pull request"
6 changes: 3 additions & 3 deletions demo_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
# some metadata about the template itself
metadata:
name: hello-world
title: Hello World
name: hello-world-2
title: Hello World 2
description: scaffolder Hello, World template demo
spec:
owner: backstage/techdocs-core
Expand All @@ -28,4 +28,4 @@ spec:
name: Log Message
action: debug:log
input:
message: "Hello, ${{ parameters.name }}"
message: "Hello, ${{ parameters.name }} 2"
Loading