-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli - gitlab ci extension #30
Comments
@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 :
|
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
|
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
consider pass in the following parameters:
git-ref
, so you can usecommit-id
,tag
, orbranch
post a blog to https://smartide.cn/zh/blog/
and a video to https://space.bilibili.com/1001970523
The text was updated successfully, but these errors were encountered: