cumulusci-plus-azure-devops 0.1.0.dev2__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cumulusci_plus_azure_devops-0.2.0/PKG-INFO +232 -0
- cumulusci_plus_azure_devops-0.2.0/README.md +192 -0
- cumulusci_plus_azure_devops-0.2.0/cumulusci_ado/__about__.py +1 -0
- cumulusci_plus_azure_devops-0.2.0/cumulusci_ado/azure_devops.py +60 -0
- cumulusci_plus_azure_devops-0.2.0/cumulusci_ado/cli/__init__.py +1 -0
- cumulusci_plus_azure_devops-0.2.0/cumulusci_ado/cli/ado.py +137 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/cumulusci_plugin.yml +3 -2
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/ado.py +10 -2
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/artifacttool.py +1 -1
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/artifacttool_updater.py +1 -1
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/external_tool.py +1 -1
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/adapter.py +170 -58
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/dependencies/ado_dependencies.py +13 -40
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/dependencies/ado_resolvers.py +22 -13
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/service.py +1 -1
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/pyproject.toml +11 -2
- cumulusci_plus_azure_devops-0.1.0.dev2/PKG-INFO +0 -77
- cumulusci_plus_azure_devops-0.1.0.dev2/README.md +0 -40
- cumulusci_plus_azure_devops-0.1.0.dev2/cumulusci_ado/__about__.py +0 -1
- cumulusci_plus_azure_devops-0.1.0.dev2/cumulusci_ado/azure_devops.py +0 -35
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/.gitignore +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/LICENSE +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/__init__.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/client_tool/__init__.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/client_tool/client_tool_client.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/client_tool/models/__init__.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/client_tool/models/client_tool_release.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/common/tests/test_artifacttool_updater.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/utils/tests/test_ado.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/__init__.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/dependencies/__init__.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/exceptions.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/generator/__init__.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/source/azure_devops.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/tests/test_adapter.py +0 -0
- {cumulusci_plus_azure_devops-0.1.0.dev2 → cumulusci_plus_azure_devops-0.2.0}/cumulusci_ado/vcs/ado/tests/test_service.py +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: cumulusci-plus-azure-devops
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A plugin for cumulusci plus supporting Azure DevOps
|
|
5
|
+
Project-URL: Homepage, https://github.com/jorgesolebur/CumulusCI_AzureDevOps
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/jorgesolebur/CumulusCI_AzureDevOps/issues
|
|
7
|
+
Author: Rupesh J
|
|
8
|
+
License: GNU General Public License v3.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: azure devops,cumulusci,salesforce
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: azure-devops
|
|
19
|
+
Requires-Dist: cumulusci-plus>=5.1.0
|
|
20
|
+
Requires-Dist: distro
|
|
21
|
+
Requires-Dist: humanfriendly
|
|
22
|
+
Requires-Dist: packaging>=23.0
|
|
23
|
+
Requires-Dist: requests
|
|
24
|
+
Requires-Dist: setuptools==81.0.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: coverage; extra == 'dev'
|
|
27
|
+
Requires-Dist: factory-boy; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
30
|
+
Requires-Dist: responses; extra == 'dev'
|
|
31
|
+
Provides-Extra: docs
|
|
32
|
+
Requires-Dist: myst-parser; extra == 'docs'
|
|
33
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
34
|
+
Provides-Extra: lint
|
|
35
|
+
Requires-Dist: black; extra == 'lint'
|
|
36
|
+
Requires-Dist: flake8; extra == 'lint'
|
|
37
|
+
Requires-Dist: isort; extra == 'lint'
|
|
38
|
+
Requires-Dist: pre-commit; extra == 'lint'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# cumulusci-azure-devops
|
|
42
|
+
|
|
43
|
+
A plugin for [CumulusCI](https://github.com/SFDO-Tooling/CumulusCI) supporting Azure DevOps integration.
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- Integrates Azure DevOps pipelines with CumulusCI
|
|
48
|
+
- Provides tasks and utilities for Azure DevOps automation
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
### Recommended Installation (with conflict checking)
|
|
53
|
+
|
|
54
|
+
For the best experience, use our custom installation script that checks for conflicts:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Download and run the installation script
|
|
58
|
+
curl -O https://raw.githubusercontent.com/jorgesolebur/CumulusCI_AzureDevOps/main/install.py
|
|
59
|
+
python install.py
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Manual Installation via pipx (recommended)
|
|
63
|
+
|
|
64
|
+
**Option 1: Install main app, then inject plugin (recommended)**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Install cumulusci-plus first to get cci and snowfakery commands
|
|
68
|
+
pipx install cumulusci-plus
|
|
69
|
+
|
|
70
|
+
# Inject the plugin into the same environment for proper plugin discovery
|
|
71
|
+
pipx inject cumulusci-plus cumulusci-plus-azure-devops --include-apps
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Option 2: Single installation with dependency scripts**
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Install with --include-deps to expose dependency console scripts
|
|
78
|
+
pipx install cumulusci-plus-azure-devops --include-deps
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Option 3: Basic installation (Azure DevOps plugin only)**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pipx install cumulusci-plus-azure-devops
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
> **Why Option 1 is recommended**: CumulusCI plugins need to be in the same environment as the main application for proper plugin discovery. Using `pipx inject` ensures the plugin is installed in the same virtual environment as `cumulusci-plus`.
|
|
88
|
+
|
|
89
|
+
### Manual Installation via pip
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install cumulusci-plus-azure-devops
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Upgrading
|
|
96
|
+
|
|
97
|
+
### Recommended Upgrade Method
|
|
98
|
+
|
|
99
|
+
Use our custom upgrade script for the best experience:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Download and run the upgrade script
|
|
103
|
+
curl -O https://raw.githubusercontent.com/jorgesolebur/CumulusCI_AzureDevOps/main/upgrade.py
|
|
104
|
+
python upgrade.py
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Manual Upgrade via pipx
|
|
108
|
+
|
|
109
|
+
**For injected installations (recommended method):**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Upgrade main package and update plugin
|
|
113
|
+
pipx upgrade cumulusci-plus
|
|
114
|
+
pipx inject cumulusci-plus cumulusci-plus-azure-devops --include-apps --force
|
|
115
|
+
|
|
116
|
+
# Or force reinstall everything
|
|
117
|
+
pipx uninstall cumulusci-plus
|
|
118
|
+
pipx install cumulusci-plus
|
|
119
|
+
pipx inject cumulusci-plus cumulusci-plus-azure-devops --include-apps
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**For --include-deps installations:**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Standard upgrade
|
|
126
|
+
pipx upgrade cumulusci-plus-azure-devops
|
|
127
|
+
|
|
128
|
+
# Or force reinstall
|
|
129
|
+
pipx uninstall cumulusci-plus-azure-devops
|
|
130
|
+
pipx install cumulusci-plus-azure-devops --include-deps
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Why Use the Upgrade Script?
|
|
134
|
+
|
|
135
|
+
The upgrade process varies depending on how you installed the package. Our upgrade script:
|
|
136
|
+
|
|
137
|
+
- ✅ **Detects installation method** (injected vs main package vs unknown)
|
|
138
|
+
- ✅ **Applies correct upgrade process** for each method
|
|
139
|
+
- ✅ **Handles plugin discovery** properly for injected installations
|
|
140
|
+
- ✅ **Checks current dependency versions** before and after upgrade
|
|
141
|
+
- ✅ **Provides installation-specific guidance** and next steps
|
|
142
|
+
- ✅ **Ensures dependencies are updated** to latest versions
|
|
143
|
+
|
|
144
|
+
**Installation Method Detection:**
|
|
145
|
+
|
|
146
|
+
- **Injected**: Plugin installed via `pipx inject` (recommended) ✅
|
|
147
|
+
- **Main Package**: Plugin installed via `--include-deps` ✅
|
|
148
|
+
- **Unknown**: Fallback for edge cases ⚠️
|
|
149
|
+
|
|
150
|
+
### Important Notes
|
|
151
|
+
|
|
152
|
+
- **Plugin Discovery**: For CumulusCI to discover and use this plugin, it must be installed in the same environment as `cumulusci-plus`. This is why Option 1 (using `pipx inject`) is recommended.
|
|
153
|
+
- **Conflict Warning**: This package is designed to work with `cumulusci-plus` (version 5.0.0+), not the original `cumulusci` package. Having both installed may cause conflicts.
|
|
154
|
+
- **pipx vs pip**: We recommend using `pipx` for CLI tools as it provides better isolation and prevents dependency conflicts.
|
|
155
|
+
- **Dependencies**: All required dependencies (including `cumulusci-plus`, `azure-devops`, etc.) are automatically installed.
|
|
156
|
+
- **Console Scripts**: After installation, you'll have access to these commands:
|
|
157
|
+
- `cci` and `snowfakery` (from cumulusci-plus)
|
|
158
|
+
- `cumulusci-ado` and `cci-ado` (from this plugin)
|
|
159
|
+
|
|
160
|
+
### Available Console Scripts
|
|
161
|
+
|
|
162
|
+
**From cumulusci-plus:**
|
|
163
|
+
|
|
164
|
+
- `cci` - Main CumulusCI command
|
|
165
|
+
- `snowfakery` - Data generation tool
|
|
166
|
+
|
|
167
|
+
**From this plugin:**
|
|
168
|
+
|
|
169
|
+
- `cumulusci-ado` - Azure DevOps plugin CLI
|
|
170
|
+
- `cci-ado` - Short alias for plugin CLI
|
|
171
|
+
|
|
172
|
+
### Plugin Discovery
|
|
173
|
+
|
|
174
|
+
**✅ Plugin is discoverable when:**
|
|
175
|
+
|
|
176
|
+
- Installed via `pipx inject` (Option 1)
|
|
177
|
+
- Installed via `--include-deps` (Option 2)
|
|
178
|
+
|
|
179
|
+
**❌ Plugin is NOT discoverable when:**
|
|
180
|
+
|
|
181
|
+
- Installed as separate pipx packages
|
|
182
|
+
- Main app and plugin are in different environments
|
|
183
|
+
|
|
184
|
+
When the plugin is properly discoverable, you can use it in your `cumulusci.yml` configuration and CumulusCI will automatically find and load it.
|
|
185
|
+
|
|
186
|
+
## Usage
|
|
187
|
+
|
|
188
|
+
### Plugin Management Commands
|
|
189
|
+
|
|
190
|
+
After installation, you can use these commands to manage the plugin:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Check plugin installation status
|
|
194
|
+
cumulusci-ado status
|
|
195
|
+
|
|
196
|
+
# Show version information
|
|
197
|
+
cumulusci-ado version
|
|
198
|
+
|
|
199
|
+
# Get help
|
|
200
|
+
cumulusci-ado help
|
|
201
|
+
|
|
202
|
+
# Short alias versions
|
|
203
|
+
cci-ado status
|
|
204
|
+
cci-ado version
|
|
205
|
+
cci-ado help
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### CumulusCI Integration
|
|
209
|
+
|
|
210
|
+
Add the plugin to your `cumulusci.yml`:
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
plugins:
|
|
214
|
+
azure_devops:
|
|
215
|
+
path: cumulusci_ado
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Or use via the CumulusCI CLI if installed as a package. The plugin will automatically integrate with CumulusCI when installed.
|
|
219
|
+
|
|
220
|
+
## Development
|
|
221
|
+
|
|
222
|
+
- Requires Python 3.11+
|
|
223
|
+
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines (if available)
|
|
224
|
+
|
|
225
|
+
## License
|
|
226
|
+
|
|
227
|
+
GNU General Public License v3.0
|
|
228
|
+
|
|
229
|
+
## Links
|
|
230
|
+
|
|
231
|
+
- [CumulusCI](https://github.com/jorgesolebur/CumulusCI)
|
|
232
|
+
- [Azure DevOps Python API](https://github.com/microsoft/azure-devops-python-api)
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# cumulusci-azure-devops
|
|
2
|
+
|
|
3
|
+
A plugin for [CumulusCI](https://github.com/SFDO-Tooling/CumulusCI) supporting Azure DevOps integration.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Integrates Azure DevOps pipelines with CumulusCI
|
|
8
|
+
- Provides tasks and utilities for Azure DevOps automation
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
### Recommended Installation (with conflict checking)
|
|
13
|
+
|
|
14
|
+
For the best experience, use our custom installation script that checks for conflicts:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Download and run the installation script
|
|
18
|
+
curl -O https://raw.githubusercontent.com/jorgesolebur/CumulusCI_AzureDevOps/main/install.py
|
|
19
|
+
python install.py
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Manual Installation via pipx (recommended)
|
|
23
|
+
|
|
24
|
+
**Option 1: Install main app, then inject plugin (recommended)**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Install cumulusci-plus first to get cci and snowfakery commands
|
|
28
|
+
pipx install cumulusci-plus
|
|
29
|
+
|
|
30
|
+
# Inject the plugin into the same environment for proper plugin discovery
|
|
31
|
+
pipx inject cumulusci-plus cumulusci-plus-azure-devops --include-apps
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Option 2: Single installation with dependency scripts**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Install with --include-deps to expose dependency console scripts
|
|
38
|
+
pipx install cumulusci-plus-azure-devops --include-deps
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Option 3: Basic installation (Azure DevOps plugin only)**
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pipx install cumulusci-plus-azure-devops
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> **Why Option 1 is recommended**: CumulusCI plugins need to be in the same environment as the main application for proper plugin discovery. Using `pipx inject` ensures the plugin is installed in the same virtual environment as `cumulusci-plus`.
|
|
48
|
+
|
|
49
|
+
### Manual Installation via pip
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install cumulusci-plus-azure-devops
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Upgrading
|
|
56
|
+
|
|
57
|
+
### Recommended Upgrade Method
|
|
58
|
+
|
|
59
|
+
Use our custom upgrade script for the best experience:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Download and run the upgrade script
|
|
63
|
+
curl -O https://raw.githubusercontent.com/jorgesolebur/CumulusCI_AzureDevOps/main/upgrade.py
|
|
64
|
+
python upgrade.py
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Manual Upgrade via pipx
|
|
68
|
+
|
|
69
|
+
**For injected installations (recommended method):**
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Upgrade main package and update plugin
|
|
73
|
+
pipx upgrade cumulusci-plus
|
|
74
|
+
pipx inject cumulusci-plus cumulusci-plus-azure-devops --include-apps --force
|
|
75
|
+
|
|
76
|
+
# Or force reinstall everything
|
|
77
|
+
pipx uninstall cumulusci-plus
|
|
78
|
+
pipx install cumulusci-plus
|
|
79
|
+
pipx inject cumulusci-plus cumulusci-plus-azure-devops --include-apps
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**For --include-deps installations:**
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Standard upgrade
|
|
86
|
+
pipx upgrade cumulusci-plus-azure-devops
|
|
87
|
+
|
|
88
|
+
# Or force reinstall
|
|
89
|
+
pipx uninstall cumulusci-plus-azure-devops
|
|
90
|
+
pipx install cumulusci-plus-azure-devops --include-deps
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Why Use the Upgrade Script?
|
|
94
|
+
|
|
95
|
+
The upgrade process varies depending on how you installed the package. Our upgrade script:
|
|
96
|
+
|
|
97
|
+
- ✅ **Detects installation method** (injected vs main package vs unknown)
|
|
98
|
+
- ✅ **Applies correct upgrade process** for each method
|
|
99
|
+
- ✅ **Handles plugin discovery** properly for injected installations
|
|
100
|
+
- ✅ **Checks current dependency versions** before and after upgrade
|
|
101
|
+
- ✅ **Provides installation-specific guidance** and next steps
|
|
102
|
+
- ✅ **Ensures dependencies are updated** to latest versions
|
|
103
|
+
|
|
104
|
+
**Installation Method Detection:**
|
|
105
|
+
|
|
106
|
+
- **Injected**: Plugin installed via `pipx inject` (recommended) ✅
|
|
107
|
+
- **Main Package**: Plugin installed via `--include-deps` ✅
|
|
108
|
+
- **Unknown**: Fallback for edge cases ⚠️
|
|
109
|
+
|
|
110
|
+
### Important Notes
|
|
111
|
+
|
|
112
|
+
- **Plugin Discovery**: For CumulusCI to discover and use this plugin, it must be installed in the same environment as `cumulusci-plus`. This is why Option 1 (using `pipx inject`) is recommended.
|
|
113
|
+
- **Conflict Warning**: This package is designed to work with `cumulusci-plus` (version 5.0.0+), not the original `cumulusci` package. Having both installed may cause conflicts.
|
|
114
|
+
- **pipx vs pip**: We recommend using `pipx` for CLI tools as it provides better isolation and prevents dependency conflicts.
|
|
115
|
+
- **Dependencies**: All required dependencies (including `cumulusci-plus`, `azure-devops`, etc.) are automatically installed.
|
|
116
|
+
- **Console Scripts**: After installation, you'll have access to these commands:
|
|
117
|
+
- `cci` and `snowfakery` (from cumulusci-plus)
|
|
118
|
+
- `cumulusci-ado` and `cci-ado` (from this plugin)
|
|
119
|
+
|
|
120
|
+
### Available Console Scripts
|
|
121
|
+
|
|
122
|
+
**From cumulusci-plus:**
|
|
123
|
+
|
|
124
|
+
- `cci` - Main CumulusCI command
|
|
125
|
+
- `snowfakery` - Data generation tool
|
|
126
|
+
|
|
127
|
+
**From this plugin:**
|
|
128
|
+
|
|
129
|
+
- `cumulusci-ado` - Azure DevOps plugin CLI
|
|
130
|
+
- `cci-ado` - Short alias for plugin CLI
|
|
131
|
+
|
|
132
|
+
### Plugin Discovery
|
|
133
|
+
|
|
134
|
+
**✅ Plugin is discoverable when:**
|
|
135
|
+
|
|
136
|
+
- Installed via `pipx inject` (Option 1)
|
|
137
|
+
- Installed via `--include-deps` (Option 2)
|
|
138
|
+
|
|
139
|
+
**❌ Plugin is NOT discoverable when:**
|
|
140
|
+
|
|
141
|
+
- Installed as separate pipx packages
|
|
142
|
+
- Main app and plugin are in different environments
|
|
143
|
+
|
|
144
|
+
When the plugin is properly discoverable, you can use it in your `cumulusci.yml` configuration and CumulusCI will automatically find and load it.
|
|
145
|
+
|
|
146
|
+
## Usage
|
|
147
|
+
|
|
148
|
+
### Plugin Management Commands
|
|
149
|
+
|
|
150
|
+
After installation, you can use these commands to manage the plugin:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Check plugin installation status
|
|
154
|
+
cumulusci-ado status
|
|
155
|
+
|
|
156
|
+
# Show version information
|
|
157
|
+
cumulusci-ado version
|
|
158
|
+
|
|
159
|
+
# Get help
|
|
160
|
+
cumulusci-ado help
|
|
161
|
+
|
|
162
|
+
# Short alias versions
|
|
163
|
+
cci-ado status
|
|
164
|
+
cci-ado version
|
|
165
|
+
cci-ado help
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### CumulusCI Integration
|
|
169
|
+
|
|
170
|
+
Add the plugin to your `cumulusci.yml`:
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
plugins:
|
|
174
|
+
azure_devops:
|
|
175
|
+
path: cumulusci_ado
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Or use via the CumulusCI CLI if installed as a package. The plugin will automatically integrate with CumulusCI when installed.
|
|
179
|
+
|
|
180
|
+
## Development
|
|
181
|
+
|
|
182
|
+
- Requires Python 3.11+
|
|
183
|
+
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines (if available)
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
GNU General Public License v3.0
|
|
188
|
+
|
|
189
|
+
## Links
|
|
190
|
+
|
|
191
|
+
- [CumulusCI](https://github.com/jorgesolebur/CumulusCI)
|
|
192
|
+
- [Azure DevOps Python API](https://github.com/microsoft/azure-devops-python-api)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.0"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
2
|
+
|
|
3
|
+
from cumulusci.cli.utils import check_latest_version, parse_version
|
|
4
|
+
from cumulusci.core.utils import import_global
|
|
5
|
+
from cumulusci.plugins.plugin_base import PluginBase
|
|
6
|
+
from cumulusci.vcs.vcs_source import VCSSource
|
|
7
|
+
|
|
8
|
+
from cumulusci_ado import __version__
|
|
9
|
+
from cumulusci_ado.utils.ado import get_ado_cci_plus_upgrade_command
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AzureDevOpsPlugin(PluginBase):
|
|
13
|
+
"""Plugin for Azure DevOps integration."""
|
|
14
|
+
|
|
15
|
+
plugin_config_file = "cumulusci_plugin.yml"
|
|
16
|
+
|
|
17
|
+
def __init__(self, **kwargs):
|
|
18
|
+
super().__init__(**kwargs)
|
|
19
|
+
self._api_name = "cumulusci-plus-azure-devops"
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def version(self) -> str:
|
|
23
|
+
"""Returns the version of the plugin."""
|
|
24
|
+
try:
|
|
25
|
+
return version(self._api_name)
|
|
26
|
+
except PackageNotFoundError:
|
|
27
|
+
return "0.0.0"
|
|
28
|
+
|
|
29
|
+
def initialize(self) -> None:
|
|
30
|
+
"""Initialize the plugin."""
|
|
31
|
+
super().initialize()
|
|
32
|
+
|
|
33
|
+
# Delay import of service to avoid circular import during plugin loading
|
|
34
|
+
import_global("cumulusci_ado.vcs.ado.service.AzureDevOpsService")
|
|
35
|
+
|
|
36
|
+
# Register VCS source
|
|
37
|
+
VCSSource.register(
|
|
38
|
+
"azure_devops", "cumulusci_ado.vcs.ado.source.azure_devops.ADOSource"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
# Load dependencies and resolvers
|
|
42
|
+
from cumulusci_ado.vcs.ado.dependencies.ado_dependencies import VCS_ADO as dep
|
|
43
|
+
from cumulusci_ado.vcs.ado.dependencies.ado_resolvers import VCS_ADO as res
|
|
44
|
+
|
|
45
|
+
assert (
|
|
46
|
+
dep == res
|
|
47
|
+
), "VCS_ADO must match in dependencies and resolvers. (Assertion done to load the ado dependencies and resolvers correctly)"
|
|
48
|
+
|
|
49
|
+
def teardown(self) -> None:
|
|
50
|
+
"""Tear down the plugin."""
|
|
51
|
+
super().teardown()
|
|
52
|
+
|
|
53
|
+
def check_latest_version(self):
|
|
54
|
+
"""Override this method to check for the latest version of the plugin."""
|
|
55
|
+
check_latest_version(
|
|
56
|
+
pkg=self._api_name,
|
|
57
|
+
installed_version=parse_version(__version__),
|
|
58
|
+
tstamp_file="cumulus_ado_timestamp",
|
|
59
|
+
message=f"An update to {self.name} is available. To install the update, run this command: {get_ado_cci_plus_upgrade_command()}",
|
|
60
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""CumulusCI Azure DevOps CLI package"""
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Command Line Interface for CumulusCI Plus Azure DevOps Plugin
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
10
|
+
|
|
11
|
+
from cumulusci_ado.__about__ import __version__
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def run_command(cmd, capture_output=True, check=True):
|
|
15
|
+
"""Run a command and return the result."""
|
|
16
|
+
try:
|
|
17
|
+
result = subprocess.run(
|
|
18
|
+
cmd, shell=True, capture_output=capture_output, text=True, check=check
|
|
19
|
+
)
|
|
20
|
+
return result
|
|
21
|
+
except subprocess.CalledProcessError as e:
|
|
22
|
+
return e
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_version():
|
|
26
|
+
"""Get the version of the package."""
|
|
27
|
+
try:
|
|
28
|
+
return version("cumulusci-plus-azure-devops")
|
|
29
|
+
except PackageNotFoundError:
|
|
30
|
+
return __version__
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def check_plugin_status():
|
|
34
|
+
"""Check if the plugin is properly installed and configured."""
|
|
35
|
+
print("🔍 Checking CumulusCI Plus Azure DevOps Plugin Status...")
|
|
36
|
+
print(f"📦 Package Version: {get_version()}")
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
"""Check if CCI Plus is available."""
|
|
40
|
+
result = run_command("cci --version", check=False)
|
|
41
|
+
if result.returncode != 0:
|
|
42
|
+
print("❌ CumulusCI Plus is not installed or not available in PATH")
|
|
43
|
+
print("Please install CumulusCI Plus first:")
|
|
44
|
+
print(" pip install cumulusci-plus")
|
|
45
|
+
return False
|
|
46
|
+
|
|
47
|
+
if result.stdout.strip().find("CumulusCI Plus version:") == -1:
|
|
48
|
+
print("❌ CumulusCI Plus version not found")
|
|
49
|
+
return False
|
|
50
|
+
|
|
51
|
+
print("✅ CumulusCI Plus is available.")
|
|
52
|
+
|
|
53
|
+
if result.stdout.strip().find("CumulusCI Plus Azure DevOps:") == -1:
|
|
54
|
+
print("❌ CumulusCI Plus Azure DevOps integration not found")
|
|
55
|
+
return False
|
|
56
|
+
|
|
57
|
+
print("✅ CumulusCI Plus Azure DevOps integration is available.")
|
|
58
|
+
|
|
59
|
+
except ImportError as e:
|
|
60
|
+
print(f"❌ Failed to import plugin package: {e}")
|
|
61
|
+
return False
|
|
62
|
+
|
|
63
|
+
print("\n🎉 Plugin is properly installed and ready to use!")
|
|
64
|
+
print("\n📚 Next steps:")
|
|
65
|
+
print("1. Configure your CumulusCI project to use this plugin")
|
|
66
|
+
print("2. Add Azure DevOps service configuration")
|
|
67
|
+
print("3. Use CumulusCI commands with Azure DevOps integration")
|
|
68
|
+
|
|
69
|
+
return True
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def show_help():
|
|
73
|
+
"""Show help information."""
|
|
74
|
+
print("CumulusCI Plus Azure DevOps Plugin CLI")
|
|
75
|
+
print("=" * 40)
|
|
76
|
+
print()
|
|
77
|
+
print("This is a plugin for CumulusCI Plus that adds Azure DevOps integration.")
|
|
78
|
+
print(
|
|
79
|
+
"It's not a standalone application, but extends CumulusCI Plus's functionality."
|
|
80
|
+
)
|
|
81
|
+
print()
|
|
82
|
+
print("Commands:")
|
|
83
|
+
print(" status - Check plugin installation status")
|
|
84
|
+
print(" version - Show version information")
|
|
85
|
+
print(" help - Show this help message")
|
|
86
|
+
print()
|
|
87
|
+
print("Usage with CumulusCI Plus:")
|
|
88
|
+
print(" This plugin integrates with CumulusCI Plus automatically when installed.")
|
|
89
|
+
print(" Use standard CumulusCI Plus commands with Azure DevOps repositories.")
|
|
90
|
+
print()
|
|
91
|
+
print("Configuration:")
|
|
92
|
+
print(" Add to your cumulusci.yml:")
|
|
93
|
+
print(" plugins:")
|
|
94
|
+
print(" azure_devops:")
|
|
95
|
+
print(" config:")
|
|
96
|
+
print(" feed_name: New Project Feed")
|
|
97
|
+
print()
|
|
98
|
+
print("For more information, see the documentation.")
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def main():
|
|
102
|
+
"""Main CLI entry point."""
|
|
103
|
+
parser = argparse.ArgumentParser(
|
|
104
|
+
description="CumulusCI Plus Azure DevOps Plugin CLI", prog="cumulusci-ado"
|
|
105
|
+
)
|
|
106
|
+
parser.add_argument(
|
|
107
|
+
"command",
|
|
108
|
+
nargs="?",
|
|
109
|
+
choices=["status", "version", "help"],
|
|
110
|
+
default="help",
|
|
111
|
+
help="Command to run",
|
|
112
|
+
)
|
|
113
|
+
parser.add_argument(
|
|
114
|
+
"--version",
|
|
115
|
+
action="version",
|
|
116
|
+
version=f"cumulusci-plus-azure-devops {get_version()}",
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
if len(sys.argv) == 1:
|
|
120
|
+
show_help()
|
|
121
|
+
return
|
|
122
|
+
|
|
123
|
+
args = parser.parse_args()
|
|
124
|
+
|
|
125
|
+
if args.command == "status":
|
|
126
|
+
success = check_plugin_status()
|
|
127
|
+
sys.exit(0 if success else 1)
|
|
128
|
+
elif args.command == "version":
|
|
129
|
+
print(f"cumulusci-plus-azure-devops {get_version()}")
|
|
130
|
+
elif args.command == "help":
|
|
131
|
+
show_help()
|
|
132
|
+
else:
|
|
133
|
+
show_help()
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
if __name__ == "__main__":
|
|
137
|
+
main()
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
plugins:
|
|
3
3
|
azure_devops:
|
|
4
4
|
# Azure DevOps Plugin Configuration
|
|
5
|
-
name: Azure DevOps
|
|
6
|
-
version: 1.0
|
|
5
|
+
name: CumulusCI Plus Azure DevOps
|
|
7
6
|
description: Plugin for Azure DevOps integration
|
|
8
7
|
author: Rupesh J
|
|
9
8
|
|
|
@@ -17,6 +16,8 @@ plugins:
|
|
|
17
16
|
completion_opts_bypass_reason: Automated bypass for CI/CD pipeline
|
|
18
17
|
organisation_artifact: False # When True artifacts are created at Organisation level otherwise, its project level.
|
|
19
18
|
feed_name: SFCore Packages # Default feed name for salesforce packages
|
|
19
|
+
artifact_folder_path: # Artifact folder in repo to upload for salesforce packages
|
|
20
|
+
pull_request_approve_on_merge: True # When True, the created pull request is approved on merge.
|
|
20
21
|
services:
|
|
21
22
|
azure_devops:
|
|
22
23
|
description: Configure connection for Azure DevOps Server
|
|
@@ -6,13 +6,14 @@ from typing import Optional, Tuple
|
|
|
6
6
|
from urllib.parse import ParseResult, urlparse
|
|
7
7
|
|
|
8
8
|
try:
|
|
9
|
-
import colorama
|
|
9
|
+
import colorama # type: ignore
|
|
10
10
|
except ImportError:
|
|
11
11
|
# coloredlogs only installs colorama on Windows
|
|
12
12
|
pass
|
|
13
13
|
|
|
14
14
|
from cumulusci.core.config.project_config import BaseProjectConfig
|
|
15
15
|
from cumulusci.core.exceptions import CumulusCIFailure
|
|
16
|
+
from cumulusci.utils import CUMULUSCI_PATH
|
|
16
17
|
from cumulusci.utils.git import EMPTY_URL_MESSAGE
|
|
17
18
|
|
|
18
19
|
from cumulusci_ado.utils.common.artifacttool import ArtifactToolInvoker
|
|
@@ -21,7 +22,10 @@ from cumulusci_ado.utils.common.external_tool import (
|
|
|
21
22
|
ProgressReportingExternalToolInvoker,
|
|
22
23
|
)
|
|
23
24
|
|
|
24
|
-
logger = logging.getLogger(
|
|
25
|
+
logger = logging.getLogger("cumulusci_ado")
|
|
26
|
+
|
|
27
|
+
PIP_UPDATE_CMD = "pip install --upgrade cumulusci-plus-azure-devops"
|
|
28
|
+
PIPX_UPDATE_CMD = "pipx upgrade cumulusci-plus-azure-devops"
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
def parse_repo_url(
|
|
@@ -203,3 +207,7 @@ def sanitize_path_name(path_name: str) -> str:
|
|
|
203
207
|
path_name = path_name[len("refs/heads/") :]
|
|
204
208
|
|
|
205
209
|
return path_name
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def get_ado_cci_plus_upgrade_command():
|
|
213
|
+
return PIPX_UPDATE_CMD if "pipx" in CUMULUSCI_PATH.lower() else PIP_UPDATE_CMD
|
|
@@ -20,7 +20,7 @@ ARTIFACTTOOL_OVERRIDE_PATH_ENVKEY = "AZURE_DEVOPS_EXT_ARTIFACTTOOL_OVERRIDE_PATH
|
|
|
20
20
|
ARTIFACTTOOL_OVERRIDE_URL_ENVKEY = "AZURE_DEVOPS_EXT_ARTIFACTTOOL_OVERRIDE_URL"
|
|
21
21
|
ARTIFACTTOOL_OVERRIDE_VERSION_ENVKEY = "AZURE_DEVOPS_EXT_ARTIFACTTOOL_OVERRIDE_VERSION"
|
|
22
22
|
|
|
23
|
-
logger = logging.getLogger(
|
|
23
|
+
logger = logging.getLogger("cumulusci_ado")
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
# pylint: disable=too-few-public-methods
|