From ae8f76160f3378f7dc19f829f8243a04497b448c Mon Sep 17 00:00:00 2001 From: iyear Date: Thu, 26 May 2022 13:21:26 +0800 Subject: [PATCH 1/4] refactor: import plugin default configs with `go:embed` refactor: import plugin default configs with `go:embed` --- examples/configs.go | 65 +++++++++++++++++++ examples/plugins/argocd.yaml | 35 ++++++++++ examples/plugins/argocdapp.yaml | 29 +++++++++ examples/plugins/devlake.yaml | 7 ++ .../github-repo-scaffolding-golang.yaml | 19 ++++++ examples/plugins/githubactions-golang.yaml | 48 ++++++++++++++ examples/plugins/githubactions-nodejs.yaml | 22 +++++++ examples/plugins/githubactions-python.yaml | 22 +++++++ .../gitlab-repo-scaffolding-golang.yaml | 19 ++++++ examples/plugins/gitlabci-generic.yaml | 19 ++++++ examples/plugins/gitlabci-golang.yaml | 13 ++++ examples/plugins/hashicorp-vault.yaml | 38 +++++++++++ examples/plugins/helm-generic.yaml | 33 ++++++++++ examples/plugins/jenkins.yaml | 38 +++++++++++ examples/plugins/jira-github-integ.yaml | 23 +++++++ examples/plugins/kube-prometheus.yaml | 34 ++++++++++ examples/plugins/openldap.yaml | 48 ++++++++++++++ examples/plugins/trello-github-integ.yaml | 22 +++++++ examples/plugins/trello.yaml | 17 +++++ internal/pkg/show/config/config.go | 40 ++++++------ internal/pkg/show/config/plugin/argocd.go | 37 ----------- internal/pkg/show/config/plugin/argocdapp.go | 31 --------- internal/pkg/show/config/plugin/devlake.go | 9 --- .../plugin/github-repo-scaffolding-golang.go | 21 ------ .../config/plugin/githubactions-golang.go | 50 -------------- .../config/plugin/githubactions-nodejs.go | 24 ------- .../config/plugin/githubactions-python.go | 24 ------- .../plugin/gitlab-repo-scaffolding-golang.go | 21 ------ .../show/config/plugin/gitlabci-generic.go | 21 ------ .../pkg/show/config/plugin/gitlabci-golang.go | 15 ----- .../pkg/show/config/plugin/hashicorp-vault.go | 40 ------------ .../pkg/show/config/plugin/helm-generic.go | 35 ---------- internal/pkg/show/config/plugin/jenkins.go | 40 ------------ .../show/config/plugin/jira-github-integ.go | 25 ------- .../pkg/show/config/plugin/kube-prometheus.go | 36 ---------- internal/pkg/show/config/plugin/openldap.go | 50 -------------- .../show/config/plugin/trello-github-integ.go | 24 ------- internal/pkg/show/config/plugin/trello.go | 19 ------ 38 files changed, 571 insertions(+), 542 deletions(-) create mode 100644 examples/configs.go create mode 100644 examples/plugins/argocd.yaml create mode 100644 examples/plugins/argocdapp.yaml create mode 100644 examples/plugins/devlake.yaml create mode 100644 examples/plugins/github-repo-scaffolding-golang.yaml create mode 100644 examples/plugins/githubactions-golang.yaml create mode 100644 examples/plugins/githubactions-nodejs.yaml create mode 100644 examples/plugins/githubactions-python.yaml create mode 100644 examples/plugins/gitlab-repo-scaffolding-golang.yaml create mode 100644 examples/plugins/gitlabci-generic.yaml create mode 100644 examples/plugins/gitlabci-golang.yaml create mode 100644 examples/plugins/hashicorp-vault.yaml create mode 100644 examples/plugins/helm-generic.yaml create mode 100644 examples/plugins/jenkins.yaml create mode 100644 examples/plugins/jira-github-integ.yaml create mode 100644 examples/plugins/kube-prometheus.yaml create mode 100644 examples/plugins/openldap.yaml create mode 100644 examples/plugins/trello-github-integ.yaml create mode 100644 examples/plugins/trello.yaml delete mode 100644 internal/pkg/show/config/plugin/argocd.go delete mode 100644 internal/pkg/show/config/plugin/argocdapp.go delete mode 100644 internal/pkg/show/config/plugin/devlake.go delete mode 100644 internal/pkg/show/config/plugin/github-repo-scaffolding-golang.go delete mode 100644 internal/pkg/show/config/plugin/githubactions-golang.go delete mode 100644 internal/pkg/show/config/plugin/githubactions-nodejs.go delete mode 100644 internal/pkg/show/config/plugin/githubactions-python.go delete mode 100644 internal/pkg/show/config/plugin/gitlab-repo-scaffolding-golang.go delete mode 100644 internal/pkg/show/config/plugin/gitlabci-generic.go delete mode 100644 internal/pkg/show/config/plugin/gitlabci-golang.go delete mode 100644 internal/pkg/show/config/plugin/hashicorp-vault.go delete mode 100644 internal/pkg/show/config/plugin/helm-generic.go delete mode 100644 internal/pkg/show/config/plugin/jenkins.go delete mode 100644 internal/pkg/show/config/plugin/jira-github-integ.go delete mode 100644 internal/pkg/show/config/plugin/kube-prometheus.go delete mode 100644 internal/pkg/show/config/plugin/openldap.go delete mode 100644 internal/pkg/show/config/plugin/trello-github-integ.go delete mode 100644 internal/pkg/show/config/plugin/trello.go diff --git a/examples/configs.go b/examples/configs.go new file mode 100644 index 000000000..bb40decdd --- /dev/null +++ b/examples/configs.go @@ -0,0 +1,65 @@ +package examples + +import _ "embed" + +// plugin default config +var ( + //go:embed plugins/argocd.yaml + ArgocdDefaultConfig string + + //go:embed plugins/argocdapp.yaml + ArgocdappDefaultConfig string + + //go:embed plugins/devlake.yaml + DevlakeDefaultConfig string + + //go:embed plugins/github-repo-scaffolding-golang.yaml + GithubRepoScaffoldingGolangDefaultConfig string + + //go:embed plugins/githubactions-golang.yaml + GithubActionsGolangDefaultConfig string + + //go:embed plugins/githubactions-nodejs.yaml + GithubActionsNodejsDefaultConfig string + + //go:embed plugins/githubactions-python.yaml + GithubActionsPythonDefaultConfig string + + //go:embed plugins/gitlabci-generic.yaml + GitlabCIGenericDefaultConfig string + + //go:embed plugins/gitlabci-golang.yaml + GitlabCIGolangDefaultConfig string + + //go:embed plugins/jenkins.yaml + JenkinsDefaultConfig string + + //go:embed plugins/jira-github-integ.yaml + JiraGithubDefaultConfig string + + //go:embed plugins/kube-prometheus.yaml + KubePrometheusDefaultConfig string + + //go:embed plugins/openldap.yaml + OpenldapDefaultConfig string + + //go:embed plugins/trello-github-integ.yaml + TrelloGithubDefaultConfig string + + //go:embed plugins/trello.yaml + TrelloDefaultConfig string + + //go:embed plugins/helm-generic.yaml + HelmGenericDefaultConfig string + + //go:embed plugins/gitlab-repo-scaffolding-golang.yaml + GitLabRepoScaffoldingGolangDefaultConfig string + + //go:embed plugins/hashicorp-vault.yaml + VaultDefaultConfig string +) + +var ( + //go:embed quickstart.yaml + QuickStartConfig string +) diff --git a/examples/plugins/argocd.yaml b/examples/plugins/argocd.yaml new file mode 100644 index 000000000..be3c403ff --- /dev/null +++ b/examples/plugins/argocd.yaml @@ -0,0 +1,35 @@ +tools: + # name of the tool + - name: argocd + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # need to create the namespace or not, default: false + create_namespace: true + repo: + # name of the Helm repo + name: argo + # url of the Helm repo + url: https://argoproj.github.io/argo-helm + # Helm chart information + chart: + # name of the chart + chart_name: argo/argo-cd + # release name of the chart + release_name: argocd + # k8s namespace where ArgoCD will be installed + namespace: argocd + # whether to wait for the release to be deployed or not + wait: true + # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s + timeout: 5m + # whether to perform a CRD upgrade during installation + upgradeCRDs: true + # custom configuration (Optional). You can refer to [ArgoCD values.yaml](https://github.com/argoproj/argo-helm/blob/master/charts/argo-cd/values.yaml) + values_yaml: | + controller: + service: + port: 8080 \ No newline at end of file diff --git a/examples/plugins/argocdapp.yaml b/examples/plugins/argocdapp.yaml new file mode 100644 index 000000000..08571edf7 --- /dev/null +++ b/examples/plugins/argocdapp.yaml @@ -0,0 +1,29 @@ +tools: + # name of the tool + - name: argocdapp + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ "argocd.ARGOCD_INSTANCE_NAME" ] + # options for the plugin + options: + # information on the ArgoCD Application + app: + # name of the ArgoCD Application + name: hello + # where the ArgoCD Application custom resource will be created + namespace: argocd + # destination of the ArgoCD Application + destination: + # on which server to deploy + server: https://kubernetes.default.svc + # in which namespace to deploy + namespace: default + # source of the application + source: + # which values file to use in the Helm chart + valuefile: values.yaml + # path of the Helm chart + path: charts/go-hello-http + # Helm chart repo URL, this is only an example, do not use this + repoURL: YOUR_CHART_REPO_URL \ No newline at end of file diff --git a/examples/plugins/devlake.yaml b/examples/plugins/devlake.yaml new file mode 100644 index 000000000..d04d8eb40 --- /dev/null +++ b/examples/plugins/devlake.yaml @@ -0,0 +1,7 @@ +tools: + # name of the tool + - name: devlake + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] \ No newline at end of file diff --git a/examples/plugins/github-repo-scaffolding-golang.yaml b/examples/plugins/github-repo-scaffolding-golang.yaml new file mode 100644 index 000000000..67447935b --- /dev/null +++ b/examples/plugins/github-repo-scaffolding-golang.yaml @@ -0,0 +1,19 @@ +tools: + # name of the tool + - name: github-repo-scaffolding-golang + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. + owner: YOUR_GITHUB_USERNAME + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + # the repo which you'd like to create; please change the value below. + repo: YOUR_REPO_NAME + # the branch of the repo you'd like to hold the code + branch: main + # the image repo you'd like to push the container image; please change the value below. + image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY \ No newline at end of file diff --git a/examples/plugins/githubactions-golang.yaml b/examples/plugins/githubactions-golang.yaml new file mode 100644 index 000000000..6befa556a --- /dev/null +++ b/examples/plugins/githubactions-golang.yaml @@ -0,0 +1,48 @@ +tools: + # name of the tool + - name: githubactions-golang + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. + owner: YOUR_GITHUB_USERNAME + # the repo where you'd like to setup GitHub Actions; please change the value below to an existing repo. + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + repo: YOUR_REPO_NAME + # programming language specific settings + language: + name: go + # version of the language + version: "1.17" + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main + build: + # default to false + enable: True + # build command, OPTIONAL, the given value below is default value + command: "go build ./..." + test: + # default to false + enable: True + # test command, OPTIONAL, the given value below is default value + command: "go test ./..." + coverage: + # default to false + enable: False + # go test profile subcommand, OPTIONAL, the given value below is default value + profile: "-race -covermode=atomic" + output: "coverage.out" + docker: + # docker build/push related, default to false + enable: True + registry: + # dockerhub or harbor, default to dockerhub + type: dockerhub + # dockerhub/harbor username + username: YOUR_DOCKERHUB_USERNAME + # dockerhub/harbor image repository name + repository: YOUR_DOCKERHUB_REPOSITORY \ No newline at end of file diff --git a/examples/plugins/githubactions-nodejs.yaml b/examples/plugins/githubactions-nodejs.yaml new file mode 100644 index 000000000..68f422237 --- /dev/null +++ b/examples/plugins/githubactions-nodejs.yaml @@ -0,0 +1,22 @@ +tools: + # name of the tool + - name: githubactions-nodejs + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. + owner: YOUR_GITHUB_USERNAME + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + # the repo where you'd like to setup GitHub Actions; please change the value below to an existing repo. + repo: YOUR_REPO_NAME + # programming language specific settings + language: + name: nodejs + # version of the language + version: "16.14" + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main \ No newline at end of file diff --git a/examples/plugins/githubactions-python.yaml b/examples/plugins/githubactions-python.yaml new file mode 100644 index 000000000..9d91e513d --- /dev/null +++ b/examples/plugins/githubactions-python.yaml @@ -0,0 +1,22 @@ +tools: + # name of the tool + - name: githubactions-python + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. + owner: YOUR_GITHUB_USERNAME + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + # the repo where you'd like to setup GitHub Actions; please change the value below to an existing repo. + repo: YOUR_REPO_NAME + # programming language specific settings + language: + name: python + # version of the language + version: "3.8" + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main \ No newline at end of file diff --git a/examples/plugins/gitlab-repo-scaffolding-golang.yaml b/examples/plugins/gitlab-repo-scaffolding-golang.yaml new file mode 100644 index 000000000..3c6c31afc --- /dev/null +++ b/examples/plugins/gitlab-repo-scaffolding-golang.yaml @@ -0,0 +1,19 @@ +tools: + # name of the tool + - name: gitlab-repo-scaffolding-golang + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner. It should be case-sensitive here; strictly use your GitLab user name; please change the value below. + owner: YOUR_GITLAB_USERNAME + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + # the repo which you'd like to create; please change the value below. + repo: YOUR_REPO_NAME + # the branch of the repo you'd like to hold the code + branch: main + # the image repo you'd like to push the container image; please change the value below. + image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY \ No newline at end of file diff --git a/examples/plugins/gitlabci-generic.yaml b/examples/plugins/gitlabci-generic.yaml new file mode 100644 index 000000000..646433192 --- /dev/null +++ b/examples/plugins/gitlabci-generic.yaml @@ -0,0 +1,19 @@ +tools: + # name of the tool + - name: gitlabci-generic + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # owner/repo; "path with namespace" is only GitLab API's way of saying the same thing; please change the values below. + pathWithNamespace: YOUR_GITLAB_USERNAME/YOUR_GITLAB_REPO_NAME + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main + # url of the GitLab CI template + templateURL: https://someplace.com/to/download/your/template + # custom variables keys and values + templateVariables: + key1: value1 + key2: value2 \ No newline at end of file diff --git a/examples/plugins/gitlabci-golang.yaml b/examples/plugins/gitlabci-golang.yaml new file mode 100644 index 000000000..49a151146 --- /dev/null +++ b/examples/plugins/gitlabci-golang.yaml @@ -0,0 +1,13 @@ +tools: + # name of the tool + - name: gitlabci-golang + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # owner/repo; "path with namespace" is only GitLab API's way of saying the same thing; please change the values below. + pathWithNamespace: YOUR_GITLAB_USERNAME/YOUR_GITLAB_REPO_NAME + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main \ No newline at end of file diff --git a/examples/plugins/hashicorp-vault.yaml b/examples/plugins/hashicorp-vault.yaml new file mode 100644 index 000000000..cb1bfe390 --- /dev/null +++ b/examples/plugins/hashicorp-vault.yaml @@ -0,0 +1,38 @@ +tools: + - name: hashicorp-vault + # id of the tool instance + instanceID: default + options: + # need to create the namespace or not, default: false + create_namespace: true + repo: + # name of the Helm repo + name: hashicorp + # url of the Helm repo + url: https://helm.releases.hashicorp.com + # Helm chart information + chart: + # name of the chart + chart_name: hashicorp/vault + # release name of the chart + release_name: vault + # k8s namespace where Vault will be installed + namespace: hashicorp + # whether to wait for the release to be deployed or not + wait: true + # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s + timeout: 5m + values_yaml: | + global: + enabled: true + server: + affinity: "" + ha: + enabled: true + replicas: 3 + raft: + enabled: true + setNodeId: true + namespaceSelector: + matchLabels: + injection: enabled \ No newline at end of file diff --git a/examples/plugins/helm-generic.yaml b/examples/plugins/helm-generic.yaml new file mode 100644 index 000000000..0b01cdf73 --- /dev/null +++ b/examples/plugins/helm-generic.yaml @@ -0,0 +1,33 @@ +tools: + # name of the tool + - name: helm-generic + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # need to create the namespace or not, default: false + create_namespace: true + repo: + # name of the Helm repo, e.g. argo + name: HELM_REPO_NAME + # url of the Helm repo, e.g. https://argoproj.github.io/argo-helm + url: YOUR_CHART_REPO + # Helm chart information + chart: + # name of the chart, e.g. argo/argo-cd + chart_name: CHART_NAME + # release name of the chart, e.g. argocd + release_name: RELEASE_NAME + # k8s namespace, e.g. argocd + namespace: YOUR_CHART_NAMESPACE + # whether to wait for the release to be deployed or not + wait: true + # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s + timeout: 5m + # whether to perform a CRD upgrade during installation + upgradeCRDs: true + # custom configuration (Optional). e.g. You can refer to [ArgoCD values.yaml](https://github.com/argoproj/argo-helm/blob/master/charts/argo-cd/values.yaml) + values_yaml: | + FOO: BAR \ No newline at end of file diff --git a/examples/plugins/jenkins.yaml b/examples/plugins/jenkins.yaml new file mode 100644 index 000000000..1751e8adb --- /dev/null +++ b/examples/plugins/jenkins.yaml @@ -0,0 +1,38 @@ +tools: + # name of the tool + - name: jenkins + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # need to create the namespace or not, default: false + create_namespace: false + # Helm repo information + repo: + # name of the Helm repo + name: jenkins + # url of the Helm repo + url: https://charts.jenkins.io + # Helm chart information + chart: + # name of the chart + chart_name: jenkins/jenkins + # release name of the chart + release_name: dev + # k8s namespace where jenkins will be installed + namespace: jenkins + # whether to wait for the release to be deployed or not + wait: true + # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s + timeout: 5m + # whether to perform a CRD upgrade during installation + upgradeCRDs: true + # custom configuration (Optional). You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) + values_yaml: | + persistence: + storageClass: jenkins-pv + serviceAccount: + create: false + name: jenkins \ No newline at end of file diff --git a/examples/plugins/jira-github-integ.yaml b/examples/plugins/jira-github-integ.yaml new file mode 100644 index 000000000..937c7274d --- /dev/null +++ b/examples/plugins/jira-github-integ.yaml @@ -0,0 +1,23 @@ +tools: + # name of the tool + - name: jira-github-integ + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner + owner: YOUR_GITHUB_USERNAME + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + # the repo where you'd like to setup GitHub Actions + repo: YOUR_REPO_NAME + # "base url: https://id.atlassian.net" + jiraBaseUrl: https://JIRA_ID.atlassian.net + # "need real user email in cloud Jira" + jiraUserEmail: JIRA_USER_EMAIL + # "get it from project url, like 'HEAP' from https://merico.atlassian.net/jira/software/projects/HEAP/pages" + jiraProjectKey: JIRA_PROJECT_KEY + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main \ No newline at end of file diff --git a/examples/plugins/kube-prometheus.yaml b/examples/plugins/kube-prometheus.yaml new file mode 100644 index 000000000..833113f7e --- /dev/null +++ b/examples/plugins/kube-prometheus.yaml @@ -0,0 +1,34 @@ +tools: + # name of the tool + - name: kube-prometheus + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # need to create the namespace or not, default: false + create_namespace: false + # Helm repo information + repo: + # name of the Helm repo + name: prometheus-community + # url of the Helm repo + url: https://prometheus-community.github.io/helm-charts + # Helm chart information + chart: + # name of the chart + chart_name: prometheus-community/kube-prometheus-stack + # release name of the chart + release_name: dev + # k8s namespace where kube-prometheus will be installed + namespace: monitoring + # whether to wait for the release to be deployed or not + wait: true + # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s + timeout: 5m + # whether to perform a CRD upgrade during installation + upgradeCRDs: true + # custom configuration (Optional). You can refer to [kube-prometheus-stack values.yaml](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml) + values_yaml: | + namespaceOverride: "monitoring" \ No newline at end of file diff --git a/examples/plugins/openldap.yaml b/examples/plugins/openldap.yaml new file mode 100644 index 000000000..3e13582c4 --- /dev/null +++ b/examples/plugins/openldap.yaml @@ -0,0 +1,48 @@ +tools: + # name of the tool + - name: openldap + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ ] + # options for the plugin + options: + # need to create the namespace or not, default: false + create_namespace: true + repo: + # name of the Helm repo + name: helm-openldap + # url of the Helm repo + url: https://jp-gouin.github.io/helm-openldap/ + # Helm chart information + chart: + # name of the chart + chart_name: helm-openldap/openldap-stack-ha + # release name of the chart + release_name: openldap + # k8s namespace where OpenLDAP will be installed + namespace: openldap + # whether to wait for the release to be deployed or not + wait: true + # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s + timeout: 5m + # custom configuration (Optional). You can refer to https://github.com/jp-gouin/helm-openldap/blob/master/values.yaml + values_yaml: | + replicaCount: 1 + service: + type: NodePort + env: + LDAP_ORGANISATION: "DevStream Inc." + LDAP_DOMAIN: "devstream.io" + persistence: + enabled: false + adminPassword: Not@SecurePassw0rd + configPassword: Not@SecurePassw0rd + + ltb-passwd: + enabled : false + + phpldapadmin: + enabled: true + ingress: + enabled: false \ No newline at end of file diff --git a/examples/plugins/trello-github-integ.yaml b/examples/plugins/trello-github-integ.yaml new file mode 100644 index 000000000..2c389c941 --- /dev/null +++ b/examples/plugins/trello-github-integ.yaml @@ -0,0 +1,22 @@ +tools: + # name of the tool + - name: trello-github-integ + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. + dependsOn: [ "trello.default" ] + # options for the plugin + options: + # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. + owner: YOUR_GITHUB_USERNAME + # the repo where you'd like to setup GitHub Actions; please change the value below. + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + repo: YOUR_REPO_NAME + # reference parameters come from dependency, their usage will be explained later + boardId: ${{ trello.default.outputs.boardId }} + todoListId: ${{ trello.default.outputs.todoListId }} + doingListId: ${{ trello.default.outputs.doingListId }} + doneListId: ${{ trello.default.outputs.doneListId }} + # main branch of the repo (to which branch the plugin will submit the workflows) + branch: main \ No newline at end of file diff --git a/examples/plugins/trello.yaml b/examples/plugins/trello.yaml new file mode 100644 index 000000000..d1e7210a1 --- /dev/null +++ b/examples/plugins/trello.yaml @@ -0,0 +1,17 @@ +tools: + # name of the tool + - name: trello + # id of the tool instance + instanceID: default + # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool + dependsOn: [ ] + # options for the plugin + options: + # the repo's owner + owner: YOUR_GITHUB_USERNAME + # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. + org: YOUR_ORGANIZATION_NAME + # for which repo this board will be used + repo: YOUR_REPO_NAME + # the Tello board name. If empty, use owner/repo as the board's name. + kanbanBoardName: KANBAN_BOARD_NAME \ No newline at end of file diff --git a/internal/pkg/show/config/config.go b/internal/pkg/show/config/config.go index a839be504..0a4bbdb16 100644 --- a/internal/pkg/show/config/config.go +++ b/internal/pkg/show/config/config.go @@ -3,30 +3,30 @@ package config import ( "fmt" - "github.com/spf13/viper" + "github.com/devstream-io/devstream/examples" - "github.com/devstream-io/devstream/internal/pkg/show/config/plugin" + "github.com/spf13/viper" ) var pluginDefaultConfigs = map[string]string{ - "argocd": plugin.ArgocdDefaultConfig, - "argocdapp": plugin.ArgocdappDefaultConfig, - "devlake": plugin.DevlakeDefaultConfig, - "github-repo-scaffolding-golang": plugin.GithubRepoScaffoldingGolangDefaultConfig, - "githubactions-golang": plugin.GithubActionsGolangDefaultConfig, - "githubactions-nodejs": plugin.GithubActionsNodejsDefaultConfig, - "githubactions-python": plugin.GithubActionsPythonDefaultConfig, - "gitlabci-generic": plugin.GitlabCIGenericDefaultConfig, - "gitlabci-golang": plugin.GitlabCIGolangDefaultConfig, - "jenkins": plugin.JenkinsDefaultConfig, - "jira-github-integ": plugin.JiraGithubDefaultConfig, - "kube-prometheus": plugin.KubePrometheusDefaultConfig, - "openldap": plugin.OpenldapDefaultConfig, - "trello-github-integ": plugin.TrelloGithubDefaultConfig, - "trello": plugin.TrelloDefaultConfig, - "helm-generic": plugin.HelmGenericDefaultConfig, - "gitlab-repo-scaffolding-golang": plugin.GitLabRepoScaffoldingGolangDefaultConfig, - "hashicorp-vault": plugin.VaultDefaultConfig, + "argocd": examples.ArgocdDefaultConfig, + "argocdapp": examples.ArgocdappDefaultConfig, + "devlake": examples.DevlakeDefaultConfig, + "github-repo-scaffolding-golang": examples.GithubRepoScaffoldingGolangDefaultConfig, + "githubactions-golang": examples.GithubActionsGolangDefaultConfig, + "githubactions-nodejs": examples.GithubActionsNodejsDefaultConfig, + "githubactions-python": examples.GithubActionsPythonDefaultConfig, + "gitlabci-generic": examples.GitlabCIGenericDefaultConfig, + "gitlabci-golang": examples.GitlabCIGolangDefaultConfig, + "jenkins": examples.JenkinsDefaultConfig, + "jira-github-integ": examples.JiraGithubDefaultConfig, + "kube-prometheus": examples.KubePrometheusDefaultConfig, + "openldap": examples.OpenldapDefaultConfig, + "trello-github-integ": examples.TrelloGithubDefaultConfig, + "trello": examples.TrelloDefaultConfig, + "helm-generic": examples.HelmGenericDefaultConfig, + "gitlab-repo-scaffolding-golang": examples.GitLabRepoScaffoldingGolangDefaultConfig, + "hashicorp-vault": examples.VaultDefaultConfig, } func Show() error { diff --git a/internal/pkg/show/config/plugin/argocd.go b/internal/pkg/show/config/plugin/argocd.go deleted file mode 100644 index eb1bd3acc..000000000 --- a/internal/pkg/show/config/plugin/argocd.go +++ /dev/null @@ -1,37 +0,0 @@ -package plugin - -var ArgocdDefaultConfig = `tools: -# name of the tool -- name: argocd - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # need to create the namespace or not, default: false - create_namespace: true - repo: - # name of the Helm repo - name: argo - # url of the Helm repo - url: https://argoproj.github.io/argo-helm - # Helm chart information - chart: - # name of the chart - chart_name: argo/argo-cd - # release name of the chart - release_name: argocd - # k8s namespace where ArgoCD will be installed - namespace: argocd - # whether to wait for the release to be deployed or not - wait: true - # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s - timeout: 5m - # whether to perform a CRD upgrade during installation - upgradeCRDs: true - # custom configuration (Optional). You can refer to [ArgoCD values.yaml](https://github.com/argoproj/argo-helm/blob/master/charts/argo-cd/values.yaml) - values_yaml: | - controller: - service: - port: 8080` diff --git a/internal/pkg/show/config/plugin/argocdapp.go b/internal/pkg/show/config/plugin/argocdapp.go deleted file mode 100644 index 337c1c12f..000000000 --- a/internal/pkg/show/config/plugin/argocdapp.go +++ /dev/null @@ -1,31 +0,0 @@ -package plugin - -var ArgocdappDefaultConfig = `tools: -# name of the tool -- name: argocdapp - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [ "argocd.ARGOCD_INSTANCE_NAME" ] - # options for the plugin - options: - # information on the ArgoCD Application - app: - # name of the ArgoCD Application - name: hello - # where the ArgoCD Application custom resource will be created - namespace: argocd - # destination of the ArgoCD Application - destination: - # on which server to deploy - server: https://kubernetes.default.svc - # in which namespace to deploy - namespace: default - # source of the application - source: - # which values file to use in the Helm chart - valuefile: values.yaml - # path of the Helm chart - path: charts/go-hello-http - # Helm chart repo URL, this is only an example, do not use this - repoURL: YOUR_CHART_REPO_URL` diff --git a/internal/pkg/show/config/plugin/devlake.go b/internal/pkg/show/config/plugin/devlake.go deleted file mode 100644 index 72c998c66..000000000 --- a/internal/pkg/show/config/plugin/devlake.go +++ /dev/null @@ -1,9 +0,0 @@ -package plugin - -var DevlakeDefaultConfig = `tools: -# name of the tool -- name: devlake - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: []` diff --git a/internal/pkg/show/config/plugin/github-repo-scaffolding-golang.go b/internal/pkg/show/config/plugin/github-repo-scaffolding-golang.go deleted file mode 100644 index 9c60ad95d..000000000 --- a/internal/pkg/show/config/plugin/github-repo-scaffolding-golang.go +++ /dev/null @@ -1,21 +0,0 @@ -package plugin - -var GithubRepoScaffoldingGolangDefaultConfig = `tools: -# name of the tool -- name: github-repo-scaffolding-golang - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. - owner: YOUR_GITHUB_USERNAME - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - # the repo which you'd like to create; please change the value below. - repo: YOUR_REPO_NAME - # the branch of the repo you'd like to hold the code - branch: main - # the image repo you'd like to push the container image; please change the value below. - image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY` diff --git a/internal/pkg/show/config/plugin/githubactions-golang.go b/internal/pkg/show/config/plugin/githubactions-golang.go deleted file mode 100644 index 4e4434e46..000000000 --- a/internal/pkg/show/config/plugin/githubactions-golang.go +++ /dev/null @@ -1,50 +0,0 @@ -package plugin - -var GithubActionsGolangDefaultConfig = `tools: -# name of the tool -- name: githubactions-golang - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. - owner: YOUR_GITHUB_USERNAME - # the repo where you'd like to setup GitHub Actions; please change the value below to an existing repo. - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - repo: YOUR_REPO_NAME - # programming language specific settings - language: - name: go - # version of the language - version: "1.17" - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main - build: - # default to false - enable: True - # build command, OPTIONAL, the given value below is default value - command: "go build ./..." - test: - # default to false - enable: True - # test command, OPTIONAL, the given value below is default value - command: "go test ./..." - coverage: - # default to false - enable: False - # go test profile subcommand, OPTIONAL, the given value below is default value - profile: "-race -covermode=atomic" - output: "coverage.out" - docker: - # docker build/push related, default to false - enable: True - registry: - # dockerhub or harbor, default to dockerhub - type: dockerhub - # dockerhub/harbor username - username: YOUR_DOCKERHUB_USERNAME - # dockerhub/harbor image repository name - repository: YOUR_DOCKERHUB_REPOSITORY` diff --git a/internal/pkg/show/config/plugin/githubactions-nodejs.go b/internal/pkg/show/config/plugin/githubactions-nodejs.go deleted file mode 100644 index 48f58ff09..000000000 --- a/internal/pkg/show/config/plugin/githubactions-nodejs.go +++ /dev/null @@ -1,24 +0,0 @@ -package plugin - -var GithubActionsNodejsDefaultConfig = `tools: -# name of the tool -- name: githubactions-nodejs - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. - owner: YOUR_GITHUB_USERNAME - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - # the repo where you'd like to setup GitHub Actions; please change the value below to an existing repo. - repo: YOUR_REPO_NAME - # programming language specific settings - language: - name: nodejs - # version of the language - version: "16.14" - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main` diff --git a/internal/pkg/show/config/plugin/githubactions-python.go b/internal/pkg/show/config/plugin/githubactions-python.go deleted file mode 100644 index 47e10ee5c..000000000 --- a/internal/pkg/show/config/plugin/githubactions-python.go +++ /dev/null @@ -1,24 +0,0 @@ -package plugin - -var GithubActionsPythonDefaultConfig = `tools: -# name of the tool -- name: githubactions-python - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. - owner: YOUR_GITHUB_USERNAME - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - # the repo where you'd like to setup GitHub Actions; please change the value below to an existing repo. - repo: YOUR_REPO_NAME - # programming language specific settings - language: - name: python - # version of the language - version: "3.8" - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main` diff --git a/internal/pkg/show/config/plugin/gitlab-repo-scaffolding-golang.go b/internal/pkg/show/config/plugin/gitlab-repo-scaffolding-golang.go deleted file mode 100644 index 9c9d64414..000000000 --- a/internal/pkg/show/config/plugin/gitlab-repo-scaffolding-golang.go +++ /dev/null @@ -1,21 +0,0 @@ -package plugin - -var GitLabRepoScaffoldingGolangDefaultConfig = `tools: -# name of the tool -- name: gitlab-repo-scaffolding-golang - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # the repo's owner. It should be case-sensitive here; strictly use your GitLab user name; please change the value below. - owner: YOUR_GITLAB_USERNAME - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - # the repo which you'd like to create; please change the value below. - repo: YOUR_REPO_NAME - # the branch of the repo you'd like to hold the code - branch: main - # the image repo you'd like to push the container image; please change the value below. - image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY` diff --git a/internal/pkg/show/config/plugin/gitlabci-generic.go b/internal/pkg/show/config/plugin/gitlabci-generic.go deleted file mode 100644 index d1aa8fe02..000000000 --- a/internal/pkg/show/config/plugin/gitlabci-generic.go +++ /dev/null @@ -1,21 +0,0 @@ -package plugin - -var GitlabCIGenericDefaultConfig = `tools: -# name of the tool -- name: gitlabci-generic - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # owner/repo; "path with namespace" is only GitLab API's way of saying the same thing; please change the values below. - pathWithNamespace: YOUR_GITLAB_USERNAME/YOUR_GITLAB_REPO_NAME - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main - # url of the GitLab CI template - templateURL: https://someplace.com/to/download/your/template - # custom variables keys and values - templateVariables: - key1: value1 - key2: value2` diff --git a/internal/pkg/show/config/plugin/gitlabci-golang.go b/internal/pkg/show/config/plugin/gitlabci-golang.go deleted file mode 100644 index 3a79a3adb..000000000 --- a/internal/pkg/show/config/plugin/gitlabci-golang.go +++ /dev/null @@ -1,15 +0,0 @@ -package plugin - -var GitlabCIGolangDefaultConfig = `tools: -# name of the tool -- name: gitlabci-golang - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # owner/repo; "path with namespace" is only GitLab API's way of saying the same thing; please change the values below. - pathWithNamespace: YOUR_GITLAB_USERNAME/YOUR_GITLAB_REPO_NAME - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main` diff --git a/internal/pkg/show/config/plugin/hashicorp-vault.go b/internal/pkg/show/config/plugin/hashicorp-vault.go deleted file mode 100644 index 84d31522b..000000000 --- a/internal/pkg/show/config/plugin/hashicorp-vault.go +++ /dev/null @@ -1,40 +0,0 @@ -package plugin - -var VaultDefaultConfig = `tools: -- name: hashicorp-vault - # id of the tool instance - instanceID: default - options: - # need to create the namespace or not, default: false - create_namespace: true - repo: - # name of the Helm repo - name: hashicorp - # url of the Helm repo - url: https://helm.releases.hashicorp.com - # Helm chart information - chart: - # name of the chart - chart_name: hashicorp/vault - # release name of the chart - release_name: vault - # k8s namespace where Vault will be installed - namespace: hashicorp - # whether to wait for the release to be deployed or not - wait: true - # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s - timeout: 5m - values_yaml: | - global: - enabled: true - server: - affinity: "" - ha: - enabled: true - replicas: 3 - raft: - enabled: true - setNodeId: true - namespaceSelector: - matchLabels: - injection: enabled` diff --git a/internal/pkg/show/config/plugin/helm-generic.go b/internal/pkg/show/config/plugin/helm-generic.go deleted file mode 100644 index c20338d8e..000000000 --- a/internal/pkg/show/config/plugin/helm-generic.go +++ /dev/null @@ -1,35 +0,0 @@ -package plugin - -var HelmGenericDefaultConfig = `tools: -# name of the tool -- name: helm-generic - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # need to create the namespace or not, default: false - create_namespace: true - repo: - # name of the Helm repo, e.g. argo - name: HELM_REPO_NAME - # url of the Helm repo, e.g. https://argoproj.github.io/argo-helm - url: YOUR_CHART_REPO - # Helm chart information - chart: - # name of the chart, e.g. argo/argo-cd - chart_name: CHART_NAME - # release name of the chart, e.g. argocd - release_name: RELEASE_NAME - # k8s namespace, e.g. argocd - namespace: YOUR_CHART_NAMESPACE - # whether to wait for the release to be deployed or not - wait: true - # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s - timeout: 5m - # whether to perform a CRD upgrade during installation - upgradeCRDs: true - # custom configuration (Optional). e.g. You can refer to [ArgoCD values.yaml](https://github.com/argoproj/argo-helm/blob/master/charts/argo-cd/values.yaml) - values_yaml: | - FOO: BAR` diff --git a/internal/pkg/show/config/plugin/jenkins.go b/internal/pkg/show/config/plugin/jenkins.go deleted file mode 100644 index 32574674f..000000000 --- a/internal/pkg/show/config/plugin/jenkins.go +++ /dev/null @@ -1,40 +0,0 @@ -package plugin - -var JenkinsDefaultConfig = `tools: -# name of the tool -- name: jenkins - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # need to create the namespace or not, default: false - create_namespace: false - # Helm repo information - repo: - # name of the Helm repo - name: jenkins - # url of the Helm repo - url: https://charts.jenkins.io - # Helm chart information - chart: - # name of the chart - chart_name: jenkins/jenkins - # release name of the chart - release_name: dev - # k8s namespace where jenkins will be installed - namespace: jenkins - # whether to wait for the release to be deployed or not - wait: true - # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s - timeout: 5m - # whether to perform a CRD upgrade during installation - upgradeCRDs: true - # custom configuration (Optional). You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) - values_yaml: | - persistence: - storageClass: jenkins-pv - serviceAccount: - create: false - name: jenkins` diff --git a/internal/pkg/show/config/plugin/jira-github-integ.go b/internal/pkg/show/config/plugin/jira-github-integ.go deleted file mode 100644 index 937475767..000000000 --- a/internal/pkg/show/config/plugin/jira-github-integ.go +++ /dev/null @@ -1,25 +0,0 @@ -package plugin - -var JiraGithubDefaultConfig = `tools: -# name of the tool -- name: jira-github-integ - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # the repo's owner - owner: YOUR_GITHUB_USERNAME - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - # the repo where you'd like to setup GitHub Actions - repo: YOUR_REPO_NAME - # "base url: https://id.atlassian.net" - jiraBaseUrl: https://JIRA_ID.atlassian.net - # "need real user email in cloud Jira" - jiraUserEmail: JIRA_USER_EMAIL - # "get it from project url, like 'HEAP' from https://merico.atlassian.net/jira/software/projects/HEAP/pages" - jiraProjectKey: JIRA_PROJECT_KEY - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main` diff --git a/internal/pkg/show/config/plugin/kube-prometheus.go b/internal/pkg/show/config/plugin/kube-prometheus.go deleted file mode 100644 index bf660da25..000000000 --- a/internal/pkg/show/config/plugin/kube-prometheus.go +++ /dev/null @@ -1,36 +0,0 @@ -package plugin - -var KubePrometheusDefaultConfig = `tools: -# name of the tool -- name: kube-prometheus - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # need to create the namespace or not, default: false - create_namespace: false - # Helm repo information - repo: - # name of the Helm repo - name: prometheus-community - # url of the Helm repo - url: https://prometheus-community.github.io/helm-charts - # Helm chart information - chart: - # name of the chart - chart_name: prometheus-community/kube-prometheus-stack - # release name of the chart - release_name: dev - # k8s namespace where kube-prometheus will be installed - namespace: monitoring - # whether to wait for the release to be deployed or not - wait: true - # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s - timeout: 5m - # whether to perform a CRD upgrade during installation - upgradeCRDs: true - # custom configuration (Optional). You can refer to [kube-prometheus-stack values.yaml](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml) - values_yaml: | - namespaceOverride: "monitoring"` diff --git a/internal/pkg/show/config/plugin/openldap.go b/internal/pkg/show/config/plugin/openldap.go deleted file mode 100644 index b318f1b89..000000000 --- a/internal/pkg/show/config/plugin/openldap.go +++ /dev/null @@ -1,50 +0,0 @@ -package plugin - -var OpenldapDefaultConfig = `tools: -# name of the tool -- name: openldap - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [] - # options for the plugin - options: - # need to create the namespace or not, default: false - create_namespace: true - repo: - # name of the Helm repo - name: helm-openldap - # url of the Helm repo - url: https://jp-gouin.github.io/helm-openldap/ - # Helm chart information - chart: - # name of the chart - chart_name: helm-openldap/openldap-stack-ha - # release name of the chart - release_name: openldap - # k8s namespace where OpenLDAP will be installed - namespace: openldap - # whether to wait for the release to be deployed or not - wait: true - # the time to wait for any individual Kubernetes operation (like Jobs for hooks). This defaults to 5m0s - timeout: 5m - # custom configuration (Optional). You can refer to https://github.com/jp-gouin/helm-openldap/blob/master/values.yaml - values_yaml: | - replicaCount: 1 - service: - type: NodePort - env: - LDAP_ORGANISATION: "DevStream Inc." - LDAP_DOMAIN: "devstream.io" - persistence: - enabled: false - adminPassword: Not@SecurePassw0rd - configPassword: Not@SecurePassw0rd - - ltb-passwd: - enabled : false - - phpldapadmin: - enabled: true - ingress: - enabled: false` diff --git a/internal/pkg/show/config/plugin/trello-github-integ.go b/internal/pkg/show/config/plugin/trello-github-integ.go deleted file mode 100644 index f6a6b98ba..000000000 --- a/internal/pkg/show/config/plugin/trello-github-integ.go +++ /dev/null @@ -1,24 +0,0 @@ -package plugin - -var TrelloGithubDefaultConfig = `tools: -# name of the tool -- name: trello-github-integ - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [ "trello.default" ] - # options for the plugin - options: - # the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below. - owner: YOUR_GITHUB_USERNAME - # the repo where you'd like to setup GitHub Actions; please change the value below. - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - repo: YOUR_REPO_NAME - # reference parameters come from dependency, their usage will be explained later - boardId: ${{ trello.default.outputs.boardId }} - todoListId: ${{ trello.default.outputs.todoListId }} - doingListId: ${{ trello.default.outputs.doingListId }} - doneListId: ${{ trello.default.outputs.doneListId }} - # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main` diff --git a/internal/pkg/show/config/plugin/trello.go b/internal/pkg/show/config/plugin/trello.go deleted file mode 100644 index c7e481ae1..000000000 --- a/internal/pkg/show/config/plugin/trello.go +++ /dev/null @@ -1,19 +0,0 @@ -package plugin - -var TrelloDefaultConfig = `tools: -# name of the tool -- name: trello - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool - dependsOn: [] - # options for the plugin - options: - # the repo's owner - owner: YOUR_GITHUB_USERNAME - # the repo's org. If you set this property, then the new repo will be created under the org you're given, and the "owner" setting above will be ignored. - org: YOUR_ORGANIZATION_NAME - # for which repo this board will be used - repo: YOUR_REPO_NAME - # the Tello board name. If empty, use owner/repo as the board's name. - kanbanBoardName: KANBAN_BOARD_NAME` From 2e50a0470eb26956d4a917a94ffc345e063e8604 Mon Sep 17 00:00:00 2001 From: iyear Date: Thu, 26 May 2022 17:34:20 +0800 Subject: [PATCH 2/4] refactor: move yaml files --- examples/configs.go | 65 ------------------- internal/pkg/show/config/config.go | 38 +++++------ internal/pkg/show/config/defaultconfig.go | 59 +++++++++++++++++ .../pkg/show/config}/plugins/argocd.yaml | 0 .../pkg/show/config}/plugins/argocdapp.yaml | 0 .../pkg/show/config}/plugins/devlake.yaml | 0 .../github-repo-scaffolding-golang.yaml | 0 .../config}/plugins/githubactions-golang.yaml | 0 .../config}/plugins/githubactions-nodejs.yaml | 0 .../config}/plugins/githubactions-python.yaml | 0 .../gitlab-repo-scaffolding-golang.yaml | 0 .../config}/plugins/gitlabci-generic.yaml | 0 .../show/config}/plugins/gitlabci-golang.yaml | 0 .../show/config}/plugins/hashicorp-vault.yaml | 0 .../show/config}/plugins/helm-generic.yaml | 0 .../pkg/show/config}/plugins/jenkins.yaml | 0 .../config}/plugins/jira-github-integ.yaml | 0 .../show/config}/plugins/kube-prometheus.yaml | 0 .../pkg/show/config}/plugins/openldap.yaml | 0 .../config}/plugins/trello-github-integ.yaml | 0 .../pkg/show/config}/plugins/trello.yaml | 0 21 files changed, 77 insertions(+), 85 deletions(-) delete mode 100644 examples/configs.go rename {examples => internal/pkg/show/config}/plugins/argocd.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/argocdapp.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/devlake.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/github-repo-scaffolding-golang.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/githubactions-golang.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/githubactions-nodejs.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/githubactions-python.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/gitlab-repo-scaffolding-golang.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/gitlabci-generic.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/gitlabci-golang.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/hashicorp-vault.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/helm-generic.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/jenkins.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/jira-github-integ.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/kube-prometheus.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/openldap.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/trello-github-integ.yaml (100%) rename {examples => internal/pkg/show/config}/plugins/trello.yaml (100%) diff --git a/examples/configs.go b/examples/configs.go deleted file mode 100644 index bb40decdd..000000000 --- a/examples/configs.go +++ /dev/null @@ -1,65 +0,0 @@ -package examples - -import _ "embed" - -// plugin default config -var ( - //go:embed plugins/argocd.yaml - ArgocdDefaultConfig string - - //go:embed plugins/argocdapp.yaml - ArgocdappDefaultConfig string - - //go:embed plugins/devlake.yaml - DevlakeDefaultConfig string - - //go:embed plugins/github-repo-scaffolding-golang.yaml - GithubRepoScaffoldingGolangDefaultConfig string - - //go:embed plugins/githubactions-golang.yaml - GithubActionsGolangDefaultConfig string - - //go:embed plugins/githubactions-nodejs.yaml - GithubActionsNodejsDefaultConfig string - - //go:embed plugins/githubactions-python.yaml - GithubActionsPythonDefaultConfig string - - //go:embed plugins/gitlabci-generic.yaml - GitlabCIGenericDefaultConfig string - - //go:embed plugins/gitlabci-golang.yaml - GitlabCIGolangDefaultConfig string - - //go:embed plugins/jenkins.yaml - JenkinsDefaultConfig string - - //go:embed plugins/jira-github-integ.yaml - JiraGithubDefaultConfig string - - //go:embed plugins/kube-prometheus.yaml - KubePrometheusDefaultConfig string - - //go:embed plugins/openldap.yaml - OpenldapDefaultConfig string - - //go:embed plugins/trello-github-integ.yaml - TrelloGithubDefaultConfig string - - //go:embed plugins/trello.yaml - TrelloDefaultConfig string - - //go:embed plugins/helm-generic.yaml - HelmGenericDefaultConfig string - - //go:embed plugins/gitlab-repo-scaffolding-golang.yaml - GitLabRepoScaffoldingGolangDefaultConfig string - - //go:embed plugins/hashicorp-vault.yaml - VaultDefaultConfig string -) - -var ( - //go:embed quickstart.yaml - QuickStartConfig string -) diff --git a/internal/pkg/show/config/config.go b/internal/pkg/show/config/config.go index 0a4bbdb16..74498a504 100644 --- a/internal/pkg/show/config/config.go +++ b/internal/pkg/show/config/config.go @@ -3,30 +3,28 @@ package config import ( "fmt" - "github.com/devstream-io/devstream/examples" - "github.com/spf13/viper" ) var pluginDefaultConfigs = map[string]string{ - "argocd": examples.ArgocdDefaultConfig, - "argocdapp": examples.ArgocdappDefaultConfig, - "devlake": examples.DevlakeDefaultConfig, - "github-repo-scaffolding-golang": examples.GithubRepoScaffoldingGolangDefaultConfig, - "githubactions-golang": examples.GithubActionsGolangDefaultConfig, - "githubactions-nodejs": examples.GithubActionsNodejsDefaultConfig, - "githubactions-python": examples.GithubActionsPythonDefaultConfig, - "gitlabci-generic": examples.GitlabCIGenericDefaultConfig, - "gitlabci-golang": examples.GitlabCIGolangDefaultConfig, - "jenkins": examples.JenkinsDefaultConfig, - "jira-github-integ": examples.JiraGithubDefaultConfig, - "kube-prometheus": examples.KubePrometheusDefaultConfig, - "openldap": examples.OpenldapDefaultConfig, - "trello-github-integ": examples.TrelloGithubDefaultConfig, - "trello": examples.TrelloDefaultConfig, - "helm-generic": examples.HelmGenericDefaultConfig, - "gitlab-repo-scaffolding-golang": examples.GitLabRepoScaffoldingGolangDefaultConfig, - "hashicorp-vault": examples.VaultDefaultConfig, + "argocd": ArgocdDefaultConfig, + "argocdapp": ArgocdappDefaultConfig, + "devlake": DevlakeDefaultConfig, + "github-repo-scaffolding-golang": GithubRepoScaffoldingGolangDefaultConfig, + "githubactions-golang": GithubActionsGolangDefaultConfig, + "githubactions-nodejs": GithubActionsNodejsDefaultConfig, + "githubactions-python": GithubActionsPythonDefaultConfig, + "gitlabci-generic": GitlabCIGenericDefaultConfig, + "gitlabci-golang": GitlabCIGolangDefaultConfig, + "jenkins": JenkinsDefaultConfig, + "jira-github-integ": JiraGithubDefaultConfig, + "kube-prometheus": KubePrometheusDefaultConfig, + "openldap": OpenldapDefaultConfig, + "trello-github-integ": TrelloGithubDefaultConfig, + "trello": TrelloDefaultConfig, + "helm-generic": HelmGenericDefaultConfig, + "gitlab-repo-scaffolding-golang": GitLabRepoScaffoldingGolangDefaultConfig, + "hashicorp-vault": VaultDefaultConfig, } func Show() error { diff --git a/internal/pkg/show/config/defaultconfig.go b/internal/pkg/show/config/defaultconfig.go index 3ca1772f4..d9104d37e 100644 --- a/internal/pkg/show/config/defaultconfig.go +++ b/internal/pkg/show/config/defaultconfig.go @@ -1,5 +1,7 @@ package config +import _ "embed" + var DefaultConfig = `# config.yaml sample: # var file path, you can set it to absolute path or relative path. varFile: variables.yaml # here is a relative path. (defaults is ./variables.yaml) @@ -23,3 +25,60 @@ tools: # variables.yaml sample: githubUsername: daniel-hutao repo: go-webapp-demo` + +// plugin default config +var ( + //go:embed plugins/argocd.yaml + ArgocdDefaultConfig string + + //go:embed plugins/argocdapp.yaml + ArgocdappDefaultConfig string + + //go:embed plugins/devlake.yaml + DevlakeDefaultConfig string + + //go:embed plugins/github-repo-scaffolding-golang.yaml + GithubRepoScaffoldingGolangDefaultConfig string + + //go:embed plugins/githubactions-golang.yaml + GithubActionsGolangDefaultConfig string + + //go:embed plugins/githubactions-nodejs.yaml + GithubActionsNodejsDefaultConfig string + + //go:embed plugins/githubactions-python.yaml + GithubActionsPythonDefaultConfig string + + //go:embed plugins/gitlabci-generic.yaml + GitlabCIGenericDefaultConfig string + + //go:embed plugins/gitlabci-golang.yaml + GitlabCIGolangDefaultConfig string + + //go:embed plugins/jenkins.yaml + JenkinsDefaultConfig string + + //go:embed plugins/jira-github-integ.yaml + JiraGithubDefaultConfig string + + //go:embed plugins/kube-prometheus.yaml + KubePrometheusDefaultConfig string + + //go:embed plugins/openldap.yaml + OpenldapDefaultConfig string + + //go:embed plugins/trello-github-integ.yaml + TrelloGithubDefaultConfig string + + //go:embed plugins/trello.yaml + TrelloDefaultConfig string + + //go:embed plugins/helm-generic.yaml + HelmGenericDefaultConfig string + + //go:embed plugins/gitlab-repo-scaffolding-golang.yaml + GitLabRepoScaffoldingGolangDefaultConfig string + + //go:embed plugins/hashicorp-vault.yaml + VaultDefaultConfig string +) diff --git a/examples/plugins/argocd.yaml b/internal/pkg/show/config/plugins/argocd.yaml similarity index 100% rename from examples/plugins/argocd.yaml rename to internal/pkg/show/config/plugins/argocd.yaml diff --git a/examples/plugins/argocdapp.yaml b/internal/pkg/show/config/plugins/argocdapp.yaml similarity index 100% rename from examples/plugins/argocdapp.yaml rename to internal/pkg/show/config/plugins/argocdapp.yaml diff --git a/examples/plugins/devlake.yaml b/internal/pkg/show/config/plugins/devlake.yaml similarity index 100% rename from examples/plugins/devlake.yaml rename to internal/pkg/show/config/plugins/devlake.yaml diff --git a/examples/plugins/github-repo-scaffolding-golang.yaml b/internal/pkg/show/config/plugins/github-repo-scaffolding-golang.yaml similarity index 100% rename from examples/plugins/github-repo-scaffolding-golang.yaml rename to internal/pkg/show/config/plugins/github-repo-scaffolding-golang.yaml diff --git a/examples/plugins/githubactions-golang.yaml b/internal/pkg/show/config/plugins/githubactions-golang.yaml similarity index 100% rename from examples/plugins/githubactions-golang.yaml rename to internal/pkg/show/config/plugins/githubactions-golang.yaml diff --git a/examples/plugins/githubactions-nodejs.yaml b/internal/pkg/show/config/plugins/githubactions-nodejs.yaml similarity index 100% rename from examples/plugins/githubactions-nodejs.yaml rename to internal/pkg/show/config/plugins/githubactions-nodejs.yaml diff --git a/examples/plugins/githubactions-python.yaml b/internal/pkg/show/config/plugins/githubactions-python.yaml similarity index 100% rename from examples/plugins/githubactions-python.yaml rename to internal/pkg/show/config/plugins/githubactions-python.yaml diff --git a/examples/plugins/gitlab-repo-scaffolding-golang.yaml b/internal/pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml similarity index 100% rename from examples/plugins/gitlab-repo-scaffolding-golang.yaml rename to internal/pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml diff --git a/examples/plugins/gitlabci-generic.yaml b/internal/pkg/show/config/plugins/gitlabci-generic.yaml similarity index 100% rename from examples/plugins/gitlabci-generic.yaml rename to internal/pkg/show/config/plugins/gitlabci-generic.yaml diff --git a/examples/plugins/gitlabci-golang.yaml b/internal/pkg/show/config/plugins/gitlabci-golang.yaml similarity index 100% rename from examples/plugins/gitlabci-golang.yaml rename to internal/pkg/show/config/plugins/gitlabci-golang.yaml diff --git a/examples/plugins/hashicorp-vault.yaml b/internal/pkg/show/config/plugins/hashicorp-vault.yaml similarity index 100% rename from examples/plugins/hashicorp-vault.yaml rename to internal/pkg/show/config/plugins/hashicorp-vault.yaml diff --git a/examples/plugins/helm-generic.yaml b/internal/pkg/show/config/plugins/helm-generic.yaml similarity index 100% rename from examples/plugins/helm-generic.yaml rename to internal/pkg/show/config/plugins/helm-generic.yaml diff --git a/examples/plugins/jenkins.yaml b/internal/pkg/show/config/plugins/jenkins.yaml similarity index 100% rename from examples/plugins/jenkins.yaml rename to internal/pkg/show/config/plugins/jenkins.yaml diff --git a/examples/plugins/jira-github-integ.yaml b/internal/pkg/show/config/plugins/jira-github-integ.yaml similarity index 100% rename from examples/plugins/jira-github-integ.yaml rename to internal/pkg/show/config/plugins/jira-github-integ.yaml diff --git a/examples/plugins/kube-prometheus.yaml b/internal/pkg/show/config/plugins/kube-prometheus.yaml similarity index 100% rename from examples/plugins/kube-prometheus.yaml rename to internal/pkg/show/config/plugins/kube-prometheus.yaml diff --git a/examples/plugins/openldap.yaml b/internal/pkg/show/config/plugins/openldap.yaml similarity index 100% rename from examples/plugins/openldap.yaml rename to internal/pkg/show/config/plugins/openldap.yaml diff --git a/examples/plugins/trello-github-integ.yaml b/internal/pkg/show/config/plugins/trello-github-integ.yaml similarity index 100% rename from examples/plugins/trello-github-integ.yaml rename to internal/pkg/show/config/plugins/trello-github-integ.yaml diff --git a/examples/plugins/trello.yaml b/internal/pkg/show/config/plugins/trello.yaml similarity index 100% rename from examples/plugins/trello.yaml rename to internal/pkg/show/config/plugins/trello.yaml From bcb49ed263d5ccb8a64b465964884bd85a9a744d Mon Sep 17 00:00:00 2001 From: iyear Date: Thu, 26 May 2022 18:07:23 +0800 Subject: [PATCH 3/4] refactor: standalone default config --- internal/pkg/show/config/default.yaml | 23 +++++++++++++++++ .../config/{defaultconfig.go => embed.go} | 25 ++----------------- 2 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 internal/pkg/show/config/default.yaml rename internal/pkg/show/config/{defaultconfig.go => embed.go} (68%) diff --git a/internal/pkg/show/config/default.yaml b/internal/pkg/show/config/default.yaml new file mode 100644 index 000000000..a3b0efb55 --- /dev/null +++ b/internal/pkg/show/config/default.yaml @@ -0,0 +1,23 @@ +# defaultconfig.yaml sample: +# var file path, you can set it to absolute path or relative path. +varFile: variables.yaml # here is a relative path. (defaults is ./variables.yaml) +# tool file path, you can set it to absolute path or relative path. +toolFile: tools.yaml # here is a relative path. +# state config +state: + backend: local # backend can be local or s3 + options: + stateFile: devstream.state + +# tools.yaml sample: +tools: + - name: github-repo-scaffolding-golang + instanceID: default + options: + owner: [ [ githubUsername ] ] + org: "" + repo: [ [ repoName ] ] + +# variables.yaml sample: +githubUsername: daniel-hutao +repo: go-webapp-demo \ No newline at end of file diff --git a/internal/pkg/show/config/defaultconfig.go b/internal/pkg/show/config/embed.go similarity index 68% rename from internal/pkg/show/config/defaultconfig.go rename to internal/pkg/show/config/embed.go index d9104d37e..00ab78767 100644 --- a/internal/pkg/show/config/defaultconfig.go +++ b/internal/pkg/show/config/embed.go @@ -2,29 +2,8 @@ package config import _ "embed" -var DefaultConfig = `# config.yaml sample: -# var file path, you can set it to absolute path or relative path. -varFile: variables.yaml # here is a relative path. (defaults is ./variables.yaml) -# tool file path, you can set it to absolute path or relative path. -toolFile: tools.yaml # here is a relative path. -# state config -state: - backend: local # backend can be local or s3 - options: - stateFile: devstream.state - -# tools.yaml sample: -tools: -- name: github-repo-scaffolding-golang - instanceID: default - options: - owner: [[ githubUsername ]] - org: "" - repo: [[ repoName ]] - -# variables.yaml sample: -githubUsername: daniel-hutao -repo: go-webapp-demo` +//go:embed default.yaml +var DefaultConfig string // plugin default config var ( From da2368385ea9a0f618f6ef01af64935d4d206704 Mon Sep 17 00:00:00 2001 From: iyear Date: Thu, 26 May 2022 18:24:13 +0800 Subject: [PATCH 4/4] fix: new line at eof --- internal/pkg/show/config/default.yaml | 2 +- internal/pkg/show/config/plugins/argocd.yaml | 2 +- internal/pkg/show/config/plugins/argocdapp.yaml | 2 +- internal/pkg/show/config/plugins/devlake.yaml | 2 +- .../pkg/show/config/plugins/github-repo-scaffolding-golang.yaml | 2 +- internal/pkg/show/config/plugins/githubactions-golang.yaml | 2 +- internal/pkg/show/config/plugins/githubactions-nodejs.yaml | 2 +- internal/pkg/show/config/plugins/githubactions-python.yaml | 2 +- .../pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml | 2 +- internal/pkg/show/config/plugins/gitlabci-generic.yaml | 2 +- internal/pkg/show/config/plugins/gitlabci-golang.yaml | 2 +- internal/pkg/show/config/plugins/hashicorp-vault.yaml | 2 +- internal/pkg/show/config/plugins/helm-generic.yaml | 2 +- internal/pkg/show/config/plugins/jenkins.yaml | 2 +- internal/pkg/show/config/plugins/jira-github-integ.yaml | 2 +- internal/pkg/show/config/plugins/kube-prometheus.yaml | 2 +- internal/pkg/show/config/plugins/openldap.yaml | 2 +- internal/pkg/show/config/plugins/trello-github-integ.yaml | 2 +- internal/pkg/show/config/plugins/trello.yaml | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/internal/pkg/show/config/default.yaml b/internal/pkg/show/config/default.yaml index a3b0efb55..70b5d4f1f 100644 --- a/internal/pkg/show/config/default.yaml +++ b/internal/pkg/show/config/default.yaml @@ -20,4 +20,4 @@ tools: # variables.yaml sample: githubUsername: daniel-hutao -repo: go-webapp-demo \ No newline at end of file +repo: go-webapp-demo diff --git a/internal/pkg/show/config/plugins/argocd.yaml b/internal/pkg/show/config/plugins/argocd.yaml index be3c403ff..09b42fe2f 100644 --- a/internal/pkg/show/config/plugins/argocd.yaml +++ b/internal/pkg/show/config/plugins/argocd.yaml @@ -32,4 +32,4 @@ tools: values_yaml: | controller: service: - port: 8080 \ No newline at end of file + port: 8080 diff --git a/internal/pkg/show/config/plugins/argocdapp.yaml b/internal/pkg/show/config/plugins/argocdapp.yaml index 08571edf7..43bc4b192 100644 --- a/internal/pkg/show/config/plugins/argocdapp.yaml +++ b/internal/pkg/show/config/plugins/argocdapp.yaml @@ -26,4 +26,4 @@ tools: # path of the Helm chart path: charts/go-hello-http # Helm chart repo URL, this is only an example, do not use this - repoURL: YOUR_CHART_REPO_URL \ No newline at end of file + repoURL: YOUR_CHART_REPO_URL diff --git a/internal/pkg/show/config/plugins/devlake.yaml b/internal/pkg/show/config/plugins/devlake.yaml index d04d8eb40..c45908843 100644 --- a/internal/pkg/show/config/plugins/devlake.yaml +++ b/internal/pkg/show/config/plugins/devlake.yaml @@ -4,4 +4,4 @@ tools: # id of the tool instance instanceID: default # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. - dependsOn: [ ] \ No newline at end of file + dependsOn: [ ] diff --git a/internal/pkg/show/config/plugins/github-repo-scaffolding-golang.yaml b/internal/pkg/show/config/plugins/github-repo-scaffolding-golang.yaml index 67447935b..7dadb9a35 100644 --- a/internal/pkg/show/config/plugins/github-repo-scaffolding-golang.yaml +++ b/internal/pkg/show/config/plugins/github-repo-scaffolding-golang.yaml @@ -16,4 +16,4 @@ tools: # the branch of the repo you'd like to hold the code branch: main # the image repo you'd like to push the container image; please change the value below. - image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY \ No newline at end of file + image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY diff --git a/internal/pkg/show/config/plugins/githubactions-golang.yaml b/internal/pkg/show/config/plugins/githubactions-golang.yaml index 6befa556a..05a8f98b5 100644 --- a/internal/pkg/show/config/plugins/githubactions-golang.yaml +++ b/internal/pkg/show/config/plugins/githubactions-golang.yaml @@ -45,4 +45,4 @@ tools: # dockerhub/harbor username username: YOUR_DOCKERHUB_USERNAME # dockerhub/harbor image repository name - repository: YOUR_DOCKERHUB_REPOSITORY \ No newline at end of file + repository: YOUR_DOCKERHUB_REPOSITORY diff --git a/internal/pkg/show/config/plugins/githubactions-nodejs.yaml b/internal/pkg/show/config/plugins/githubactions-nodejs.yaml index 68f422237..7c992e50e 100644 --- a/internal/pkg/show/config/plugins/githubactions-nodejs.yaml +++ b/internal/pkg/show/config/plugins/githubactions-nodejs.yaml @@ -19,4 +19,4 @@ tools: # version of the language version: "16.14" # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main \ No newline at end of file + branch: main diff --git a/internal/pkg/show/config/plugins/githubactions-python.yaml b/internal/pkg/show/config/plugins/githubactions-python.yaml index 9d91e513d..58baffaf7 100644 --- a/internal/pkg/show/config/plugins/githubactions-python.yaml +++ b/internal/pkg/show/config/plugins/githubactions-python.yaml @@ -19,4 +19,4 @@ tools: # version of the language version: "3.8" # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main \ No newline at end of file + branch: main diff --git a/internal/pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml b/internal/pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml index 3c6c31afc..b5c82d42e 100644 --- a/internal/pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml +++ b/internal/pkg/show/config/plugins/gitlab-repo-scaffolding-golang.yaml @@ -16,4 +16,4 @@ tools: # the branch of the repo you'd like to hold the code branch: main # the image repo you'd like to push the container image; please change the value below. - image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY \ No newline at end of file + image_repo: YOUR_DOCKERHUB_USERNAME/YOUR_DOCKERHUB_REPOSITORY diff --git a/internal/pkg/show/config/plugins/gitlabci-generic.yaml b/internal/pkg/show/config/plugins/gitlabci-generic.yaml index 646433192..935b6628a 100644 --- a/internal/pkg/show/config/plugins/gitlabci-generic.yaml +++ b/internal/pkg/show/config/plugins/gitlabci-generic.yaml @@ -16,4 +16,4 @@ tools: # custom variables keys and values templateVariables: key1: value1 - key2: value2 \ No newline at end of file + key2: value2 diff --git a/internal/pkg/show/config/plugins/gitlabci-golang.yaml b/internal/pkg/show/config/plugins/gitlabci-golang.yaml index 49a151146..122acf863 100644 --- a/internal/pkg/show/config/plugins/gitlabci-golang.yaml +++ b/internal/pkg/show/config/plugins/gitlabci-golang.yaml @@ -10,4 +10,4 @@ tools: # owner/repo; "path with namespace" is only GitLab API's way of saying the same thing; please change the values below. pathWithNamespace: YOUR_GITLAB_USERNAME/YOUR_GITLAB_REPO_NAME # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main \ No newline at end of file + branch: main diff --git a/internal/pkg/show/config/plugins/hashicorp-vault.yaml b/internal/pkg/show/config/plugins/hashicorp-vault.yaml index cb1bfe390..2fce8dcd3 100644 --- a/internal/pkg/show/config/plugins/hashicorp-vault.yaml +++ b/internal/pkg/show/config/plugins/hashicorp-vault.yaml @@ -35,4 +35,4 @@ tools: setNodeId: true namespaceSelector: matchLabels: - injection: enabled \ No newline at end of file + injection: enabled diff --git a/internal/pkg/show/config/plugins/helm-generic.yaml b/internal/pkg/show/config/plugins/helm-generic.yaml index 0b01cdf73..b81441e53 100644 --- a/internal/pkg/show/config/plugins/helm-generic.yaml +++ b/internal/pkg/show/config/plugins/helm-generic.yaml @@ -30,4 +30,4 @@ tools: upgradeCRDs: true # custom configuration (Optional). e.g. You can refer to [ArgoCD values.yaml](https://github.com/argoproj/argo-helm/blob/master/charts/argo-cd/values.yaml) values_yaml: | - FOO: BAR \ No newline at end of file + FOO: BAR diff --git a/internal/pkg/show/config/plugins/jenkins.yaml b/internal/pkg/show/config/plugins/jenkins.yaml index 1751e8adb..461df6244 100644 --- a/internal/pkg/show/config/plugins/jenkins.yaml +++ b/internal/pkg/show/config/plugins/jenkins.yaml @@ -35,4 +35,4 @@ tools: storageClass: jenkins-pv serviceAccount: create: false - name: jenkins \ No newline at end of file + name: jenkins diff --git a/internal/pkg/show/config/plugins/jira-github-integ.yaml b/internal/pkg/show/config/plugins/jira-github-integ.yaml index 937c7274d..e7fc9b2a7 100644 --- a/internal/pkg/show/config/plugins/jira-github-integ.yaml +++ b/internal/pkg/show/config/plugins/jira-github-integ.yaml @@ -20,4 +20,4 @@ tools: # "get it from project url, like 'HEAP' from https://merico.atlassian.net/jira/software/projects/HEAP/pages" jiraProjectKey: JIRA_PROJECT_KEY # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main \ No newline at end of file + branch: main diff --git a/internal/pkg/show/config/plugins/kube-prometheus.yaml b/internal/pkg/show/config/plugins/kube-prometheus.yaml index 833113f7e..7c99a2366 100644 --- a/internal/pkg/show/config/plugins/kube-prometheus.yaml +++ b/internal/pkg/show/config/plugins/kube-prometheus.yaml @@ -31,4 +31,4 @@ tools: upgradeCRDs: true # custom configuration (Optional). You can refer to [kube-prometheus-stack values.yaml](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml) values_yaml: | - namespaceOverride: "monitoring" \ No newline at end of file + namespaceOverride: "monitoring" diff --git a/internal/pkg/show/config/plugins/openldap.yaml b/internal/pkg/show/config/plugins/openldap.yaml index 3e13582c4..64e161d38 100644 --- a/internal/pkg/show/config/plugins/openldap.yaml +++ b/internal/pkg/show/config/plugins/openldap.yaml @@ -45,4 +45,4 @@ tools: phpldapadmin: enabled: true ingress: - enabled: false \ No newline at end of file + enabled: false diff --git a/internal/pkg/show/config/plugins/trello-github-integ.yaml b/internal/pkg/show/config/plugins/trello-github-integ.yaml index 2c389c941..5b8ea4a5c 100644 --- a/internal/pkg/show/config/plugins/trello-github-integ.yaml +++ b/internal/pkg/show/config/plugins/trello-github-integ.yaml @@ -19,4 +19,4 @@ tools: doingListId: ${{ trello.default.outputs.doingListId }} doneListId: ${{ trello.default.outputs.doneListId }} # main branch of the repo (to which branch the plugin will submit the workflows) - branch: main \ No newline at end of file + branch: main diff --git a/internal/pkg/show/config/plugins/trello.yaml b/internal/pkg/show/config/plugins/trello.yaml index d1e7210a1..ad663f5c5 100644 --- a/internal/pkg/show/config/plugins/trello.yaml +++ b/internal/pkg/show/config/plugins/trello.yaml @@ -14,4 +14,4 @@ tools: # for which repo this board will be used repo: YOUR_REPO_NAME # the Tello board name. If empty, use owner/repo as the board's name. - kanbanBoardName: KANBAN_BOARD_NAME \ No newline at end of file + kanbanBoardName: KANBAN_BOARD_NAME