Skip to content

Commit 55c4c99

Browse files
authored
feat: add commands (#5)
1 parent b41e1cd commit 55c4c99

File tree

273 files changed

+38342
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+38342
-43
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# azure-linux-dev-tools
1+
# azldev-preview - AZL Dev Tool Preview
22

33
Follow the existing code style and conventions for similar code. Refer to all of the documents listed below:
44
- [CONTRIBUTING.md](../CONTRIBUTING.md) for general human and AI agent guidelines.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
name: Download azldev tool
5+
trigger: none
6+
7+
resources:
8+
repositories:
9+
- repository: templates
10+
type: git
11+
name: OneBranch.Pipelines/GovernedTemplates
12+
ref: refs/heads/main
13+
14+
variables:
15+
- group: "Agent pools (DEV)"
16+
17+
extends:
18+
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates
19+
parameters:
20+
featureFlags:
21+
runOnHost: true
22+
stages:
23+
- stage: DownloadStage
24+
jobs:
25+
- job: DownloadJob
26+
strategy:
27+
matrix:
28+
x86_64:
29+
poolName: $(DEV_AMD64_Managed_AZL3)
30+
arch: 'x86_64'
31+
aarch64:
32+
poolName: $(DEV_ARM64_Managed_AZL3)
33+
arch: 'aarch64'
34+
pool:
35+
type: linux
36+
name: $(poolName)
37+
variables:
38+
ob_outputDirectory: '$(Build.SourcesDirectory)/ToBePublished'
39+
ob_artifactBaseName: 'drop_download_$(arch)_$(System.JobAttempt)'
40+
steps:
41+
- template: templates/azldev_download_use_job.yml@self
42+
parameters:
43+
arch: '$(arch)'
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
name: Build azldev tool
5+
trigger: none
6+
7+
resources:
8+
repositories:
9+
- repository: templates
10+
type: git
11+
name: OneBranch.Pipelines/GovernedTemplates
12+
ref: refs/heads/main
13+
14+
variables:
15+
- group: "Agent pools (DEV)"
16+
17+
extends:
18+
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates
19+
parameters:
20+
featureFlags:
21+
runOnHost: true
22+
stages:
23+
- stage: BuildStage
24+
jobs:
25+
- job: BuildJob
26+
strategy:
27+
matrix:
28+
x86_64:
29+
poolName: $(DEV_AMD64_Managed_AZL3)
30+
arch: 'x86_64'
31+
aarch64:
32+
poolName: $(DEV_ARM64_Managed_AZL3)
33+
arch: 'aarch64'
34+
pool:
35+
type: linux
36+
name: $(poolName)
37+
variables:
38+
ob_outputDirectory: '$(Build.SourcesDirectory)/ToBePublished'
39+
ob_artifactBaseName: 'drop_publish_$(arch)_$(System.JobAttempt)'
40+
steps:
41+
- template: templates/azldev_build_publish_job.yml@self
42+
parameters:
43+
arch: '$(arch)'
44+
publish_path: '$(ob_outputDirectory)/tool'

cmd/azldev/azldev.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ import (
77
"os"
88

99
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev"
10+
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/advanced"
11+
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/component"
1012
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/config"
1113
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/docs"
14+
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/image"
15+
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/project"
1216
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev/cmds/version"
1317
)
1418

@@ -29,8 +33,12 @@ func InstantiateApp() *azldev.App {
2933

3034
// Give top level command packages an opportunity to register their commands (or in some cases,
3135
// request post-init callbacks).
36+
advanced.OnAppInit(app)
37+
component.OnAppInit(app)
3238
config.OnAppInit(app)
3339
docs.OnAppInit(app)
40+
image.OnAppInit(app)
41+
project.OnAppInit(app)
3442
version.OnAppInit(app)
3543

3644
return app

cmd/azldev/azldev_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ func TestInstantiateApp(t *testing.T) {
2222
t,
2323
topLevelCommandNames,
2424
[]string{
25+
"advanced",
26+
"component",
2527
"config",
2628
"docs",
29+
"image",
30+
"project",
2731
"version",
2832
},
2933
)

cmd/helloworld/helloworld.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
// The helloworld program is a simple example that prints "Hello, World!" to the console.
5+
6+
package main
7+
8+
import (
9+
"github.com/microsoft/azure-linux-dev-tools/internal/app/helloworld"
10+
)
11+
12+
func main() {
13+
helloworld.Hello()
14+
helloworld.Goodbye()
15+
}

docs/developer/how-to/config-management.md

Whitespace-only changes.

docs/developer/how-to/pull-requests.md

Whitespace-only changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Ideas for future consideration
2+
3+
## Package building
4+
5+
### Parameterized components
6+
7+
A single component can be defined to be built with a matrix of parameters, where each set of parameters results in a different "flavour" of the component being built.
8+
9+
Sample use cases:
10+
11+
- Building different configurations of the kernel.
12+
- Building a bootstrap and full version of a component to resolve circular dependencies.
13+
14+
### One project can define and build different versions of the kernel
15+
16+
### OOT module components can build with all or selected versions of the kernels
17+
18+
Components providing OOT kernel modules must have a way to build against all supported kernel versions or a specific subset of them.
19+
20+
**IMPORTANT:** it must be possible to define OOT components in such way, that packages built for a newer kernel version are **NOT** considered as updates of the ones built for the older kernel versions. This is required, so that updating the OOT components does not inadvertently update the kernel as well due to the package's dependency on a specific kernel version.
21+
22+
Example:
23+
24+
- Project defines `kernel-older` version 1.0.0 and `kernel-newer` version 1.1.0.
25+
- Project builds `OOT-comp` for both kernels.
26+
- Having the package manager update `OOT-comp` on `kernel-older` does not automatically update to `kernel-newer`.
27+
28+
Effectively this means that the `OOT-comp` packages defined for both kernels are not considered the same package by the package manager/RPM.
29+
30+
## Supported origins for component sources
31+
32+
### Fedora SRPM repos
33+
34+
### Blob stores with anonymous access
35+
36+
### Azure blob stores requiring authentication
37+
38+
For such blob stores, the tool should at minimum be able to use the credentials set by logging into Azure with `az login`.

docs/user/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
# User Guide
22

3+
## How-To Guides
4+
5+
- [Create a Project](./how-to/create-project.md) — set up a new Azure Linux project
6+
- [Add a Component](./how-to/add-component.md) — import or create a new package
7+
- [Build a Component](./how-to/build-component.md) — build RPMs from component definitions
8+
- [Build an Image](./how-to/build-image.md) — build and boot Azure Linux images
9+
10+
## Explanation
11+
12+
- [Configuration System](./explanation/config-system.md) — how config files are loaded, merged, and how inheritance works
13+
314
## Reference
415

16+
### Configuration
17+
18+
- [Config File Structure](./reference/config/config-file.md) — root config file layout and includes
19+
- [Project](./reference/config/project.md) — project metadata and directory configuration
20+
- [Distros](./reference/config/distros.md) — distro definitions, versions, and repositories
21+
- [Components](./reference/config/components.md) — component definitions, spec sources, build options, and source files
22+
- [Overlays](./reference/config/overlays.md) — spec and file overlays for modifying upstream sources
23+
- [Component Groups](./reference/config/component-groups.md) — grouping components with shared defaults
24+
- [Images](./reference/config/images.md) — image definitions (VMs, containers)
25+
- [Tools](./reference/config/tools.md) — external tool configuration
26+
527
### CLI Commands
628

729
Auto-generated from `azldev --help`. See [reference/cli/](./reference/cli/azldev.md) for per-command documentation.

0 commit comments

Comments
 (0)