diff --git a/templates/github/quarkus-web/README.md b/templates/github/quarkus-web/README.md deleted file mode 100644 index 5fa09c5a..00000000 --- a/templates/github/quarkus-web/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Quarkus Web Template - -This repository contains the Backstage Template used to create the Kubernetes resources needed to build/deploy a simple quarkus application. - -## Repository Breakdown - -TBD diff --git a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-dev-build.yaml b/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-dev-build.yaml deleted file mode 100644 index 9c4246d2..00000000 --- a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-dev-build.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ${{ values.component_id }}-dev-build - namespace: janus-argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - project: janus - source: - repoURL: ${{ values.destination }} - targetRevision: HEAD - path: ./helm/build - destination: - server: https://kubernetes.default.svc - namespace: ${{ values.component_id }}-dev - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true - - RespectIgnoreDifferences=true - - ApplyOutOfSyncOnly=true - retry: - backoff: - duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") - factor: 2 # a factor to multiply the base duration after each failed retry - maxDuration: 10m # the maximum amount of time allowed for the backoff strategy diff --git a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-dev.yaml b/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-dev.yaml deleted file mode 100644 index f689afbb..00000000 --- a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-dev.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ${{ values.component_id }}-dev - namespace: janus-argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - project: janus - source: - repoURL: ${{ values.destination }} - targetRevision: HEAD - path: ./helm/app - helm: - parameters: - - name: namespace.name - value: ${{ values.component_id }}-dev - - name: environment - value: dev - - name: image.tag - value: latest - destination: - server: https://kubernetes.default.svc - namespace: ${{ values.component_id }}-dev - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true - - RespectIgnoreDifferences=true - - ApplyOutOfSyncOnly=true - retry: - backoff: - duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") - factor: 2 # a factor to multiply the base duration after each failed retry - maxDuration: 10m # the maximum amount of time allowed for the backoff strategy diff --git a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-preprod.yaml b/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-preprod.yaml deleted file mode 100644 index 422850fd..00000000 --- a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-preprod.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ${{ values.component_id }}-preprod - namespace: janus-argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - project: janus - source: - repoURL: ${{ values.destination }} - targetRevision: HEAD - path: ./helm/app - helm: - parameters: - - name: namespace.name - value: ${{ values.component_id }}-preprod - - name: environment - value: preprod - - name: image.tag - value: preprod - destination: - server: https://kubernetes.default.svc - namespace: ${{ values.component_id }}-preprod - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true - - RespectIgnoreDifferences=true - - ApplyOutOfSyncOnly=true - retry: - backoff: - duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") - factor: 2 # a factor to multiply the base duration after each failed retry - maxDuration: 10m # the maximum amount of time allowed for the backoff strategy diff --git a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-prod.yaml b/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-prod.yaml deleted file mode 100644 index c611ee60..00000000 --- a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-app-prod.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ${{ values.component_id }}-prod - namespace: janus-argocd - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: - project: janus - source: - repoURL: ${{ values.destination }} - targetRevision: HEAD - path: ./helm/app - helm: - parameters: - - name: namespace.name - value: ${{ values.component_id }}-prod - - name: environment - value: prod - - name: image.tag - value: prod - destination: - server: https://kubernetes.default.svc - namespace: ${{ values.component_id }}-prod - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true - - RespectIgnoreDifferences=true - - ApplyOutOfSyncOnly=true - retry: - backoff: - duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") - factor: 2 # a factor to multiply the base duration after each failed retry - maxDuration: 10m # the maximum amount of time allowed for the backoff strategy diff --git a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-repo.yaml b/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-repo.yaml deleted file mode 100644 index b7d239cf..00000000 --- a/templates/github/quarkus-web/manifests/argocd/${{values.component_id}}-argocd-repo.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - name: ${{ values.component_id }}-repo - namespace: janus-argocd - labels: - argocd.argoproj.io/secret-type: repository -stringData: - url: ${{ values.destination }} \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/app/.helmignore b/templates/github/quarkus-web/manifests/helm/app/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/templates/github/quarkus-web/manifests/helm/app/Chart.yaml b/templates/github/quarkus-web/manifests/helm/app/Chart.yaml deleted file mode 100644 index 5d608476..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: quarkus-template -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/NOTES.txt b/templates/github/quarkus-web/manifests/helm/app/templates/NOTES.txt deleted file mode 100644 index d4657a27..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/NOTES.txt +++ /dev/null @@ -1,18 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.route }} - http://{{ .Values.route.host }}{{ .Values.route.path }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "quarkus-template.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "quarkus-template.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "quarkus-template.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "quarkus-template.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/_helpers.tpl b/templates/github/quarkus-web/manifests/helm/app/templates/_helpers.tpl deleted file mode 100644 index aa9bdbb4..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/_helpers.tpl +++ /dev/null @@ -1,75 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "quarkus-template.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 "quarkus-template.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 "quarkus-template.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "backstage.labels" -}} -backstage.io/kubernetes-id: ${{values.component_id}} -{{- end }} - -{{- define "quarkus-template.labels" -}} -backstage.io/kubernetes-id: ${{values.component_id}} -helm.sh/chart: {{ include "quarkus-template.chart" . }} -{{ include "quarkus-template.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "quarkus-template.selectorLabels" -}} -app.kubernetes.io/name: {{ include "quarkus-template.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "quarkus-template.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "quarkus-template.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} - -{{- define "quarkus-template.image" -}} -{{- if eq .Values.image.registry "Quay" }} -{{- printf "%s/%s/%s:%s" .Values.image.host .Values.image.organization .Values.image.name .Values.image.tag -}} -{{- else }} -{{- printf "%s/%s/%s:latest" .Values.image.host .Values.namespace.name .Values.image.name -}} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/deployment.yaml b/templates/github/quarkus-web/manifests/helm/app/templates/deployment.yaml deleted file mode 100644 index 593bf277..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/deployment.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ${{values.deployment_name}} - labels: - {{- include "backstage.labels" . | nindent 4 }} - {{- include "quarkus-template.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "quarkus-template.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "backstage.labels" . | nindent 8 }} - {{- include "quarkus-template.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "quarkus-template.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: {{ include "quarkus-template.image" . }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - imagePullPolicy: {{ .Values.image.pullPolicy }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/rolebinding.yaml b/templates/github/quarkus-web/manifests/helm/app/templates/rolebinding.yaml deleted file mode 100644 index 29fd9f8d..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if not (eq .Values.environment "dev") -}} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: edit - namespace: "{{ .Values.namespace.name }}" -subjects: - - kind: ServiceAccount - name: image-pusher - namespace: ${{values.component_id}}-dev -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: edit -{{- end }} diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/route.yaml b/templates/github/quarkus-web/manifests/helm/app/templates/route.yaml deleted file mode 100644 index f8bd5496..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/route.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- with .Values.route }} -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - "helm.sh/hook": post-install,post-upgrade - labels: - {{- include "quarkus-template.labels" $ | nindent 4 }} - name: {{ include "quarkus-template.fullname" $ }} -spec: - {{- if .host }} - host: {{ .host }} - {{- end }} - {{- if .path }} - path: {{ .path }} - {{- end }} - port: - targetPort: {{ $.Values.service.port }} - to: - kind: Service - name: {{ include "quarkus-template.fullname" $ }} - wildcardPolicy: None -{{- end }} diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/service.yaml b/templates/github/quarkus-web/manifests/helm/app/templates/service.yaml deleted file mode 100644 index 5f943831..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "quarkus-template.fullname" . }} - labels: - {{- include "quarkus-template.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "quarkus-template.selectorLabels" . | nindent 4 }} diff --git a/templates/github/quarkus-web/manifests/helm/app/templates/serviceaccount.yaml b/templates/github/quarkus-web/manifests/helm/app/templates/serviceaccount.yaml deleted file mode 100644 index 09e8d964..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "quarkus-template.serviceAccountName" . }} - labels: - {{- include "quarkus-template.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/templates/github/quarkus-web/manifests/helm/app/values.yaml b/templates/github/quarkus-web/manifests/helm/app/values.yaml deleted file mode 100644 index 668def3c..00000000 --- a/templates/github/quarkus-web/manifests/helm/app/values.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# Default values for quarkus-template. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -namespace: - enabled: true - argocd: - name: default - -replicaCount: 1 - -image: - pullPolicy: IfNotPresent - registry: ${{values.image_registry}} - host: ${{values.image_host}} - organization: ${{values.image_organization}} - name: ${{values.image_name}} - # Overrides the image tag whose default is the chart appVersion. - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: ${{values.port}} - -route: - host: "" - path: / - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/templates/github/quarkus-web/manifests/helm/build/Chart.yaml b/templates/github/quarkus-web/manifests/helm/build/Chart.yaml deleted file mode 100644 index f1cfb458..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/Chart.yaml +++ /dev/null @@ -1,25 +0,0 @@ - -apiVersion: v2 -name: quarkus-ci -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.0.0" \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/_helpers.tpl b/templates/github/quarkus-web/manifests/helm/build/templates/_helpers.tpl deleted file mode 100644 index 766e619d..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/_helpers.tpl +++ /dev/null @@ -1,18 +0,0 @@ -{{/* -Image Url image will be pushed to defaults to internal registry -*/}} -{{- define "image.dev-url" -}} -{{- with .Values.image }} -{{- if eq .registry "Quay" }} -{{- printf "%s/%s/%s" .host .organization .name }} -{{- else }} -{{- printf "%s/%s-dev/%s" .host .name .name }} -{{- end }} -{{- end }} -{{- end }} - -{{- define "image.preprod-url" -}} -{{- with .Values.image }} -{{- printf "%s/%s-preprod/%s" .host .name .name }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/el.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/el.yaml deleted file mode 100644 index c13122e8..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/el.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -apiVersion: triggers.tekton.dev/v1alpha1 -kind: EventListener -metadata: - name: {{ .Values.app.name }}-el -spec: - serviceAccountName: pipeline - triggers: - - name: commit-trig - bindings: - - ref: commit-binding - interceptors: - - cel: - filter: "has(body.commits) && body.created == false" - template: - ref: {{ .Values.app.name }}-run-build - - name: tag-trig-preprod - interceptors: - - cel: - filter: "body.ref_type == 'tag' && body.ref.startsWith('v')" - bindings: - - ref: tag-binding-preprod - template: - ref: {{ .Values.app.name }}-run-promote - - name: tag-trig-prod - bindings: - - ref: tag-binding-prod - interceptors: - - cel: - filter: "body.ref_type == 'tag' && body.ref.startsWith('r')" - overlays: - - key: source - expression: body.ref.replace("r","v") - template: - ref: {{ .Values.app.name }}-run-promote \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/git-webhook.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/git-webhook.yaml deleted file mode 100644 index d4386125..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/git-webhook.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: GitWebhook -metadata: - name: {{ .Values.app.name }} -spec: - gitHub: - gitServerCredentials: - name: {{ .Values.app.name }}-github-pat - repositoryOwner: {{ .Values.git.org }} - ownerType: "organization" - repositoryName: {{ .Values.git.name }} - webhookURL: https://webhook-{{ .Values.app.name }}-el-{{ .Values.app.namespace }}{{ .Values.app.cluster }} - insecureSSL: true - webhookSecret: - name: {{ .Values.app.name }}-webhook - events: - - push - - create - content: json - active: true \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/pipeline-build.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/pipeline-build.yaml deleted file mode 100644 index 7da210e3..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/pipeline-build.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: {{ .Values.app.name }}-build - labels: - type: pipeline - backstage.io/kubernetes-id: {{ .Values.app.name }} -spec: - params: - - name: source-repo - description: source repo that contains the application code - type: string - default: {{ .Values.git.repo }} - - name: source-branch - description: source branch to build from - default: {{ .Values.git.branch }} - type: string - - name: output-image - description: reference of the image that will get created - default: {{ include "image.dev-url" . }} - type: string - tasks: - - name: git-clone - params: - - name: url - value: $(params.source-repo) - - name: revision - value: $(params.source-branch) - taskRef: - kind: ClusterTask - name: git-clone - workspaces: - - name: output - workspace: source-folder - - name: package - runAfter: - - git-clone - taskRef: - kind: ClusterTask - name: maven - workspaces: - - name: source - workspace: source-folder - - name: maven-settings - workspace: maven-settings - - name: build-and-push - params: - - name: IMAGE - value: $(params.output-image) - runAfter: - - package - taskRef: - kind: Task - name: kaniko - workspaces: - - name: source - workspace: source-folder - - name: dockerconfig - workspace: docker-config - workspaces: - - name: source-folder - - name: maven-settings - - name: docker-config diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/pipeline-promote.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/pipeline-promote.yaml deleted file mode 100644 index e7d79454..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/pipeline-promote.yaml +++ /dev/null @@ -1,93 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: {{ .Values.app.name }}-promote - labels: - type: pipeline - backstage.io/kubernetes-id: {{ .Values.app.name }} -spec: - params: - - name: source-image - description: source image to promote - type: string - default: {{ include "image.dev-url" . }} - - name: destination-image - description: destination image to promote to - type: string - default: {{ include "image.preprod-url" . }} - - name: source-image-tag - type: string - default: latest - - name: destination-image-tag - type: string - default: latest - - name: namespace - type: string - tasks: -{{- if eq .Values.image.registry "Quay" }} - - name: quay-tag-promote - params: - - name: srcImageURL - value: 'docker://$(params.source-image):$(params.source-image-tag)' - - name: destImageURL - value: 'docker://$(params.source-image):$(params.destination-image-tag)' - - name: srcTLSverify - value: 'false' - - name: destTLSverify - value: 'false' - taskRef: - kind: Task - name: skopeo-copy - workspaces: - - name: images-url - workspace: images-url - - name: patch-deployment - params: - - name: namespace - value: '$(params.namespace)' - - name: IMAGE - value: '{{ .Values.image.host }}/{{ .Values.image.organization }}/{{ .Values.image.name }}:$(params.destination-image-tag)' - taskRef: - kind: Task - name: update-deployment - runAfter: - - quay-tag-promote -{{- else }} - - name: copy-image-tag - params: - - name: srcImageURL - value: 'docker://$(params.source-image):$(params.source-image-tag)' - - name: destImageURL - value: 'docker://$(params.destination-image):$(params.destination-image-tag)' - - name: srcTLSverify - value: 'false' - - name: destTLSverify - value: 'false' - taskRef: - kind: Task - name: skopeo-copy - workspaces: - - name: images-url - workspace: images-url - - name: copy-image-latest - params: - - name: srcImageURL - value: 'docker://$(params.source-image):$(params.source-image-tag)' - - name: destImageURL - value: 'docker://$(params.destination-image):latest' - - name: srcTLSverify - value: 'false' - - name: destTLSverify - value: 'false' - taskRef: - kind: Task - name: skopeo-copy - runAfter: - - copy-image-tag - workspaces: - - name: images-url - workspace: images-url -{{- end }} - workspaces: - - name: images-url \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/rolebinding.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/rolebinding.yaml deleted file mode 100644 index 4ce19880..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: image-pusher -subjects: - - kind: ServiceAccount - name: image-pusher - namespace: ${{values.component_id}}-dev -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: pipelines-scc-clusterrole diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/route.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/route.yaml deleted file mode 100644 index 787563bc..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/route.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -kind: Route -apiVersion: route.openshift.io/v1 -metadata: - name: webhook-{{ .Values.app.name }}-el - labels: - app.kubernetes.io/managed-by: EventListener - app.kubernetes.io/part-of: Triggers - eventlistener: {{ .Values.app.name }}-el -spec: - to: - kind: Service - name: el-{{ .Values.app.name }}-el - weight: 100 - port: - targetPort: http-listener - tls: - insecureEdgeTerminationPolicy: Redirect - termination: edge \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/serviceaccount-promote.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/serviceaccount-promote.yaml deleted file mode 100644 index 422bda78..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/serviceaccount-promote.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: image-pusher -secrets: - - name: {{ .Values.app.name }}-quay-auth \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/task-build.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/task-build.yaml deleted file mode 100644 index 68eab0ba..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/task-build.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: kaniko - labels: - app.kubernetes.io/version: "0.6" - annotations: - tekton.dev/pipelines.minVersion: "0.17.0" - tekton.dev/categories: Image Build - tekton.dev/tags: image-build - tekton.dev/displayName: "Build and upload container image using Kaniko" - tekton.dev/platforms: "linux/amd64,linux/arm64,linux/ppc64le" -spec: - description: >- - This Task builds a simple Dockerfile with kaniko and pushes to a registry. - This Task stores the image name and digest as results, allowing Tekton Chains to pick up - that an image was built & sign it. - params: - - name: IMAGE - description: Name (reference) of the image to build. - - name: DOCKERFILE - description: Path to the Dockerfile to build. - default: ./Dockerfile - - name: CONTEXT - description: The build context used by Kaniko. - default: ./ - - name: EXTRA_ARGS - type: array - default: [] - - name: BUILDER_IMAGE - description: The image on which builds will run (default is v1.5.1) - default: gcr.io/kaniko-project/executor:v1.5.1@sha256:c6166717f7fe0b7da44908c986137ecfeab21f31ec3992f6e128fff8a94be8a5 - workspaces: - - name: source - description: Holds the context and Dockerfile - - name: dockerconfig - description: Includes a docker `config.json` - optional: true - mountPath: /kaniko/.docker - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-push - workingDir: $(workspaces.source.path) - image: $(params.BUILDER_IMAGE) - args: - - $(params.EXTRA_ARGS) - - --dockerfile=$(params.DOCKERFILE) - - --context=$(workspaces.source.path)/$(params.CONTEXT) # The user does not need to care the workspace and the source. - - --destination=$(params.IMAGE) - - --digest-file=$(results.IMAGE_DIGEST.path) - # kaniko assumes it is running as root, which means this example fails on platforms - # that default to run containers as random uid (like OpenShift). Adding this securityContext - # makes it explicit that it needs to run as root. - securityContext: - runAsUser: 0 - - name: write-url - image: docker.io/library/bash:5.1.4@sha256:c523c636b722339f41b6a431b44588ab2f762c5de5ec3bd7964420ff982fb1d9 - script: | - set -e - image="$(params.IMAGE)" - echo -n "${image}" | tee "$(results.IMAGE_URL.path)" \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/task-copy.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/task-copy.yaml deleted file mode 100644 index f1cdd913..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/task-copy.yaml +++ /dev/null @@ -1,78 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: skopeo-copy - labels: - app.kubernetes.io/version: "0.2" - annotations: - tekton.dev/pipelines.minVersion: "0.12.1" - tekton.dev/categories: CLI - tekton.dev/tags: cli - tekton.dev/displayName: "skopeo copy" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - Skopeo is a command line tool for working with remote image registries. - - Skopeo doesn’t require a daemon to be running while performing its operations. - In particular, the handy skopeo command called copy will ease the whole image - copy operation. The copy command will take care of copying the image from - internal.registry to production.registry. If your production registry requires - credentials to login in order to push the image, skopeo can handle that as well. - - workspaces: - - name: images-url - params: - - name: srcImageURL - description: URL of the image to be copied to the destination registry - type: string - default: "" - - name: destImageURL - description: URL of the image where the image from source should be copied to - type: string - default: "" - - name: srcTLSverify - description: Verify the TLS on the src registry endpoint - type: string - default: "true" - - name: destTLSverify - description: Verify the TLS on the dest registry endpoint - type: string - default: "true" - steps: - - name: skopeo-copy - env: - - name: HOME - value: /tekton/home - image: quay.io/skopeo/stable:v1.9.0 - script: | - # Function to copy multiple images. - # - copyimages() { - filename="$(workspaces.images-url.path)/url.txt" - while IFS= read -r line || [ -n "$line" ] - do - cmd="" - for url in $line - do - # echo $url - cmd="$cmd \ - $url" - done - skopeo copy "$cmd" --src-tls-verify="$(params.srcTLSverify)" --dest-tls-verify="$(params.destTLSverify)" - echo "$cmd" - done < "$filename" - } - # - # If single image is to be copied then, it can be passed through - # params in the taskrun. - if [ "$(params.srcImageURL)" != "" ] && [ "$(params.destImageURL)" != "" ] ; then - skopeo copy "$(params.srcImageURL)" "$(params.destImageURL)" --src-tls-verify="$(params.srcTLSverify)" --dest-tls-verify="$(params.destTLSverify)" - else - # If file is provided as a configmap in the workspace then multiple images can be copied. - # - copyimages - fi - securityContext: - runAsNonRoot: true - runAsUser: 65532 \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/task-update-deployment.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/task-update-deployment.yaml deleted file mode 100644 index a5df0ff3..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/task-update-deployment.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: update-deployment -spec: - params: - - name: deployment - description: The name of the deployment patch the image - default: ${{values.deployment_name}} - type: string - - name: namespace - description: The namespace of the target deployment - type: string - - name: IMAGE - description: Location of image to be patched with - type: string - steps: - - name: patch - image: quay.io/openshift/origin-cli:latest - command: ["/bin/bash", "-c"] - args: - - |- - oc patch deployment -n $(inputs.params.namespace) $(inputs.params.deployment) --patch='{"spec":{"template":{"spec":{ - "containers":[{ - "name": "$(inputs.params.deployment)", - "image":"$(inputs.params.IMAGE)" - }] - }}}}' \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-commit.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-commit.yaml deleted file mode 100644 index 0f5bcbc6..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-commit.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerBinding -metadata: - name: commit-binding -spec: - params: - - name: git-repo-url - value: $(body.repository.url) - - name: git-revision - value: $(body.head_commit.id) \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-tag-preprod.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-tag-preprod.yaml deleted file mode 100644 index 189c059b..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-tag-preprod.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerBinding -metadata: - name: tag-binding-preprod -spec: - params: - - name: source-tag - value: latest - - name: destination-tag - value: $(body.ref) - - name: namespace - value: {{ .Values.app.name }}-preprod \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-tag-prod.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-tag-prod.yaml deleted file mode 100644 index 98ea16e2..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/triggerbinding-tag-prod.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerBinding -metadata: - name: tag-binding-prod -spec: - params: - - name: source-tag - value: $(extensions.source) - - name: destination-tag - value: $(body.ref) - - name: namespace - value: {{ .Values.app.name }}-prod \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/triggertemplate-build.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/triggertemplate-build.yaml deleted file mode 100644 index 71a4965a..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/triggertemplate-build.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerTemplate -metadata: - name: {{ .Values.app.name }}-run-build -spec: - params: - - name: git-revision - description: The git revision - default: {{ .Values.git.branch }} - - name: git-repo-url - description: The repo url - - name: output-image - description: reference of the image that will get created - default: {{ include "image.dev-url" . }} - resourcetemplates: - - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - name: $(uid) - labels: - backstage.io/kubernetes-id: {{ .Values.app.name }} - spec: - params: - - name: source-repo - value: $(tt.params.git-repo-url) - - name: source-branch - value: $(tt.params.git-revision) - - name: output-image - value: $(tt.params.output-image) - pipelineRef: - name: {{ .Values.app.name }}-build - serviceAccountName: pipeline - timeout: 1h0m0s - workspaces: - - name: source-folder - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - - emptyDir: {} - name: maven-settings - - name: docker-config - secret: - secretName: {{ .Values.app.name }}-registry-creds \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/triggertemplate-promote.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/triggertemplate-promote.yaml deleted file mode 100644 index 39472f0c..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/triggertemplate-promote.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerTemplate -metadata: - name: {{ .Values.app.name }}-run-promote -spec: - params: - - name: source-image - description: The source image to promote - default: {{ include "image.dev-url" . }} - - name: destination-image - description: The destination to copy the image to - default: {{ include "image.preprod-url" . }} - - name: source-tag - description: The image tag to promote - - name: destination-tag - description: The git tag representing the new version or release - - name: namespace - description: The target namespace being deployed to - - resourcetemplates: - - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - name: $(uid) - labels: - backstage.io/kubernetes-id: {{ .Values.app.name }} - spec: - params: - - name: source-image - value: $(tt.params.source-image) - - name: destination-image - value: $(tt.params.destination-image) - - name: source-image-tag - value: $(tt.params.source-tag) - - name: destination-image-tag - value: $(tt.params.destination-tag) - - name: namespace - value: $(tt.params.namespace) - pipelineRef: - name: {{ .Values.app.name }}-promote - serviceAccountName: image-pusher - timeout: 1h0m0s - workspaces: - - name: images-url - emptyDir: {} \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-k8-auth-engine-role.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-k8-auth-engine-role.yaml deleted file mode 100644 index 21a4c6d0..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-k8-auth-engine-role.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: KubernetesAuthEngineRole -metadata: - name: {{ .Values.app.name }}-vault-role - namespace: vault-admin -spec: - # Add fields here - authentication: - path: kubernetes - role: policy-admin - path: kubernetes - policies: - - {{ .Values.app.name }}-read-token - targetServiceAccounts: - - default - targetNamespaces: - targetNamespaceSelector: - matchExpressions: - - key: kubernetes.io/metadata.name - operator: In - values: [{{ .Values.app.namespace }}] \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-policy.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-policy.yaml deleted file mode 100644 index 774df762..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-policy.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: Policy -metadata: - name: {{ .Values.app.name }}-read-token - namespace: vault-admin -spec: - # Add fields here - authentication: - path: kubernetes - role: policy-admin - policy: | - # create tokens - path "/github/token/{{ .Values.app.name }}" { - capabilities = ["read"] - } - path "/kv/janus-dev/registry" { - capabilities = ["read"] - } \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-secret-engine.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-secret-engine.yaml deleted file mode 100644 index 6de7685c..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-secret-engine.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: GitHubSecretEngineRole -metadata: - name: {{ .Values.app.name }} - namespace: vault-admin -spec: - authentication: - path: kubernetes - role: policy-admin - path: github - organizationName: {{ .Values.git.org }} - repositories: [] - permissions: - pull_requests: write - metadata: read - contents: write - repository_hooks: write \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-secret.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-secret.yaml deleted file mode 100644 index 2afd947a..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-git-secret.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: VaultSecret -metadata: - name: github-credentials -spec: - vaultSecretDefinitions: - - authentication: - path: kubernetes - role: {{ .Values.app.name }}-vault-role - name: githubtoken - path: github/token/{{ .Values.app.name }} - output: - name: {{ .Values.app.name }}-github-pat - stringData: - token: "{{ "{{" }} .githubtoken.token {{ "}}" }}" - .gitconfig: | - [credential "https://github.com"] - helper = store - .git-credentials: | - https://git:{{ "{{" }} .githubtoken.token {{ "}}" }}@github.com \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-k8-auth-engine-role.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-k8-auth-engine-role.yaml deleted file mode 100644 index 9d7312dd..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-k8-auth-engine-role.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: KubernetesAuthEngineRole -metadata: - name: {{ .Values.app.name }}-kv - namespace: vault-admin -spec: - # Add fields here - authentication: - path: kubernetes - role: policy-admin - path: kubernetes - policies: - - {{ .Values.app.name }}-kv - targetServiceAccounts: - - default - targetNamespaces: - targetNamespaceSelector: - matchExpressions: - - key: kubernetes.io/metadata.name - operator: In - values: [{{ .Values.app.namespace }}] \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-policy.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-policy.yaml deleted file mode 100644 index b4e52bb1..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-policy.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: Policy -metadata: - name: {{ .Values.app.name }}-kv - namespace: vault-admin -spec: - authentication: - path: kubernetes - role: policy-admin - policy: | - # read / write from the kv path - path "{{ .Values.git.org }}/{{ .Values.app.name }}-kv/*" { - capabilities = [ "create", "read", "update", "delete"] - } - # read the password policy - path "sys/policies/password/+/generate" { - capabilities = [ "read" ] - } \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-quay-basic-secret.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-quay-basic-secret.yaml deleted file mode 100644 index f339bcdf..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-quay-basic-secret.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: VaultSecret -metadata: - name: quay-basic-auth -spec: - vaultSecretDefinitions: - - authentication: - path: kubernetes - role: {{ .Values.app.name }}-vault-role - name: registrytoken - path: kv/janus-dev/registry - output: - name: {{ .Values.app.name }}-quay-auth - type: kubernetes.io/basic-auth - annotations: - tekton.dev/docker-0: https://quay.io - stringData: - username: "{{ "{{" }} .registrytoken.user {{ "}}" }}" - password: "{{ "{{" }} .registrytoken.token {{ "}}" }}" \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-quay-config-secret.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-quay-config-secret.yaml deleted file mode 100644 index fad73b72..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-quay-config-secret.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: VaultSecret -metadata: - name: registry-credentials -spec: - vaultSecretDefinitions: - - authentication: - path: kubernetes - role: {{ .Values.app.name }}-vault-role - name: registrytoken - path: kv/janus-dev/registry - output: - name: {{ .Values.app.name }}-registry-creds - stringData: - config.json: | - { - "auths": { - "quay.io": { - "auth": "{{"{{"}}.registrytoken.credentials{{"}}"}}" - } - } - } \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-random-secret.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-random-secret.yaml deleted file mode 100644 index 05e2cb89..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-random-secret.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: RandomSecret -metadata: - name: {{ .Values.app.name }}-webhook -spec: - authentication: - path: kubernetes - role: {{ .Values.app.name }}-kv - isKVSecretsEngineV2: false - path: {{ .Values.git.org }}/{{ .Values.app.name }}-kv - secretKey: webhook_secret - secretFormat: - passwordPolicyName: webhook \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-secret-engine-mount.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-secret-engine-mount.yaml deleted file mode 100644 index 4c0ff419..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-secret-engine-mount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: SecretEngineMount -metadata: - name: {{ .Values.app.name }}-kv - namespace: vault-admin -spec: - authentication: - path: kubernetes - role: policy-admin - type: kv - path: {{ .Values.git.org }} \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/templates/vault-secret.yaml b/templates/github/quarkus-web/manifests/helm/build/templates/vault-secret.yaml deleted file mode 100644 index aec044bd..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/templates/vault-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: redhatcop.redhat.io/v1alpha1 -kind: VaultSecret -metadata: - name: {{ .Values.app.name }}-webhook -spec: - vaultSecretDefinitions: - - authentication: - path: kubernetes - role: {{ .Values.app.name }}-kv - name: webhook_secret - path: {{ .Values.git.org }}/{{ .Values.app.name }}-kv/{{ .Values.app.name }}-webhook - output: - name: {{ .Values.app.name }}-webhook - stringData: - secret: "{{ "{{" }} .webhook_secret.webhook_secret {{ "}}" }}" - type: Opaque \ No newline at end of file diff --git a/templates/github/quarkus-web/manifests/helm/build/values.yaml b/templates/github/quarkus-web/manifests/helm/build/values.yaml deleted file mode 100644 index c72224d2..00000000 --- a/templates/github/quarkus-web/manifests/helm/build/values.yaml +++ /dev/null @@ -1,16 +0,0 @@ -app: - name: ${{values.component_id}} - namespace: ${{values.component_id}}-dev - cluster: ${{ values.cluster }} - -git: - branch: main - repo: ${{ values.source_repository }} - org: ${{ values.git_owner }} - name: ${{ values.repository_name }} - -image: - registry: ${{values.image_registry}} - host: ${{ values.image_host }} - organization: ${{values.image_organization}} - name: ${{ values.image_name }} \ No newline at end of file diff --git a/templates/github/quarkus-web/skeleton/.devfile-intellij.yaml b/templates/github/quarkus-web/skeleton/.devfile-intellij.yaml deleted file mode 100644 index b8c91ddd..00000000 --- a/templates/github/quarkus-web/skeleton/.devfile-intellij.yaml +++ /dev/null @@ -1,51 +0,0 @@ -schemaVersion: 2.1.0 -metadata: - generateName: ${{values.artifact_id}} -components: - - name: development-tooling - container: - image: quay.io/devfile/universal-developer-image:ubi8-0e189d9 - env: - - name: QUARKUS_HTTP_HOST - value: 0.0.0.0 - memoryLimit: 5Gi - cpuLimit: 1500m - volumeMounts: - - name: m2 - path: /home/user/.m2 - endpoints: - - name: quarkus-development-server - targetPort: 8080 - exposure: public - secure: false - protocol: http - - name: debug - targetPort: 5005 - exposure: none - secure: false - protocol: tcp - - name: tests - targetPort: 8081 - exposure: none - secure: false - protocol: tcp - - name: m2 - volume: - size: 1G -commands: - - id: package - exec: - label: "1. Package the application" - component: development-tooling - commandLine: "./mvnw package" - group: - kind: build - isDefault: true - - id: start-dev - exec: - label: "2. Start Development mode (Hot reload + debug)" - component: development-tooling - commandLine: "./mvnw compile quarkus:dev" - group: - kind: run - isDefault: true diff --git a/templates/github/quarkus-web/skeleton/.devfile-vscode.yaml b/templates/github/quarkus-web/skeleton/.devfile-vscode.yaml deleted file mode 100644 index a9c7fa2b..00000000 --- a/templates/github/quarkus-web/skeleton/.devfile-vscode.yaml +++ /dev/null @@ -1,55 +0,0 @@ -schemaVersion: 2.1.0 -metadata: - generateName: ${{values.artifact_id}} -attributes: - controller.devfile.io/storage-type: ephemeral -components: - - name: development-tooling - container: - image: quay.io/devfile/universal-developer-image:ubi8-0e189d9 - env: - - name: QUARKUS_HTTP_HOST - value: 0.0.0.0 - - name: MAVEN_OPTS - value: "-Dmaven.repo.local=/home/user/.m2/repository" - memoryLimit: 5Gi - cpuLimit: 2500m - volumeMounts: - - name: m2 - path: /home/user/.m2 - endpoints: - - name: quarkus-development-server - targetPort: 8080 - exposure: public - secure: false - protocol: http - - name: debug - targetPort: 5005 - exposure: none - secure: false - protocol: tcp - - name: tests - targetPort: 8081 - exposure: none - secure: false - protocol: tcp - - name: m2 - volume: - size: 1G -commands: - - id: package - exec: - label: "1. Package the application" - component: development-tooling - commandLine: "./mvnw package" - group: - kind: build - isDefault: true - - id: start-dev - exec: - label: "2. Start Development mode (Hot reload + debug)" - component: development-tooling - commandLine: "./mvnw compile quarkus:dev" - group: - kind: run - isDefault: true diff --git a/templates/github/quarkus-web/skeleton/.dockerignore b/templates/github/quarkus-web/skeleton/.dockerignore deleted file mode 100644 index 94810d00..00000000 --- a/templates/github/quarkus-web/skeleton/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!target/*-runner -!target/*-runner.jar -!target/lib/* -!target/quarkus-app/* \ No newline at end of file diff --git a/templates/github/quarkus-web/skeleton/.gitignore b/templates/github/quarkus-web/skeleton/.gitignore deleted file mode 100644 index 693002a0..00000000 --- a/templates/github/quarkus-web/skeleton/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -#Maven -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -release.properties -.flattened-pom.xml - -# Eclipse -.project -.classpath -.settings/ -bin/ - -# IntelliJ -.idea -*.ipr -*.iml -*.iws - -# NetBeans -nb-configuration.xml - -# Visual Studio Code -.vscode -.factorypath - -# OSX -.DS_Store - -# Vim -*.swp -*.swo - -# patch -*.orig -*.rej - -# Local environment -.env diff --git a/templates/github/quarkus-web/skeleton/.mvn/wrapper/.gitignore b/templates/github/quarkus-web/skeleton/.mvn/wrapper/.gitignore deleted file mode 100644 index e72f5e8b..00000000 --- a/templates/github/quarkus-web/skeleton/.mvn/wrapper/.gitignore +++ /dev/null @@ -1 +0,0 @@ -maven-wrapper.jar diff --git a/templates/github/quarkus-web/skeleton/.mvn/wrapper/MavenWrapperDownloader.java b/templates/github/quarkus-web/skeleton/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index 05212d56..00000000 --- a/templates/github/quarkus-web/skeleton/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - private static final String WRAPPER_VERSION = "3.1.1"; - - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = - "https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/" + WRAPPER_VERSION - + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use instead of the - * default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if (mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if (mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if (!outputFile.getParentFile().exists()) { - if (!outputFile.getParentFile().mkdirs()) { - System.out.println("- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() - + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) - throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/templates/github/quarkus-web/skeleton/.mvn/wrapper/maven-wrapper.properties b/templates/github/quarkus-web/skeleton/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 61a2ef15..00000000 --- a/templates/github/quarkus-web/skeleton/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/templates/github/quarkus-web/skeleton/Dockerfile b/templates/github/quarkus-web/skeleton/Dockerfile deleted file mode 100644 index 236ed26a..00000000 --- a/templates/github/quarkus-web/skeleton/Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/${{values.artifact_id}}-jvm . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}}-jvm -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5005 -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}}-jvm -# -# This image uses the `run-java.sh` script to run the application. -# This scripts computes the command line to execute your Java application, and -# includes memory/GC tuning. -# You can configure the behavior using the following environment properties: -# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") -# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options -# in JAVA_OPTS (example: "-Dsome.property=foo") -# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is -# used to calculate a default maximal heap memory based on a containers restriction. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio -# of the container available memory as set here. The default is `50` which means 50% -# of the available memory is used as an upper boundary. You can skip this mechanism by -# setting this value to `0` in which case no `-Xmx` option is added. -# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This -# is used to calculate a default initial heap memory based on the maximum heap memory. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio -# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` -# is used as the initial heap size. You can skip this mechanism by setting this value -# to `0` in which case no `-Xms` option is added (example: "25") -# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. -# This is used to calculate the maximum value of the initial heap memory. If used in -# a container without any memory constraints for the container then this option has -# no effect. If there is a memory constraint then `-Xms` is limited to the value set -# here. The default is 4096MB which means the calculated value of `-Xms` never will -# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") -# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output -# when things are happening. This option, if set to true, will set -# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). -# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: -# true"). -# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). -# - CONTAINER_CORE_LIMIT: A calculated core limit as described in -# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") -# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). -# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. -# (example: "20") -# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. -# (example: "40") -# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. -# (example: "4") -# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus -# previous GC times. (example: "90") -# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") -# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") -# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should -# contain the necessary JRE command-line options to specify the required GC, which -# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). -# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") -# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") -# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be -# accessed directly. (example: "foo.example.com,bar.example.com") -# -### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 - -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' - - -# We make four distinct layers so if there are application changes the library layers can be re-used -COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ -COPY --chown=185 target/quarkus-app/*.jar /deployments/ -COPY --chown=185 target/quarkus-app/app/ /deployments/app/ -COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ - -EXPOSE 8080 -USER 185 -ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/templates/github/quarkus-web/skeleton/README.md b/templates/github/quarkus-web/skeleton/README.md deleted file mode 100644 index 7426b797..00000000 --- a/templates/github/quarkus-web/skeleton/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# ${{values.component_id}} - -${{values.description}} - -## Running the application in dev mode - -You can run your application in dev mode that enables live coding using: - -```shell script -./mvnw compile quarkus:dev -``` - -> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/. - -## Packaging and running the application - -The application can be packaged using: - -```shell script -./mvnw package -``` - -It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. -Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. - -The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. - -If you want to build an _über-jar_, execute the following command: - -```shell script -./mvnw package -Dquarkus.package.type=uber-jar -``` - -The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`. - -## Creating a native executable - -You can create a native executable using: - -```shell script -./mvnw package -Pnative -``` - -Or, if you don't have GraalVM installed, you can run the native executable build in a container using: - -```shell script -./mvnw package -Pnative -Dquarkus.native.container-build=true -``` - -You can then execute your native executable with: `./target/${{values.artifact_id}}-1.0-SNAPSHOT-runner` - -If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling. - -## Related Guides - -- Hibernate ORM with Panache ([guide](https://quarkus.io/guides/hibernate-orm-panache)): Simplify your persistence code - for Hibernate ORM via the active record or the repository pattern -- RESTEasy Classic ([guide](https://quarkus.io/guides/resteasy)): REST endpoint framework implementing JAX-RS and more - -## Provided Code - -### RESTEasy JAX-RS - -Easily start your RESTful Web Services - -[Related guide section...](https://quarkus.io/guides/getting-started#the-jax-rs-resources) diff --git a/templates/github/quarkus-web/skeleton/catalog-info.yaml b/templates/github/quarkus-web/skeleton/catalog-info.yaml deleted file mode 100644 index cc3b8781..00000000 --- a/templates/github/quarkus-web/skeleton/catalog-info.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: ${{values.component_id | dump}} - {%- if values.description %} - description: ${{values.description | dump}} - {%- endif %} - annotations: - argocd/app-name: ${{values.component_id}}-dev - backstage.io/kubernetes-id: ${{values.component_id}} - backstage.io/kubernetes-namespace: ${{values.component_id}}-dev - janus-idp.io/tekton-enabled : 'true' - github.com/project-slug: ${{values.destination}} - quay.io/repository-slug: ${{values.quay_destination | dump}} - backstage.io/techdocs-ref: dir:. - tags: - - java - - quarkus - links: - - url: https://devspaces${{values.cluster}}/#https://github.com/${{values.destination}}?che-editor=che-incubator/che-code/insiders&devfilePath=.devfile-vscode.yaml - title: OpenShift Dev Spaces (VS Code) - icon: web - - url: https://devspaces${{values.cluster}}/#https://github.com/${{values.destination}}?che-editor=che-incubator/che-idea/latest&devfilePath=.devfile-intellij.yaml - title: OpenShift Dev Spaces (JetBrains IntelliJ) - icon: web -spec: - type: service - lifecycle: production - owner: ${{values.owner | dump}} - providesApis: - - ${{values.component_id | dump}} ---- -apiVersion: backstage.io/v1alpha1 -kind: API -metadata: - name: ${{values.component_id | dump}} - {%- if values.description %} - description: ${{values.description | dump}} - {%- endif %} -spec: - type: openapi - lifecycle: production - owner: ${{values.owner | dump}} - definition: - $text: ./openapi.yaml diff --git a/templates/github/quarkus-web/skeleton/docs/application-migration/high-level-onboarding-process.png b/templates/github/quarkus-web/skeleton/docs/application-migration/high-level-onboarding-process.png deleted file mode 100644 index fa710d00..00000000 Binary files a/templates/github/quarkus-web/skeleton/docs/application-migration/high-level-onboarding-process.png and /dev/null differ diff --git a/templates/github/quarkus-web/skeleton/docs/application-migration/learning-path-for-developers.md b/templates/github/quarkus-web/skeleton/docs/application-migration/learning-path-for-developers.md deleted file mode 100644 index b663e479..00000000 --- a/templates/github/quarkus-web/skeleton/docs/application-migration/learning-path-for-developers.md +++ /dev/null @@ -1,27 +0,0 @@ -## Learning Path for Developers - -Learning Path for Developers starting with Containers and OpenShift - -I am a Developer new to containers, Kubernetes, or CI/CD. Where should I start? - -### Highlights: - -The following materials are free, and no prerequisites are needed. - -1. Learning Path on Containers: Start building your skills on containers: - - 1. Learn the Twelve-Factor App to understand the maturity level of your application for containers with 12 Video Session: [12 Factors to Container Success](https://developers.redhat.com/blog/2017/06/22/12-factors-to-cloud-success). - 2. Familiarize with new container terminology with this blog: [A Practical Introduction to Container](https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction#). - 3. Free Self-Paced Video recording about container fundamentals to become comfortable with the technology. The instructor will explain why containers and session will be theoretical and practical:Free Self-Paced Training [Running Containers with Red Hat Technical Overview](https://www.redhat.com/en/services/training/rh065-running-containers-red-hat-technical-overview) (1 hour). - -2. Learning Path on Kubernetes/OpenShift: Start learning about building applications with OpenShift. - - 1. OpenShift Fundamentals: - - - Familiarize yourself with containers in OpenShift and how to build your first application. This is a free Self-Paced Video Training where the instructor will provide theoretical and practical sessions: [Containers, Kubernetes and Red Hat OpenShift Technical Overview](https://www.redhat.com/en/services/training/do080-deploying-containerized-applications-technical-overview) (1 hour). - - 2. Get comfortable with OpenShift by following the Free Self-Paced Training with access to an OpenShift Sandbox environment to gather hands-on experience in building applications: [Getting started with OpenShift](https://developers.redhat.com/learn/openshift/develop-on-openshift). - -3. Learning Path on CI/CD: If you are new to CI/CD concepts, these blogs will help you come up to speed on this practice. - 1. Introduction to a CI/CD concept with additional links to learn about CI/CD Pipelines with OpenShift. https://www.redhat.com/en/topics/devops/what-cicd-pipeline . - 2. Overview of CI/CD revisiting different products available and high-level concepts such as DevOps https://www.redhat.com/en/topics/devops/what-is-ci-cd . diff --git a/templates/github/quarkus-web/skeleton/docs/application-migration/migration-process-overview.md b/templates/github/quarkus-web/skeleton/docs/application-migration/migration-process-overview.md deleted file mode 100644 index d4021cb9..00000000 --- a/templates/github/quarkus-web/skeleton/docs/application-migration/migration-process-overview.md +++ /dev/null @@ -1,6 +0,0 @@ -# Migration Process Overview - -The onboarding process consists of different personas and tasks. -The developer team will start their streamlined onboarding process following a few described steps. - -![High-level onboarding process](high-level-onboarding-process.png) diff --git a/templates/github/quarkus-web/skeleton/docs/application-migration/migration-process-steps.md b/templates/github/quarkus-web/skeleton/docs/application-migration/migration-process-steps.md deleted file mode 100644 index 691fbb05..00000000 --- a/templates/github/quarkus-web/skeleton/docs/application-migration/migration-process-steps.md +++ /dev/null @@ -1,19 +0,0 @@ -# Migration Process Steps - -1. Prerequisites: Onboarding For Developers -2. Adapt Code to Container - Application Modernization - 1. Apply a proven methodology to ensure your source code is ready to move into containers. -3. Build the container Image -4. Running your container Image (Deployment) -5. Integrations: - 1. Understanding the guidelines and practices. - 2. Integrate the application with other systems (security, logging). -6. Promoting your application to LLE: - 1. Understanding the guidelines and procedures to move your application into - 2. Revisit what will be changing in different environments - 1. Create the required secrets - 2. Create the required ConfigMaps -7. Production guidelines and TODO List: - 1. Review Red Hat Production Guidelines - 2. Review the Production Guidelines - 3. Update your Production TODO List diff --git a/templates/github/quarkus-web/skeleton/docs/index.md b/templates/github/quarkus-web/skeleton/docs/index.md deleted file mode 100644 index c2ed4b99..00000000 --- a/templates/github/quarkus-web/skeleton/docs/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# ${{values.component_id}} Documentation - -${{values.description}} diff --git a/templates/github/quarkus-web/skeleton/docs/onboard-openshift.md b/templates/github/quarkus-web/skeleton/docs/onboard-openshift.md deleted file mode 100644 index 48a20796..00000000 --- a/templates/github/quarkus-web/skeleton/docs/onboard-openshift.md +++ /dev/null @@ -1,73 +0,0 @@ -# GUIDE TO ONBOARD DEVELOPERS INTO OPENSHIFT - -A guide for developers and platform engineers to onboard into containers and OpenShift. - -## Introduction - -Platform Team set up the OpenShift clusters. Clusters are ready to allocate workloads. Developers want to migrate their applications, but there needs to be a current process to onboard them. This document provides a template that can be used to design your onboarding process or use it as it is. - -### Developer Team Guide: Where to start for Developers in their modernization Journey - -The Developer Team processes to be ready to start their container journey. - -1. Developer Foundational Learning: Follow the Lear -2. Application Assessment: Apply Twelve-Factor App for Containers. - -[A checklist for The Top Twelve-Factor App for Containers]() - -The application owner and the team will perform a high-Level application assessment to understand the application maturity level, risks, potential changes, and feasibility. - -- [ ] I. Codebase: One codebase tracked in revision control, many deploys -- [ ] II. Dependencies: Explicitly declare and isolate dependencies -- [ ] III. Config: Store config in the environment -- [ ] V. Build, release, run: Strictly separate build and run stages -- [ ] XI. Logs: Treat logs as event streams -- [ ] Security and Compliance: Understand security and compliance to be implemented. - -3. Request Access to OpenShift - -If necessary for your organization, create an automated-repeatable process to gather information about the application and development team. - -### Platform Team Checklist - -This process describes the Platform Team process to grant access to the developer team and application to OpenShift, considering application and team requirements. - -#### Step 1 Project Setup (Platform) - -This process creates all the required resources for the development team and applications based on their requirements. - -##### Platform Team Checklist - -Developers will require a new namespace, access to the namespace, and other requirements to have their applications functional. - -This is a recommended list to start creating your platform guide to successfully onboard teams and applications into OpenShift. - -- [ ] 1- Project Provisioning per Team - - [ ] Create namespaces for Lower Level Environment - - [ ] Give users access to each LLE and registry - - [ ] Projects setup - - [ ] Resource Management -- [ ] 2- Application Configuration in OpenShift - - [ ] Application access (If the team specified the inbound/outbound dependencies) - - [ ] Network policies per each namespace following company guidelines - - [ ] Application route definition - - [ ] Firewall rules setup per each component/dependency -- [ ] 3- CI/CD - - [ ] CI/CD access (For ex. Jenkins/OpenShift Pipelines) - - [ ] OpenShift access to the company registry. For example: [Quay Container Registry](https://quay.io/) -- [ ] 4- Integrations required from OpenShift - - [ ] Access to the Company Application Logging Tooling - - [ ] Create a new index for the application. - - [ ] Access to the Company Observability & Monitoring tooling -- [ ] 5- Security - - [ ] Access to any Auth/Authorization/Policies tool that’s required for the application - - [ ] Create new policies - - [ ] Certificate creation is defined, and guidelines are shared. - - [ ] Access to the Company Vault - - [ ] Access to the certificates repository - - [ ] Create new certificates -- [ ] 6- Send a welcome email to Developers - -#### Step 2 Welcome OpenShift - -Send confirmation to the user. Developers will follow the Developer Guide for Containers. diff --git a/templates/github/quarkus-web/skeleton/mkdocs.yaml b/templates/github/quarkus-web/skeleton/mkdocs.yaml deleted file mode 100644 index fd0d0505..00000000 --- a/templates/github/quarkus-web/skeleton/mkdocs.yaml +++ /dev/null @@ -1,15 +0,0 @@ -site_name: ${{values.component_id}} -site_description: ${{values.description}} -repo_url: https://github.com/${{values.destination}} -edit_uri: edit/main/docs - -plugins: - - techdocs-core - -# Note for content editors, edit only the section below -nav: - - Onboard a developer to OpenShift: onboard-openshift.md - - Application Migration: - - Migration Process Overview: application-migration/migration-process-overview.md - - Migration Process Steps: application-migration/migration-process-steps.md - - Learning Path for Developers: application-migration/learning-path-for-developers.md diff --git a/templates/github/quarkus-web/skeleton/mvnw b/templates/github/quarkus-web/skeleton/mvnw deleted file mode 100644 index eaa3d308..00000000 --- a/templates/github/quarkus-web/skeleton/mvnw +++ /dev/null @@ -1,316 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`\\unset -f command; \\command -v java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/templates/github/quarkus-web/skeleton/mvnw.cmd b/templates/github/quarkus-web/skeleton/mvnw.cmd deleted file mode 100644 index abb7c324..00000000 --- a/templates/github/quarkus-web/skeleton/mvnw.cmd +++ /dev/null @@ -1,188 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% diff --git a/templates/github/quarkus-web/skeleton/openapi.yaml b/templates/github/quarkus-web/skeleton/openapi.yaml deleted file mode 100644 index 06a7229f..00000000 --- a/templates/github/quarkus-web/skeleton/openapi.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -openapi: 3.0.3 -info: - title: quarkus-app API - version: 1.0-SNAPSHOT -servers: -- url: http://localhost:8080 - description: Auto generated value -- url: http://0.0.0.0:8080 - description: Auto generated value -paths: - /hello: - get: - tags: - - Example Resource - responses: - "200": - description: OK - content: - text/plain: - schema: - type: string \ No newline at end of file diff --git a/templates/github/quarkus-web/skeleton/pom.xml b/templates/github/quarkus-web/skeleton/pom.xml deleted file mode 100644 index ea4a9c9a..00000000 --- a/templates/github/quarkus-web/skeleton/pom.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - 4.0.0 - ${{values.group_id}} - ${{values.artifact_id}} - 1.0-SNAPSHOT - - ${{values.artifact_id}} - ${{values.description}} - - - 3.8.1 - 11 - UTF-8 - UTF-8 - quarkus-bom - io.quarkus.platform - 2.11.3.Final - true - 3.0.0-M7 - - - - - ${quarkus.platform.group-id} - ${quarkus.platform.artifact-id} - ${quarkus.platform.version} - pom - import - - - - - - io.quarkus - quarkus-resteasy - - - io.quarkus - quarkus-smallrye-openapi - - - io.quarkus - quarkus-arc - - - io.quarkus - quarkus-junit5 - test - - - io.rest-assured - rest-assured - test - - - - - - ${quarkus.platform.group-id} - quarkus-maven-plugin - ${quarkus.platform.version} - true - - - - build - generate-code - generate-code-tests - - - - - - maven-compiler-plugin - ${compiler-plugin.version} - - - -parameters - - - - - maven-surefire-plugin - ${surefire-plugin.version} - - - org.jboss.logmanager.LogManager - ${maven.home} - - - - - maven-failsafe-plugin - ${surefire-plugin.version} - - - - integration-test - verify - - - - ${project.build.directory}/${project.build.finalName}-runner - - org.jboss.logmanager.LogManager - ${maven.home} - - - - - - - - - - native - - - native - - - - false - native - - - - diff --git a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.jvm b/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.jvm deleted file mode 100644 index ac8c29cc..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.jvm +++ /dev/null @@ -1,94 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/${{values.artifact_id}}-jvm . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}}-jvm -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5005 -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}}-jvm -# -# This image uses the `run-java.sh` script to run the application. -# This scripts computes the command line to execute your Java application, and -# includes memory/GC tuning. -# You can configure the behavior using the following environment properties: -# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") -# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options -# in JAVA_OPTS (example: "-Dsome.property=foo") -# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is -# used to calculate a default maximal heap memory based on a containers restriction. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio -# of the container available memory as set here. The default is `50` which means 50% -# of the available memory is used as an upper boundary. You can skip this mechanism by -# setting this value to `0` in which case no `-Xmx` option is added. -# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This -# is used to calculate a default initial heap memory based on the maximum heap memory. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio -# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` -# is used as the initial heap size. You can skip this mechanism by setting this value -# to `0` in which case no `-Xms` option is added (example: "25") -# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. -# This is used to calculate the maximum value of the initial heap memory. If used in -# a container without any memory constraints for the container then this option has -# no effect. If there is a memory constraint then `-Xms` is limited to the value set -# here. The default is 4096MB which means the calculated value of `-Xms` never will -# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") -# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output -# when things are happening. This option, if set to true, will set -# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). -# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: -# true"). -# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). -# - CONTAINER_CORE_LIMIT: A calculated core limit as described in -# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") -# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). -# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. -# (example: "20") -# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. -# (example: "40") -# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. -# (example: "4") -# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus -# previous GC times. (example: "90") -# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") -# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") -# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should -# contain the necessary JRE command-line options to specify the required GC, which -# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). -# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") -# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") -# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be -# accessed directly. (example: "foo.example.com,bar.example.com") -# -### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 - -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' - - -# We make four distinct layers so if there are application changes the library layers can be re-used -COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ -COPY --chown=185 target/quarkus-app/*.jar /deployments/ -COPY --chown=185 target/quarkus-app/app/ /deployments/app/ -COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ - -EXPOSE 8080 -USER 185 -ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" - diff --git a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.legacy-jar b/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.legacy-jar deleted file mode 100644 index 93d122f7..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.legacy-jar +++ /dev/null @@ -1,90 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -Dquarkus.package.type=legacy-jar -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/${{values.artifact_id}}-legacy-jar . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}}-legacy-jar -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5005 -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}}-legacy-jar -# -# This image uses the `run-java.sh` script to run the application. -# This scripts computes the command line to execute your Java application, and -# includes memory/GC tuning. -# You can configure the behavior using the following environment properties: -# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") -# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options -# in JAVA_OPTS (example: "-Dsome.property=foo") -# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is -# used to calculate a default maximal heap memory based on a containers restriction. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio -# of the container available memory as set here. The default is `50` which means 50% -# of the available memory is used as an upper boundary. You can skip this mechanism by -# setting this value to `0` in which case no `-Xmx` option is added. -# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This -# is used to calculate a default initial heap memory based on the maximum heap memory. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio -# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` -# is used as the initial heap size. You can skip this mechanism by setting this value -# to `0` in which case no `-Xms` option is added (example: "25") -# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. -# This is used to calculate the maximum value of the initial heap memory. If used in -# a container without any memory constraints for the container then this option has -# no effect. If there is a memory constraint then `-Xms` is limited to the value set -# here. The default is 4096MB which means the calculated value of `-Xms` never will -# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") -# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output -# when things are happening. This option, if set to true, will set -# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). -# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: -# true"). -# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). -# - CONTAINER_CORE_LIMIT: A calculated core limit as described in -# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") -# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). -# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. -# (example: "20") -# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. -# (example: "40") -# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. -# (example: "4") -# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus -# previous GC times. (example: "90") -# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") -# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") -# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should -# contain the necessary JRE command-line options to specify the required GC, which -# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). -# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") -# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") -# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be -# accessed directly. (example: "foo.example.com,bar.example.com") -# -### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 - -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' - - -COPY target/lib/* /deployments/lib/ -COPY target/*-runner.jar /deployments/quarkus-run.jar - -EXPOSE 8080 -USER 185 -ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.native b/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.native deleted file mode 100644 index f55acb6e..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.native +++ /dev/null @@ -1,27 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. -# -# Before building the container image run: -# -# ./mvnw package -Pnative -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.native -t quarkus/${{values.artifact_id}} . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}} -# -### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5 -WORKDIR /work/ -RUN chown 1001 /work \ - && chmod "g+rwX" /work \ - && chown 1001:root /work -COPY --chown=1001:root target/*-runner /work/application - -EXPOSE 8080 -USER 1001 - -CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.native-micro b/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.native-micro deleted file mode 100644 index 23311f7e..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/docker/Dockerfile.native-micro +++ /dev/null @@ -1,30 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. -# It uses a micro base image, tuned for Quarkus native executables. -# It reduces the size of the resulting container image. -# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image. -# -# Before building the container image run: -# -# ./mvnw package -Pnative -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/${{values.artifact_id}} . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/${{values.artifact_id}} -# -### -FROM quay.io/quarkus/quarkus-micro-image:1.0 -WORKDIR /work/ -RUN chown 1001 /work \ - && chmod "g+rwX" /work \ - && chown 1001:root /work -COPY --chown=1001:root target/*-runner /work/application - -EXPOSE 8080 -USER 1001 - -CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/templates/github/quarkus-web/skeleton/src/main/java/${{values.java_package_name}}/ExampleResource.java b/templates/github/quarkus-web/skeleton/src/main/java/${{values.java_package_name}}/ExampleResource.java deleted file mode 100644 index 265ab835..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/java/${{values.java_package_name}}/ExampleResource.java +++ /dev/null @@ -1,16 +0,0 @@ -package ${{values.java_package_name}}; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - -@Path("/hello") -public class ExampleResource { - - @GET - @Produces(MediaType.TEXT_PLAIN) - public String hello() { - return "Hello RESTEasy"; - } -} \ No newline at end of file diff --git a/templates/github/quarkus-web/skeleton/src/main/resources/META-INF/resources/index.html b/templates/github/quarkus-web/skeleton/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index 282cc912..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - ${{values.artifact_id}} - 1.0-SNAPSHOT - - - -
-
-
- - - - - quarkus_logo_horizontal_rgb_1280px_reverse - - - - - - - - - - - - - - - - - - -
-
-
- -
-
-
-

You just made a Quarkus application.

-

This page is served by Quarkus.

- Visit the Dev UI -

This page: src/main/resources/META-INF/resources/index.html

-

App configuration: src/main/resources/application.properties

-

Static assets: src/main/resources/META-INF/resources/

-

Code: src/main/java

-

Generated starter code:

-
    -
  • - RESTEasy JAX-RS Easily start your RESTful Web Services -
    @Path: /hello -
    Related guide -
  • - -
-
-
-

Selected extensions

-
    -
  • Container Image S2I
  • -
  • - Hibernate ORM with Panache (guide) -
  • -
  • RESTEasy Classic (guide) -
  • -
  • JDBC Driver - PostgreSQL
  • -
-
Documentation
-

Practical step-by-step guides to help you achieve a specific goal. Use them to help get your work - done.

-
Set up your IDE
-

Everyone has a favorite IDE they like to use to code. Learn how to configure yours to maximize your - Quarkus productivity.

-
-
-
- - diff --git a/templates/github/quarkus-web/skeleton/src/main/resources/application.properties b/templates/github/quarkus-web/skeleton/src/main/resources/application.properties deleted file mode 100644 index dd6d31de..00000000 --- a/templates/github/quarkus-web/skeleton/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -quarkus.http.port=${{values.port}} -quarkus.smallrye-openapi.store-schema-directory=./ \ No newline at end of file diff --git a/templates/github/quarkus-web/skeleton/src/test/java/${{values.java_package_name}}/ExampleResourceIT.java b/templates/github/quarkus-web/skeleton/src/test/java/${{values.java_package_name}}/ExampleResourceIT.java deleted file mode 100644 index ec78ca31..00000000 --- a/templates/github/quarkus-web/skeleton/src/test/java/${{values.java_package_name}}/ExampleResourceIT.java +++ /dev/null @@ -1,8 +0,0 @@ -package ${{values.java_package_name}}; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -public class ExampleResourceIT extends ExampleResourceTest { - // Execute the same tests but in packaged mode. -} diff --git a/templates/github/quarkus-web/skeleton/src/test/java/${{values.java_package_name}}/ExampleResourceTest.java b/templates/github/quarkus-web/skeleton/src/test/java/${{values.java_package_name}}/ExampleResourceTest.java deleted file mode 100644 index c5593dc0..00000000 --- a/templates/github/quarkus-web/skeleton/src/test/java/${{values.java_package_name}}/ExampleResourceTest.java +++ /dev/null @@ -1,21 +0,0 @@ -package ${{values.java_package_name}}; - -import io.quarkus.test.junit.QuarkusTest; -import org.junit.jupiter.api.Test; - -import static io.restassured.RestAssured.given; -import static org.hamcrest.CoreMatchers.is; - -@QuarkusTest -public class ExampleResourceTest { - - @Test - public void testHelloEndpoint() { - given() - .when().get("/hello") - .then() - .statusCode(200) - .body(is("Hello RESTEasy")); - } - -} \ No newline at end of file diff --git a/templates/github/quarkus-web/template.yaml b/templates/github/quarkus-web/template.yaml deleted file mode 100644 index b569f1ad..00000000 --- a/templates/github/quarkus-web/template.yaml +++ /dev/null @@ -1,189 +0,0 @@ -apiVersion: scaffolder.backstage.io/v1beta3 -kind: Template -metadata: - name: quarkus-web-template - title: Quarkus Service with ArgoCD and a Tekton Pipeline - description: Create a simple microservice using Quarkus with ArgoCD and a Tekton Pipeline - tags: - - recommended - - java - - quarkus - - maven -spec: - owner: service@example.com - type: service - parameters: - - title: Provide Information for Application - required: - - component_id - - owner - - java_package_name - properties: - component_id: - title: Name - type: string - description: Unique name of the component - default: my-quarkus-app - ui:field: EntityNamePicker - group_id: - title: Group Id - type: string - default: redhat.janus - description: Maven Group Id - artifact_id: - title: Artifact Id - type: string - default: quarkus-app - description: Maven Artifact Id - java_package_name: - title: Java Package Name - default: org.redhat.janus - type: string - description: Name for the java package. eg (com.redhat.blah) - description: - title: Description - type: string - description: Help others understand what this website is for. - owner: - title: Owner - type: string - description: IdP owner of the component - ui:field: OwnerPicker - ui:options: - allowedKinds: - - Group - - title: Provide Image Registry Information - required: - - image_registry - properties: - image_registry: - title: Image Registry - type: string - enum: - - Openshift - - Quay - dependencies: - image_registry: - oneOf: - - properties: - image_registry: - enum: - - Openshift - image_host: - title: Image Host - type: string - description: Host for storing image - default: image-registry.openshift-image-registry.svc:5000 - - properties: - image_registry: - enum: - - Quay - image_host: - title: Image Host - type: string - description: Host for storing image - default: quay.io - image_organization: - title: Organization - type: string - description: Name of the Quay Organization - - title: Application repository Information - required: - - repoUrl - properties: - repoUrl: - title: Repository Location - type: string - ui:field: RepoUrlPicker - ui:options: - allowedHosts: - - github.com - - steps: - - id: template - name: Generating component - action: fetch:template - input: - url: ./skeleton - copyWithoutTemplating: - - .github/workflows/* - values: - component_id: ${{ parameters.component_id }} - namespace: ${{ parameters.component_id }}-dev - description: ${{ parameters.description }} - group_id: ${{ parameters.group_id }} - artifact_id: ${{ parameters.artifact_id }} - java_package_name: ${{ parameters.java_package_name }} - owner: ${{ parameters.owner }} - cluster: .apps.cluster-xxxxx.xxxxx.sandbox123.opentlc.com - destination: ${{ (parameters.repoUrl | parseRepoUrl).owner }}/${{ (parameters.repoUrl | parseRepoUrl).repo }} - quay_destination: ${{ parameters.image_organization }}/${{ parameters.component_id }} - port: 8080 - - - id: publish - name: Publishing to Source Code Repository - action: publish:github - input: - description: This is ${{ parameters.component_id }} - repoUrl: ${{ parameters.repoUrl }} - defaultBranch: main - protectDefaultBranch: false - repoVisibility: public - - - id: register - name: Registering to the Catalog - action: catalog:register - input: - repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} - catalogInfoPath: '/catalog-info.yaml' - - - id: template-gitops-deployment - name: Generating Deployment Resources - action: fetch:template - input: - url: ./manifests - copyWithoutTemplating: [] - values: - component_id: ${{ parameters.component_id }} - description: ${{ parameters.description }} - destination: https://github.com/${{ (parameters.repoUrl | parseRepoUrl).owner }}/${{ (parameters.repoUrl | parseRepoUrl).repo }}-gitops - source_repository: https://github.com/${{ (parameters.repoUrl | parseRepoUrl).owner }}/${{ (parameters.repoUrl | parseRepoUrl).repo }} - repository_name: ${{ (parameters.repoUrl | parseRepoUrl).repo }} - git_owner: ${{ (parameters.repoUrl | parseRepoUrl).owner }} - cluster: .apps.cluster-xxxxx.xxxxx.sandbox123.opentlc.com - namespace: ${{ parameters.component_id }}-dev - image_registry: ${{ parameters.image_registry }} - image_host: ${{ parameters.image_host }} - image_organization: ${{ parameters.image_organization }} - image_name: ${{ parameters.component_id }} - port: 8080 - deployment_name: quarkus-template - targetPath: ./tenant-gitops - - - id: publish-gitops - name: Publishing to Resource Repository - action: publish:github - input: - repoUrl: github.com?repo=${{ (parameters.repoUrl | parseRepoUrl).repo }}-gitops&owner=${{ (parameters.repoUrl | parseRepoUrl).owner }} - title: gitops resources for ${{ parameters.component_id }} - description: gitops resources for ${{ parameters.component_id }} - sourcePath: ./tenant-gitops - repoVisibility: public - - - id: create-argocd-resources - name: Create ArgoCD Resources - action: argocd:create-resources - input: - appName: ${{ parameters.component_id }}-bootstrap - argoInstance: main - namespace: janus-argocd - repoUrl: https://github.com/${{ (parameters.repoUrl | parseRepoUrl).owner }}/${{ (parameters.repoUrl | parseRepoUrl).repo }}-gitops.git - path: 'argocd/' - - output: - links: - - title: Source Code Repository - url: ${{ steps.publish.output.remoteUrl }} - - title: Open Component in catalog - icon: catalog - entityRef: ${{ steps.register.output.entityRef }}