@backstage/plugin-scaffolder-backend-module-azure 0.2.17-next.0 → 0.2.18-next.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +130 -2
  3. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @backstage/plugin-scaffolder-backend-module-azure
2
2
 
3
+ ## 0.2.18-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@1.7.0-next.0
9
+ - @backstage/plugin-scaffolder-node@0.12.4-next.0
10
+ - @backstage/integration@1.19.3-next.0
11
+ - @backstage/config@1.3.6
12
+ - @backstage/errors@1.2.7
13
+
14
+ ## 0.2.17
15
+
16
+ ### Patch Changes
17
+
18
+ - 88abcc6: Improved README with clearer setup and usage guidance.
19
+ - Updated dependencies
20
+ - @backstage/backend-plugin-api@1.6.1
21
+ - @backstage/plugin-scaffolder-node@0.12.3
22
+ - @backstage/integration@1.19.2
23
+
3
24
  ## 0.2.17-next.0
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -1,5 +1,133 @@
1
1
  # @backstage/plugin-scaffolder-backend-module-azure
2
2
 
3
- The azure module for [@backstage/plugin-scaffolder-backend](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend).
3
+ The Azure DevOps module for [@backstage/plugin-scaffolder-backend](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend).
4
4
 
5
- _This plugin was created through the Backstage CLI_
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-next.0",
3
+ "version": "0.2.18-next.0",
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.0",
53
+ "@backstage/backend-plugin-api": "1.7.0-next.0",
54
54
  "@backstage/config": "1.3.6",
55
55
  "@backstage/errors": "1.2.7",
56
- "@backstage/integration": "1.19.2-next.0",
57
- "@backstage/plugin-scaffolder-node": "0.12.3-next.0",
56
+ "@backstage/integration": "1.19.3-next.0",
57
+ "@backstage/plugin-scaffolder-node": "0.12.4-next.0",
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-next.1",
63
- "@backstage/plugin-scaffolder-node-test-utils": "0.3.7-next.1"
62
+ "@backstage/cli": "0.35.3-next.0",
63
+ "@backstage/plugin-scaffolder-node-test-utils": "0.3.8-next.0"
64
64
  }
65
65
  }