-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
27,303 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
dist-types | ||
node_modules | ||
packages/*/dist | ||
packages/*/node_modules | ||
plugins/*/dist | ||
plugins/*/node_modules | ||
*.local.yaml | ||
backstage/dist-types | ||
backstage/node_modules | ||
backstage/packages/*/dist | ||
backstage/packages/*/node_modules | ||
backstage/plugins/*/dist | ||
backstage/plugins/*/node_modules | ||
backstage/*.local.yaml | ||
.devbox | ||
.git | ||
.gitignore | ||
.teller.yml | ||
chart | ||
devbox.* | ||
kind.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: ci | ||
run-name: ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-container-image: | ||
runs-on: ubuntu-latest | ||
env: | ||
TAG: 0.0.${{ github.run_number }} | ||
GITHUB_USER: vfarcic | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: xxx | ||
run: env | ||
# - name: Install Devbox | ||
# uses: jetpack-io/[email protected] | ||
# with: | ||
# enable-cache: true | ||
# project-path: .github/workflows | ||
# - name: Plugins | ||
# run: devbox run plugins | ||
# - name: Set up QEMU | ||
# uses: docker/setup-qemu-action@v3 | ||
# - name: Login to ghcr | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# registry: ghcr.io | ||
# username: vfarcic | ||
# password: ${{ secrets.REGISTRY_PASSWORD }} | ||
# - name: Build and Push | ||
# run: devbox run build | ||
|
||
# - name: Build and push | ||
# run: | | ||
# earthly --push \ | ||
# --secret cosignpassword="$COSIGN_PASSWORD" \ | ||
# --secret cosignkey="$COSIGN_PRIVATE_KEY" \ | ||
# --secret password="$REGISTRY_PASSWORD" \ | ||
# +all --tag $TAG | ||
# env: | ||
# COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | ||
# COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | ||
# REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | ||
# - name: Commit changes | ||
# run: | | ||
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
# git config --local user.name "github-actions[bot]" | ||
# git add . | ||
# git commit -m "Release ${{ env.TAG }} [skip ci]" | ||
# - name: Push changes | ||
# uses: ad-m/github-push-action@master | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/backstage | ||
/backstage-demo*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
app: | ||
baseUrl: ${BACKSTAGE_HOST} | ||
backend: | ||
baseUrl: ${BACKSTAGE_HOST} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
backend: | ||
database: | ||
client: pg | ||
connection: | ||
host: ${DB_HOST} | ||
port: 5432 | ||
user: ${user} | ||
password: ${password} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: backstage-demo | ||
description: Backstage Demo | ||
type: application | ||
version: "0.0.1" | ||
appVersion: "0.0.1" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "backstage-demo.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "backstage-demo.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "backstage-demo.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "backstage-demo.labels" -}} | ||
helm.sh/chart: {{ include "backstage-demo.chart" . }} | ||
{{ include "backstage-demo.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "backstage-demo.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "backstage-demo.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "backstage-demo.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "backstage-demo.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if eq .Values.mode "production" -}} | ||
--- | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: {{ include "backstage-demo.fullname" . }}-db | ||
labels: | ||
{{- include "backstage-demo.labels" . | nindent 4 }} | ||
spec: | ||
instances: {{ .Values.db.instances }} | ||
storage: | ||
size: 1Gi | ||
enableSuperuserAccess: true | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "backstage-demo.fullname" . }} | ||
labels: | ||
{{- include "backstage-demo.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "backstage-demo.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "backstage-demo.labels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- name: http | ||
containerPort: 7007 | ||
env: | ||
- name: NODE_ENV | ||
value: development | ||
- name: BACKSTAGE_HOST | ||
value: http://{{ .Values.ingress.host }} | ||
- name: DB_HOST | ||
value: {{ include "backstage-demo.fullname" . }}-db-rw | ||
envFrom: | ||
{{- if eq .Values.mode "production" }} | ||
- secretRef: | ||
name: {{ include "backstage-demo.fullname" . }}-db-superuser | ||
{{- end }} | ||
- secretRef: | ||
name: {{ include "backstage-demo.fullname" . }} | ||
{{- if eq .Values.mode "development" }} | ||
command: ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.ingress.yaml"] | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ include "backstage-demo.fullname" . }} | ||
labels: | ||
{{- include "backstage-demo.labels" . | nindent 4 }} | ||
spec: | ||
ingressClassName: {{ .Values.ingress.className }} | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: {{ include "backstage-demo.fullname" . }} | ||
port: | ||
number: 80 | ||
path: / | ||
pathType: ImplementationSpecific |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "backstage-demo.fullname" . }} | ||
labels: | ||
{{- include "backstage-demo.labels" . | nindent 4 }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 80 | ||
targetPort: http | ||
name: http | ||
selector: | ||
{{- include "backstage-demo.selectorLabels" . | nindent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mode: production | ||
image: | ||
repository: ghcr.io/vfarcic/backstage-demo | ||
tag: v0.0.1 | ||
db: | ||
instances: 1 | ||
ingress: | ||
className: nginx | ||
host: backstage.127.0.0.1.nip.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,21 @@ | |
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]" | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]" | ||
], | ||
"shell": { | ||
"init_hook": [], | ||
"scripts": {} | ||
"scripts": { | ||
"plugins": [ | ||
"yarn --cwd src/packages/backend add @backstage/plugin-scaffolder-backend-module-github", | ||
"yarn --cwd src/packages/backend add @backstage/plugin-catalog-backend-module-github", | ||
"cp packages/backend/src/index.ts src/packages/backend/src/index.ts" | ||
], | ||
"build": [ | ||
"docker image build --tag ghcr.io/$GITHUB_USER/backstage-demo:$TAG ." | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.