Skip to content

Commit 6f3cc17

Browse files
committed
Fix pre-commit issues
1 parent e6225d2 commit 6f3cc17

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

Scenarios/DeliveryTargets.md

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ AL-Go for GitHub provides experimental support for delivering your Business Cent
3030
DeliveryTargets in AL-Go define where and how your built applications should be delivered after a successful build. Each delivery target is configured through:
3131

3232
1. **Context Secret**: A secret named `<DeliveryTarget>Context` containing connection information
33-
2. **Delivery Script**: An optional PowerShell script named `DeliverTo<DeliveryTarget>.ps1` for custom delivery logic
34-
3. **Settings**: Optional configuration in AL-Go settings files
33+
1. **Delivery Script**: An optional PowerShell script named `DeliverTo<DeliveryTarget>.ps1` for custom delivery logic
34+
1. **Settings**: Optional configuration in AL-Go settings files
3535

3636
### Supported Delivery Targets
3737

@@ -49,8 +49,8 @@ GitHub Packages provides a free NuGet feed for each GitHub organization. This is
4949
### Step 1: Create Personal Access Token
5050

5151
1. Navigate to [GitHub Personal Access Tokens](https://github.com/settings/tokens/new)
52-
2. Create a **Classic Personal Access Token** (Fine-grained tokens don't support packages yet)
53-
3. Select the following scopes:
52+
1. Create a **Classic Personal Access Token** (Fine-grained tokens don't support packages yet)
53+
1. Select the following scopes:
5454
- `write:packages` - Required for publishing packages
5555
- `read:packages` - Required for consuming packages
5656
- `repo` - Required if your repositories are private
@@ -64,6 +64,7 @@ Create an organizational secret named `GitHubPackagesContext` with the following
6464
```
6565

6666
Replace:
67+
6768
- `YOUR_TOKEN_HERE` with your personal access token
6869
- `YOUR_ORG` with your GitHub organization name
6970

@@ -100,6 +101,7 @@ Create a secret named `NuGetContext` with the following format:
100101
```
101102

102103
Common NuGet feed URLs:
104+
103105
- **Azure DevOps**: `https://pkgs.dev.azure.com/{org}/{project}/_packaging/{feedName}/nuget/v3/index.json`
104106
- **GitHub Packages**: `https://nuget.pkg.github.com/{org}/index.json`
105107
- **NuGet.org**: `https://api.nuget.org/v3/index.json`
@@ -127,11 +129,13 @@ Unlike GitHub Packages, NuGet feeds configured with `NuGetContext` are not autom
127129
**Use Case**: A company developing Per-Tenant Extensions (PTEs) wants to automatically publish apps to GitHub Packages for internal distribution and dependency management.
128130

129131
**Organizational Secret**: `GitHubPackagesContext`
132+
130133
```json
131134
{"token":"ghp_1234567890abcdef","serverUrl":"https://nuget.pkg.github.com/contoso/index.json"}
132135
```
133136

134137
**AL-Go-Settings.json** (optional):
138+
135139
```json
136140
{
137141
"DeliverToGitHubPackages": {
@@ -146,11 +150,13 @@ Unlike GitHub Packages, NuGet feeds configured with `NuGetContext` are not autom
146150
**Use Case**: A partner company with existing Azure DevOps infrastructure wants to deliver PTEs to their existing Azure DevOps Artifacts feed for controlled distribution.
147151

148152
**Repository Secret**: `NuGetContext`
153+
149154
```json
150155
{"token":"YOUR_AZURE_DEVOPS_TOKEN","serverUrl":"https://pkgs.dev.azure.com/contoso/BusinessCentral/_packaging/BC-Apps/nuget/v3/index.json"}
151156
```
152157

153158
**AL-Go-Settings.json**:
159+
154160
```json
155161
{
156162
"trustedNuGetFeeds": [
@@ -168,6 +174,7 @@ Unlike GitHub Packages, NuGet feeds configured with `NuGetContext` are not autom
168174
**Use Case**: A PTE development team that wants to publish development builds to GitHub Packages and production releases to a private NuGet feed.
169175

170176
**AL-Go-Settings.json**:
177+
171178
```json
172179
{
173180
"DeliverToGitHubPackages": {
@@ -191,33 +198,39 @@ Unlike GitHub Packages, NuGet feeds configured with `NuGetContext` are not autom
191198
### Common Issues
192199

193200
#### 1. Missing Context Secret
201+
194202
**Error**: `Secret 'GitHubPackagesContext' not found`
195203
**Solution**: Ensure the secret is created at the organization level (or repository level) and is accessible to your repository.
196204

197205
#### 2. Authentication Failed
206+
198207
**Error**: `401 Unauthorized` when publishing packages
199-
**Solution**:
208+
**Solution**:
209+
200210
- Verify your personal access token has the correct scopes
201211
- Check if your token has expired
202212
- Ensure your token has access to the target organization
203213

204214
#### 3. Package Not Found During Dependency Resolution
215+
205216
**Error**: Unable to find package during build
206217
**Solution**:
218+
207219
- Verify the package was published successfully
208220
- Check that dependency resolution is configured correctly
209221
- Ensure the package name and version match your app.json dependencies
210222

211223
#### 4. Curly Brackets Masked in Logs
224+
212225
**Error**: Seeing `***` instead of JSON in logs
213226
**Solution**: Ensure your JSON secrets are compressed (single line) without formatting.
214227

215228
### Debugging Steps
216229

217230
1. **Check Workflow Logs**: Look for the "Deliver to [Target]" job in your CI/CD workflow
218-
2. **Verify Package Publication**: Check your organization's packages page
219-
3. **Test Dependency Resolution**: Look for "Resolving Dependencies" and "installing app dependencies" in build logs
220-
4. **Validate Secret Format**: Use `New-ALGoNuGetContext` to generate correctly formatted secrets
231+
1. **Verify Package Publication**: Check your organization's packages page
232+
1. **Test Dependency Resolution**: Look for "Resolving Dependencies" and "installing app dependencies" in build logs
233+
1. **Validate Secret Format**: Use `New-ALGoNuGetContext` to generate correctly formatted secrets
221234

222235
## Advanced Scenarios
223236

@@ -226,10 +239,11 @@ Unlike GitHub Packages, NuGet feeds configured with `NuGetContext` are not autom
226239
For advanced scenarios, you can create custom delivery scripts:
227240

228241
1. Create a PowerShell script named `DeliverTo<TargetName>.ps1` in your `.github` folder
229-
2. Create a context secret named `<TargetName>Context`
230-
3. AL-Go will automatically detect and use your custom delivery target
242+
1. Create a context secret named `<TargetName>Context`
243+
1. AL-Go will automatically detect and use your custom delivery target
231244

232245
Example custom delivery script:
246+
233247
```powershell
234248
# .github/DeliverToCustomFeed.ps1
235249
Param(
@@ -299,14 +313,14 @@ You can configure multiple trusted NuGet feeds for dependency resolution:
299313
### Best Practices
300314

301315
1. **Use semantic versioning**: Follow semantic versioning for your packages
302-
2. **Test in isolation**: Test delivery configuration in a separate repository first
303-
3. **Monitor package sizes**: Be aware of package size limits
304-
4. **Document dependencies**: Clearly document your app dependencies
305-
5. **Regular cleanup**: Implement package cleanup policies
316+
1. **Test in isolation**: Test delivery configuration in a separate repository first
317+
1. **Monitor package sizes**: Be aware of package size limits
318+
1. **Document dependencies**: Clearly document your app dependencies
319+
1. **Regular cleanup**: Implement package cleanup policies
306320

307321
## Next Steps
308322

309323
- [Learn more about AL-Go Settings](https://aka.ms/algosettings)
310324
- [Explore Continuous Delivery options](../Workshop/ContinuousDelivery.md)
311325
- [Set up dependencies between repositories](../Workshop/Dependencies2.md)
312-
- [Understand AL-Go Secrets](https://aka.ms/algosecrets)
326+
- [Understand AL-Go Secrets](https://aka.ms/algosecrets)

Workshop/ContinuousDelivery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ For comprehensive documentation on setting up NuGet and GitHub Packages delivery
8080
### Quick Setup for GitHub Packages
8181

8282
1. **Create Personal Access Token**: Create a classic personal access token with `write:packages` scope
83-
2. **Create Organizational Secret**: Create `GitHubPackagesContext` secret with format:
83+
1. **Create Organizational Secret**: Create `GitHubPackagesContext` secret with format:
8484
```json
8585
{"token":"ghp_YOUR_TOKEN","serverUrl":"https://nuget.pkg.github.com/YOUR_ORG/index.json"}
8686
```
87-
3. **Run CI/CD**: Your apps will automatically be published to GitHub Packages after successful builds
87+
1. **Run CI/CD**: Your apps will automatically be published to GitHub Packages after successful builds
8888

8989
### Quick Setup for Custom NuGet Feed
9090

9191
1. **Create NuGetContext Secret**: Create `NuGetContext` secret with your custom feed URL and token
92-
2. **Configure Dependency Resolution**: Add your feed to `trustedNuGetFeeds` setting if you want to use it for dependencies
93-
3. **Run CI/CD**: Your apps will be delivered to the specified NuGet feed
92+
1. **Configure Dependency Resolution**: Add your feed to `trustedNuGetFeeds` setting if you want to use it for dependencies
93+
1. **Run CI/CD**: Your apps will be delivered to the specified NuGet feed
9494

9595
For detailed step-by-step instructions, configuration examples, and troubleshooting, refer to the [comprehensive DeliveryTargets guide](../Scenarios/DeliveryTargets.md).
9696

0 commit comments

Comments
 (0)