Skip to content

Conversation

@xavier-hou
Copy link
Member

Signed-off-by: hxcGit houxc_mail@163.com

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

Add new plugin: gitlab-pipeline

Related Issues

#901

New Behavior (screenshots if needed)

image

image

image

{22-07-25 12:06}hxc-macbook-air:devstream@feat-gitlabci-java✗✗✗✗✗✗ hxc% ./dtm apply -f java.yaml -y --debug
2022-07-25 12:06:35 ℹ [INFO]  Log level is: debug.
2022-07-25 12:06:35 ℹ [INFO]  Apply started.
2022-07-25 12:06:35 λ [DEBUG]  Original config: 
---
varFile: ""
toolFile: ""
state:
  backend: local
  options:
    stateFile: devstream.state
---
tools:
- name: gitlabci-java
  instanceID: default
  options:
    branch: main
    pathWithNamespace: "hxcGit/java-demo"
    baseURL:
    package:
      baseOption:
        enable: True
    build:
      baseOption:
        enable: True
      userName: hxcdockerhub
      imageName: java-demo
    deploy:
      baseOption:
        enable: True
      k8sAgentName: hxc


2022-07-25 12:06:35 ℹ [INFO]  Got Backend from config: local
2022-07-25 12:06:35 ℹ [INFO]  Using dir <.devstream> to store plugins.
2022-07-25 12:06:35 λ [DEBUG]  The global manager m is not initialized.
2022-07-25 12:06:35 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-07-25 12:06:35 λ [DEBUG]  Used the Backend: local.
2022-07-25 12:06:35 λ [DEBUG]  isForce:false
2022-07-25 12:06:35 λ [DEBUG]  TOOL gitlabci-java.default dependency already solved

2022-07-25 12:06:35 λ [DEBUG]  BATCH: [{gitlabci-java default [] map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo]}]
2022-07-25 12:06:35 λ [DEBUG]  Changes for the plan:
2022-07-25 12:06:35 λ [DEBUG]  Change - 1/1 -> 
{
  ActionName: Create,
  Tool: {Name: gitlabci-java, InstanceID: default}}
}
2022-07-25 12:06:35 ℹ [INFO]  Tool (gitlabci-java/default) found in config but doesn't exist in the state, will be created.
2022-07-25 12:06:35 ℹ [INFO]  Start executing the plan.
2022-07-25 12:06:35 ℹ [INFO]  Changes count: 1.
2022-07-25 12:06:35 λ [DEBUG]  TOOL gitlabci-java.default dependency already solved

2022-07-25 12:06:35 λ [DEBUG]  BATCH: [{gitlabci-java default [] map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo]}]
2022-07-25 12:06:35 ℹ [INFO]  -------------------- [  Processing progress: 1/1.  ] --------------------
2022-07-25 12:06:35 ℹ [INFO]  Processing: (gitlabci-java/default) -> Create ...
2022-07-25 12:06:35 λ [DEBUG]  Tool's raw changes are: map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo].
2022-07-25 12:06:36 λ [DEBUG]  Start -> StatesMap now is:

2022-07-25 12:06:36 ✔ [SUCCESS]  Tool (gitlabci-java/default) Create done.
2022-07-25 12:06:36 λ [DEBUG]  End -> StatesMap now is:
gitlabci-java_default:
  name: gitlabci-java
  instanceid: default
  dependson: []
  options:
    baseURL: null
    branch: main
    build:
      baseOption:
        enable: true
      imageName: java-demo
      userName: hxcdockerhub
    deploy:
      baseOption:
        enable: true
      k8sAgentName: hxc
    package:
      baseOption:
        enable: true
    pathWithNamespace: hxcGit/java-demo
  resource: {}

2022-07-25 12:06:36 ℹ [INFO]  -------------------- [  Processing done.  ] --------------------
2022-07-25 12:06:36 ✔ [SUCCESS]  All plugins applied successfully.
2022-07-25 12:06:36 ✔ [SUCCESS]  Apply finished.
{22-07-25 12:06}hxc-macbook-air:devstream@feat-gitlabci-java✗✗✗✗✗✗ hxc% ./dtm delete -f java.yaml -y --debug  
2022-07-25 12:20:24 ℹ [INFO]  Log level is: debug.
2022-07-25 12:20:24 ℹ [INFO]  Delete started.
2022-07-25 12:20:24 λ [DEBUG]  Original config: 
---
varFile: ""
toolFile: ""
state:
  backend: local
  options:
    stateFile: devstream.state
---
tools:
- name: gitlabci-java
  instanceID: default
  options:
    branch: main
    pathWithNamespace: "hxcGit/java-demo"
    baseURL:
    package:
      baseOption:
        enable: True
    build:
      baseOption:
        enable: True
      userName: hxcdockerhub
      imageName: java-demo
    deploy:
      baseOption:
        enable: True
      k8sAgentName: hxc


2022-07-25 12:20:24 ℹ [INFO]  Got Backend from config: local
2022-07-25 12:20:24 ℹ [INFO]  Using dir <.devstream> to store plugins.
2022-07-25 12:20:24 λ [DEBUG]  The global manager m is not initialized.
2022-07-25 12:20:24 ℹ [INFO]  Using local backend. State file: devstream.state.
2022-07-25 12:20:24 λ [DEBUG]  Used the Backend: local.
2022-07-25 12:20:24 λ [DEBUG]  Got a state from the backend: gitlabci-java_default -> {gitlabci-java default [] map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo] map[]}.
2022-07-25 12:20:24 λ [DEBUG]  isForce:false
2022-07-25 12:20:24 λ [DEBUG]  TOOL gitlabci-java.default dependency already solved

2022-07-25 12:20:24 λ [DEBUG]  BATCH: [{gitlabci-java default [] map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo]}]
2022-07-25 12:20:24 λ [DEBUG]  Changes for the plan:
2022-07-25 12:20:24 λ [DEBUG]  Change - 1/1 -> 
{
  ActionName: Delete,
  Tool: {Name: gitlabci-java, InstanceID: default}}
}
2022-07-25 12:20:24 ℹ [INFO]  Tool (gitlabci-java/default) will be deleted.
2022-07-25 12:20:24 ℹ [INFO]  Start executing the plan.
2022-07-25 12:20:24 ℹ [INFO]  Changes count: 1.
2022-07-25 12:20:24 λ [DEBUG]  TOOL gitlabci-java.default dependency already solved

2022-07-25 12:20:24 λ [DEBUG]  BATCH: [{gitlabci-java default [] map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo]}]
2022-07-25 12:20:24 ℹ [INFO]  -------------------- [  Processing progress: 1/1.  ] --------------------
2022-07-25 12:20:24 ℹ [INFO]  Processing: (gitlabci-java/default) -> Delete ...
2022-07-25 12:20:24 λ [DEBUG]  Tool's raw changes are: map[baseURL:<nil> branch:main build:map[baseOption:map[enable:true] imageName:java-demo userName:hxcdockerhub] deploy:map[baseOption:map[enable:true] k8sAgentName:hxc] package:map[baseOption:map[enable:true]] pathWithNamespace:hxcGit/java-demo].
2022-07-25 12:20:27 λ [DEBUG]  Start -> StatesMap now is:
gitlabci-java_default:
  name: gitlabci-java
  instanceid: default
  dependson: []
  options:
    baseURL: null
    branch: main
    build:
      baseOption:
        enable: true
      imageName: java-demo
      userName: hxcdockerhub
    deploy:
      baseOption:
        enable: true
      k8sAgentName: hxc
    package:
      baseOption:
        enable: true
    pathWithNamespace: hxcGit/java-demo
  resource: {}

2022-07-25 12:20:27 λ [DEBUG]  End -> StatesMap now is:
gitlabci-java_default:
  name: gitlabci-java
  instanceid: default
  dependson: []
  options:
    baseURL: null
    branch: main
    build:
      baseOption:
        enable: true
      imageName: java-demo
      userName: hxcdockerhub
    deploy:
      baseOption:
        enable: true
      k8sAgentName: hxc
    package:
      baseOption:
        enable: true
    pathWithNamespace: hxcGit/java-demo
  resource: {}

2022-07-25 12:20:27 ℹ [INFO]  -------------------- [  Processing done.  ] --------------------
2022-07-25 12:20:27 ✔ [SUCCESS]  All plugins deleted successfully.
2022-07-25 12:20:27 ✔ [SUCCESS]  Delete finished.

@xavier-hou xavier-hou requested review from a team and IronCore864 as code owners July 25, 2022 05:40
Copy link
Member

@iyear iyear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New member of the GitLab family! 🚀

@xavier-hou xavier-hou force-pushed the feat-gitlabci-java branch from 871941b to 79c36ff Compare July 26, 2022 10:47
@xavier-hou xavier-hou requested a review from iyear July 26, 2022 10:59
@xavier-hou xavier-hou requested a review from iyear July 26, 2022 13:52
@iyear
Copy link
Member

iyear commented Jul 28, 2022

@HXCGIT There is a conflict in embed_gen.go due to #898. Please merge it in after resolving the conflict and #902 (comment).

Signed-off-by: hxcGit <houxc_mail@163.com>
Signed-off-by: hxcGit <houxc_mail@163.com>
Signed-off-by: hxcGit <houxc_mail@163.com>
Signed-off-by: hxcGit <houxc_mail@163.com>
Signed-off-by: hxcGit <houxc_mail@163.com>
@xavier-hou xavier-hou force-pushed the feat-gitlabci-java branch from bb7a453 to 17954a1 Compare July 28, 2022 04:15
@xavier-hou xavier-hou requested a review from steinliber July 28, 2022 04:16
@steinliber steinliber merged commit 63fc43b into devstream-io:main Jul 28, 2022
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.

4 participants