Skip to content

Conversation

@steinliber
Copy link

@steinliber steinliber commented Nov 29, 2022

Signed-off-by: Meng JiaFeng jiafeng.meng@merico.dev

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

  • fix repo ci/cd template option error
  • use regex for config extract

Related Issues

#1239

New Behavior (screenshots if needed)

basic config is valid for now

config:
  state:
    backend: local
    options:
      stateFile: devstream.state
vars:
  githubUser: steinliber
  dockerUser: steinsliber
  app: helloworld

tools:
- name: repo-scaffolding
  instanceID: myapp
  options:
    destinationRepo:
      owner: [[ githubUser ]]
      repo: [[ app ]]
      branch: main
      repoType: github
    sourceRepo:
      org: devstream-io
      repo: dtm-scaffolding-python
      repoType: github
    vars:
      imageRepo: [[ dockerUser ]]/[[ app ]]
- name: githubactions-python
  instanceID: default
  dependsOn: [ repo-scaffolding.myapp ]
  options:
    owner: [[ githubUser ]]
    repo:  [[ app ]]
    language:
      name: python
    branch: main
    docker:
      registry:
        type: dockerhub
        username: [[ dockerUser ]]
        repository: [[ app ]]
- name: helm-installer
  instanceID: argocd-001
- name: argocdapp
  instanceID: default
  dependsOn: [ "helm-installer.argocd-001", "githubactions-python.default" ]
  options:
    app:
      name: [[ app ]]
      namespace: argocd
    destination:
      server: https://kubernetes.default.svc
      namespace: default
    source:
      valuefile: values.yaml
      path: helm/[[ app ]]
      repoURL: ${{repo-scaffolding.myapp.outputs.repoURL}}

apps is valid for now

config:
  state:
    backend: local
    options:
      stateFile: devstream.state

vars:
  repoOwner: steinliber
  repoTemplateBaseURL: github.com/devstream-io
  imageRepoOwner: steinsliber

tools:
- name: helm-installer
  instanceID: argocd-001

apps:
- name: myapp1
  spec:
    language: python
    framework: django
  repo:
    url: github.com/[[ repoOwner ]]/myapp1
  repoTemplate:
    url: [[ repoTemplateBaseURL ]]/dtm-scaffolding-python
    vars:
      imageRepo: [[ imageRepoOwner ]]/myapp1
  ci:
  - type: github-actions
    options:
      imageRepo:
        user: [[ imageRepoOwner ]]
  - type: argocdapp
- name: myapp2
  spec:
    framework: gin
    language: golang
  repo:
    owner: [[ repoOwner ]]
    scmType: github
  repoTemplate:
    url: [[ repoTemplateBaseURL ]]/dtm-scaffolding-golang
    vars:
      imageRepo: [[ imageRepoOwner ]]/myapp2
  ci:
  - type: github-actions
    options:
      imageRepo:
        user: [[ imageRepoOwner ]]
  cd:
  - type: argocdapp

@steinliber steinliber requested a review from a team as a code owner November 29, 2022 10:33
@steinliber steinliber force-pushed the refactor-configmanager-use-regexp branch from c3ef92b to 439dd42 Compare November 29, 2022 10:57
Signed-off-by: Meng JiaFeng <jiafeng.meng@merico.dev>
@steinliber steinliber force-pushed the refactor-configmanager-use-regexp branch from 439dd42 to 4635fef Compare November 29, 2022 11:00
Signed-off-by: Meng JiaFeng <jiafeng.meng@merico.dev>
@daniel-hutao daniel-hutao merged commit c4a8d2a into devstream-io:main Nov 29, 2022
@daniel-hutao daniel-hutao deleted the refactor-configmanager-use-regexp branch November 29, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants