GitLab
GitLab சிக்கல்கள் மற்றும் merge requests-களில் Dropstone-ஐ பயன்படுத்தவும்.
Dropstone உங்கள் GitLab CI/CD pipeline அல்லது GitLab Duo மூலம் உங்கள் GitLab பணிப்பாய்வுடன் ஒருங்கிணைக்கப்படுகிறது.
இரண்டு சந்தர்ப்பங்களிலும், Dropstone உங்கள் GitLab runners-இல் இயங்கும்.
GitLab CI
Dropstone ஒரு வழக்கமான GitLab pipeline-இல் செயல்படுகிறது. அதை ஒரு CI component ஆக pipeline-இல் இணைக்கலாம்.
இங்கே நாங்கள் Dropstone-க்காக சமூகத்தால் உருவாக்கப்பட்ட CI/CD component-ஐ பயன்படுத்துகிறோம்: nagyv/gitlab-dropstone.
அம்சங்கள்
- ஒவ்வொரு job-க்கும் தனிப்பயன் கட்டமைப்பைப் பயன்படுத்தவும்: Dropstone-ஐ ஒரு தனிப்பயன் கட்டமைப்பு கோப்புறையுடன் கட்டமைக்கவும், எடுத்துக்காட்டாக
./config/#custom-directoryஒவ்வொரு Dropstone அழைப்பிலும் செயல்பாட்டை இயக்க அல்லது முடக்க. - குறைந்தபட்ச அமைப்பு: CI component பின்னணியில் Dropstone-ஐ அமைக்கிறது, நீங்கள் Dropstone கட்டமைப்பு மற்றும் ஆரம்ப prompt-ஐ மட்டுமே உருவாக்க வேண்டும்.
- நெகிழ்வானது: CI component அதன் நடத்தையை தனிப்பயனாக்க பல உள்ளீடுகளை ஆதரிக்கிறது
அமைப்பு
-
உங்கள் Dropstone அங்கீகார JSON-ஐ File வகை CI environment variables-ஆக Settings > CI/CD > Variables-இல் சேமிக்கவும். அவற்றை "Masked and hidden" எனக் குறிக்கவும்.
-
உங்கள்
.gitlab-ci.ymlகோப்பில் பின்வருவனவற்றைச் சேர்க்கவும்.include: - component: $CI_SERVER_FQDN/nagyv/gitlab-dropstone/dropstone@2 inputs: config_dir: ${CI_PROJECT_DIR}/dropstone-config auth_json: $DROPSTONE_AUTH_JSON # The variable name for your Dropstone authentication JSON command: optional-custom-command message: "Your prompt here"
மேலும் உள்ளீடுகள் மற்றும் பயன்பாட்டு நிகழ்வுகளுக்கு docs-ஐப் பார்க்கவும் இந்த component-க்காக.
GitLab Duo
Dropstone உங்கள் GitLab பணிப்பாய்வுடன் ஒருங்கிணைக்கப்படுகிறது.
ஒரு கருத்தில் @dropstone-ஐ குறிப்பிடவும், Dropstone உங்கள் GitLab CI pipeline-இல் பணிகளைச் செய்யும்.
அம்சங்கள்
- சிக்கல்களை வகைப்படுத்தவும்: Dropstone-ஐ ஒரு சிக்கலை ஆராய்ந்து உங்களுக்கு விளக்கச் சொல்லுங்கள்.
- சரிசெய்து செயல்படுத்தவும்: Dropstone-ஐ ஒரு சிக்கலை சரிசெய்ய அல்லது ஒரு அம்சத்தை செயல்படுத்தச் சொல்லுங்கள். அது ஒரு புதிய branch-ஐ உருவாக்கி மாற்றங்களுடன் ஒரு merge request-ஐ எழுப்பும்.
- பாதுகாப்பானது: Dropstone உங்கள் GitLab runners-இல் இயங்குகிறது.
அமைப்பு
Dropstone உங்கள் GitLab CI/CD pipeline-இல் இயங்குகிறது, அதை அமைக்க உங்களுக்கு இது தேவைப்படும்:
Tip
சமீபத்திய வழிமுறைகளுக்கு GitLab docs-ஐப் பார்க்கவும்.
- உங்கள் GitLab சூழலை கட்டமைக்கவும்
- CI/CD-ஐ அமைக்கவும்
- Dropstone API key-ஐப் பெறவும் (Quickstart-ஐப் பார்க்கவும்)
- ஒரு service account-ஐ உருவாக்கவும்
- CI/CD variables-ஐ கட்டமைக்கவும்
- ஒரு flow config கோப்பை உருவாக்கவும். எடுத்துக்காட்டு:
image: node:22-slim
commands:
- echo "Installing Dropstone"
- curl -fsSL https://dropstone.io/install | bash
- echo "Installing glab"
- export GITLAB_TOKEN=$GITLAB_TOKEN_DROPSTONE
- apt-get update --quiet && apt-get install --yes curl wget gpg git && rm --recursive --force /var/lib/apt/lists/*
- curl --silent --show-error --location "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | bash
- apt-get install --yes glab
- echo "Configuring glab"
- echo $GITLAB_HOST
- echo "Creating Dropstone auth configuration"
- mkdir --parents ~/.local/share/dropstone
- |
cat > ~/.local/share/dropstone/auth.json << EOF
{
"dropstone": {
"type": "api",
"key": "$DROPSTONE_API_KEY"
}
}
EOF
- echo "Configuring git"
- git config --global user.email "dropstone@gitlab.com"
- git config --global user.name "Dropstone"
- echo "Testing glab"
- glab issue list
- echo "Running Dropstone"
- |
dropstone run "
You are an AI assistant helping with GitLab operations.
Context: $AI_FLOW_CONTEXT
Task: $AI_FLOW_INPUT
Event: $AI_FLOW_EVENT
Please execute the requested task using the available GitLab tools.
Be thorough in your analysis and provide clear explanations.
Use the glab CLI to access data from GitLab. The glab CLI is already authenticated.
If you are asked to summarize an MR or issue, or provide more information,
post back a note to the MR/Issue so the user can see it.
"
- git checkout --branch $CI_WORKLOAD_REF origin/$CI_WORKLOAD_REF
- echo "Checking for git changes and pushing if any exist"
- |
if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then
echo "Git changes detected, adding and pushing..."
git add .
if git diff --cached --quiet; then
echo "No staged changes to commit"
else
echo "Committing changes to branch: $CI_WORKLOAD_REF"
git commit --message "Dropstone changes"
echo "Pushing changes up to $CI_WORKLOAD_REF"
git push "https://gitlab-ci-token:$GITLAB_TOKEN@$GITLAB_HOST/$CI_PROJECT_PATH.git" $CI_WORKLOAD_REF
echo "Changes successfully pushed"
fi
else
echo "No git changes detected, skipping push"
fi
variables:
- DROPSTONE_API_KEY
- GITLAB_TOKEN_DROPSTONE
- GITLAB_HOST
விரிவான வழிமுறைகளுக்கு GitLab Duo Agent Platform docs-ஐப் பார்க்கலாம்.
எடுத்துக்காட்டுகள்
GitLab-இல் Dropstone-ஐ எவ்வாறு பயன்படுத்தலாம் என்பதற்கான சில எடுத்துக்காட்டுகள் இங்கே.
Tip
@dropstone-ஐ விட வேறு ஒரு trigger phrase-ஐ நீங்கள் கட்டமைக்கலாம்.
-
ஒரு சிக்கலை விளக்கவும்
GitLab சிக்கலில் இந்த கருத்தைச் சேர்க்கவும்.
@dropstone explain this issueDropstone சிக்கலைப் படித்து தெளிவான விளக்கத்துடன் பதிலளிக்கும்.
-
ஒரு சிக்கலை சரிசெய்யவும்
GitLab சிக்கலில், சொல்லுங்கள்:
@dropstone fix thisDropstone ஒரு புதிய branch-ஐ உருவாக்கி, மாற்றங்களை செயல்படுத்தி, மாற்றங்களுடன் ஒரு merge request-ஐ திறக்கும்.
-
Merge requests-ஐ மதிப்பாய்வு செய்யவும்
GitLab merge request-இல் பின்வரும் கருத்தை விடுங்கள்.
@dropstone review this merge requestDropstone merge request-ஐ மதிப்பாய்வு செய்து கருத்துக்களை வழங்கும்.