GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cli - gitlab ci extension · Issue #30 · OpenAtomFoundation/SmartIDE

cli - gitlab ci extension #30

New issue
Copy link
New issue
Copy link
Open
Open
cli - gitlab ci extension#30
Copy link
Assignees
zhouwenyang
Labels
pipeline

Description

@ups216
ups216
opened on Jul 13, 2022
Issue body actions

allow user to trigger a smartide-cli task to create a remote workspace, this is useful when you want deploy a dev/test environment with a specific codebase version.

here is a gitlab-smartide-cli-ci.yml sample

stages:
    - smartide

smartide_start:
    stage: dev-env-start
    image: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-cli
    script:
        - smartide start --mode=server --host <address-ip> --username <ssh-user> --password <ssh-password> <git-url>

consider pass in the following parameters:

  • host-address
  • username
  • password
  • git-url: support https/ssh
  • git-branch-name: actually a git-ref, so you can use commit-id, tag, or branch
  • callback-api-address: smartide-cli is able to send back a json with all data about the workspace. We can print the json content into pipeline logs for now, and publish a sample json body, this allow others to create such a api-endpoint to receive the json and do whatever they want, e.g. show it on a webpage.

post a blog to https://smartide.cn/zh/blog/
and a video to https://space.bilibili.com/1001970523

Activity

  1. ups216
    assigned
    zhouwenyang
    on Jul 13, 2022
  2. zhouwenyang commented on Jul 20, 2022

    @zhouwenyang
    zhouwenyang
    on Jul 20, 2022
    Contributor
    More actions

    @ups216 we are supporting gitlab ci from the image version of smartide-cli:4475, now user can develop/debug code in real test enviroment.

    .gitlab-ci.yml demo :

    stages:
        - setup_dev_env
    
    smartide:
        stage: setup_dev_env
        image: 
            name: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-cli:4475
            entrypoint: [""]
        script:
            - smartide version
            - smartide start --mode pipeline --host <your dev/test env> --username <username> --password <password> --callback-api-address <callback api address>  <git repo address>

    CI Logs Demo :

    • user can trigger callback api and get result from gitlab pipeline logs.
    • user can get WebIDE address, open it directly from logs and start to develop and debug.
    2022-07-20 09:30:53.613 INFO  [Worksapce] Saved successfully. Open your Workspace using WorkspaceId (smartide start 1) to quickly resume your work.
    2022-07-20 09:30:54.589 INFO  successfully send workspace info to below API: ****************
    2022-07-20 09:30:54.589 INFO  dev/test enviroment start success with pipeline mode, you can work with below URL now!
    2022-07-20 09:30:54.589 INFO  http://********:6800/?folder=vscode-remote://******/home/project
    
  3. ups216 commented on Jul 20, 2022

    @ups216
    ups216
    on Jul 20, 2022
    ContributorAuthor
    More actions

    @ups216 we are supporting gitlab ci now.

    .gitlab-ci.yml demo :

    stages:
        - setup_dev_env
    
    smartide:
        stage: setup_dev_env
        image: 
            name: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-cli:4475
            entrypoint: [""]
        script:
            - smartide version
            - smartide start --mode pipeline --host <your dev/test env> --username <username> --password <password> --callback-api-address <callback api address>  https://gitee.com/idcf-boat-house/boathouse-calculator.git
    

    CI Logs Demo :

    Can you use env-variable to replace the repo address to make this more general?

  4. zhouwenyang commented on Jul 20, 2022

    @zhouwenyang
    zhouwenyang
    on Jul 20, 2022
    Contributor
    More actions

    @ups216 we are supporting gitlab ci now.
    .gitlab-ci.yml demo :

    stages:
        - setup_dev_env
    
    smartide:
        stage: setup_dev_env
        image: 
            name: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-cli:4475
            entrypoint: [""]
        script:
            - smartide version
            - smartide start --mode pipeline --host <your dev/test env> --username <username> --password <password> --callback-api-address <callback api address>  https://gitee.com/idcf-boat-house/boathouse-calculator.git
    

    CI Logs Demo :

    Can you use env-variable to replace the repo address to make this more general?

    @ups216 sure, check the new gitlab ci demo below.

    variables:
      #remote host information which you can deploy your dev workspace and open it in WebIDE
      SMARTIDE_REMOTE_HOST: <remote dev/test env>
      SMARTIDE_REMOTE_HOST_USERNAME: <host username>
      SMARTIDE_REMOTE_HOST_PASSWORD: <host password>
      #git repo you want to develop in smartide,  you can use predefined variable  $CI_REPOSITORY_URL 
      #for the URL to clone the current Git repository (the URL already contain token, so you dont need to 
      #consider Authentication problem, for custom git repo url, you need resolve authentication yourself with token or ssh..)
      SMARTIDE_GIT_REPO_ADDRESS: $CI_REPOSITORY_URL
      #callback api address which you want to receive workspace information and trigger other custom events
      SMARTIDE_CALLBACK_API_ADDRESS: <callback api address>
    
    stages:
        - setup_dev_env
    
    smartide:
        stage: setup_dev_env
        image: 
            name: registry.cn-hangzhou.aliyuncs.com/smartide/smartide-cli:4475
            entrypoint: [""]
        script:
            - smartide version
            - smartide start --mode pipeline --isInsightDisabled false --host $SMARTIDE_REMOTE_HOST --username $SMARTIDE_REMOTE_HOST_USERNAME --password $SMARTIDE_REMOTE_HOST_PASSWORD --callback-api-address $SMARTIDE_CALLBACK_API_ADDRESS $SMARTIDE_GIT_REPO_ADDRESS
    
  5. zhouwenyang
    added
    duplicateThis issue or pull request already exists
    pipeline
    and removed
    duplicateThis issue or pull request already exists
    on Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @zhouwenyang
    zhouwenyang

Labels

pipeline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402792 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.