@backstage/plugin-scaffolder-backend-module-azure 0.2.17-next.0 → 0.2.17
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.
- package/CHANGELOG.md +10 -0
- package/README.md +130 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend-module-azure
|
|
2
2
|
|
|
3
|
+
## 0.2.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 88abcc6: Improved README with clearer setup and usage guidance.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-plugin-api@1.6.1
|
|
10
|
+
- @backstage/plugin-scaffolder-node@0.12.3
|
|
11
|
+
- @backstage/integration@1.19.2
|
|
12
|
+
|
|
3
13
|
## 0.2.17-next.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,133 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend-module-azure
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The Azure DevOps module for [@backstage/plugin-scaffolder-backend](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This module provides scaffolder actions for Azure DevOps integration.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# From your Backstage root directory
|
|
11
|
+
yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend-module-azure
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Then add it to your backend:
|
|
15
|
+
|
|
16
|
+
```ts title="packages/backend/src/index.ts"
|
|
17
|
+
import { createBackend } from '@backstage/backend-defaults';
|
|
18
|
+
|
|
19
|
+
const backend = createBackend();
|
|
20
|
+
|
|
21
|
+
// ... other plugins
|
|
22
|
+
|
|
23
|
+
backend.add(import('@backstage/plugin-scaffolder-backend'));
|
|
24
|
+
backend.add(import('@backstage/plugin-scaffolder-backend-module-azure'));
|
|
25
|
+
|
|
26
|
+
backend.start();
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Actions
|
|
30
|
+
|
|
31
|
+
### `publish:azure`
|
|
32
|
+
|
|
33
|
+
Initializes a git repository with the content in the workspace and publishes it to Azure DevOps.
|
|
34
|
+
|
|
35
|
+
#### Input Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Required | Description |
|
|
38
|
+
| ------------------ | --------- | -------- | ------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `repoUrl` | `string` | Yes | Repository URL in the format: `dev.azure.com?organization=<org>&project=<project>&repo=<repo>` |
|
|
40
|
+
| `description` | `string` | No | Repository description |
|
|
41
|
+
| `defaultBranch` | `string` | No | Default branch for the repository. Default: `master` |
|
|
42
|
+
| `sourcePath` | `string` | No | Path within the workspace to use as repository root. If omitted, the entire workspace will be published |
|
|
43
|
+
| `token` | `string` | No | Personal Access Token for Azure DevOps authentication |
|
|
44
|
+
| `gitCommitMessage` | `string` | No | Initial commit message. Default: `initial commit` |
|
|
45
|
+
| `gitAuthorName` | `string` | No | Author name for the commit. Default: `Scaffolder` |
|
|
46
|
+
| `gitAuthorEmail` | `string` | No | Author email for the commit |
|
|
47
|
+
| `signCommit` | `boolean` | No | Sign the commit with the configured PGP private key |
|
|
48
|
+
|
|
49
|
+
#### Output Parameters
|
|
50
|
+
|
|
51
|
+
| Parameter | Type | Description |
|
|
52
|
+
| ----------------- | -------- | --------------------------------------- |
|
|
53
|
+
| `remoteUrl` | `string` | URL to the repository |
|
|
54
|
+
| `repoContentsUrl` | `string` | URL to the root of the repository (web) |
|
|
55
|
+
| `repositoryId` | `string` | ID of the created repository |
|
|
56
|
+
| `commitHash` | `string` | Git commit hash of the initial commit |
|
|
57
|
+
|
|
58
|
+
#### Examples
|
|
59
|
+
|
|
60
|
+
**Basic usage:**
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
steps:
|
|
64
|
+
- id: publish
|
|
65
|
+
action: publish:azure
|
|
66
|
+
name: Publish to Azure DevOps
|
|
67
|
+
input:
|
|
68
|
+
repoUrl: 'dev.azure.com?organization=myorg&project=myproject&repo=myrepo'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**With custom branch and commit message:**
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
steps:
|
|
75
|
+
- id: publish
|
|
76
|
+
action: publish:azure
|
|
77
|
+
name: Publish to Azure DevOps
|
|
78
|
+
input:
|
|
79
|
+
repoUrl: 'dev.azure.com?organization=myorg&project=myproject&repo=myrepo'
|
|
80
|
+
defaultBranch: main
|
|
81
|
+
gitCommitMessage: 'Initial project setup'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**With author information:**
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
steps:
|
|
88
|
+
- id: publish
|
|
89
|
+
action: publish:azure
|
|
90
|
+
name: Publish to Azure DevOps
|
|
91
|
+
input:
|
|
92
|
+
repoUrl: 'dev.azure.com?organization=myorg&project=myproject&repo=myrepo'
|
|
93
|
+
gitAuthorName: 'John Doe'
|
|
94
|
+
gitAuthorEmail: 'john.doe@example.com'
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Using a specific source path:**
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
steps:
|
|
101
|
+
- id: publish
|
|
102
|
+
action: publish:azure
|
|
103
|
+
name: Publish to Azure DevOps
|
|
104
|
+
input:
|
|
105
|
+
repoUrl: 'dev.azure.com?organization=myorg&project=myproject&repo=myrepo'
|
|
106
|
+
sourcePath: 'packages/my-app'
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**With authentication token:**
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
steps:
|
|
113
|
+
- id: publish
|
|
114
|
+
action: publish:azure
|
|
115
|
+
name: Publish to Azure DevOps
|
|
116
|
+
input:
|
|
117
|
+
repoUrl: 'dev.azure.com?organization=myorg&project=myproject&repo=myrepo'
|
|
118
|
+
token: ${{ secrets.AZURE_TOKEN }}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Configuration
|
|
122
|
+
|
|
123
|
+
To use this module, you need to configure Azure DevOps integration in your `app-config.yaml`:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
integrations:
|
|
127
|
+
azure:
|
|
128
|
+
- host: dev.azure.com
|
|
129
|
+
credentials:
|
|
130
|
+
- personalAccessToken: ${AZURE_TOKEN}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
For more information on Azure DevOps integration, see the [Azure DevOps integration documentation](https://backstage.io/docs/integrations/azure/locations).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-backend-module-azure",
|
|
3
|
-
"version": "0.2.17
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "The azure module for @backstage/plugin-scaffolder-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin-module",
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"test": "backstage-cli package test"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@backstage/backend-plugin-api": "1.6.
|
|
54
|
-
"@backstage/config": "1.3.6",
|
|
55
|
-
"@backstage/errors": "1.2.7",
|
|
56
|
-
"@backstage/integration": "1.19.2
|
|
57
|
-
"@backstage/plugin-scaffolder-node": "0.12.3
|
|
53
|
+
"@backstage/backend-plugin-api": "^1.6.1",
|
|
54
|
+
"@backstage/config": "^1.3.6",
|
|
55
|
+
"@backstage/errors": "^1.2.7",
|
|
56
|
+
"@backstage/integration": "^1.19.2",
|
|
57
|
+
"@backstage/plugin-scaffolder-node": "^0.12.3",
|
|
58
58
|
"azure-devops-node-api": "^14.0.0",
|
|
59
59
|
"yaml": "^2.0.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@backstage/cli": "0.35.2
|
|
63
|
-
"@backstage/plugin-scaffolder-node-test-utils": "0.3.7
|
|
62
|
+
"@backstage/cli": "^0.35.2",
|
|
63
|
+
"@backstage/plugin-scaffolder-node-test-utils": "^0.3.7"
|
|
64
64
|
}
|
|
65
65
|
}
|