@@ -9,6 +9,7 @@ A production-ready Go CLI tool that wraps Azure CLI commands for container deplo
99- ** ACI Deployment** : Deploy containers with sidecar support using JSON templates
1010- ** Config Management** : Multi-source configuration with proper precedence
1111- ** Environment Support** : Seamless local development and CI/CD integration
12+ - ** CI Environment Detection** : Automatic environment detection and variable mapping
1213- ** Validation** : Clear error messages for missing configuration
1314
1415## Installation
@@ -19,22 +20,22 @@ Download the latest binary from [dl.furiatona.dev](https://dl.furiatona.dev/azct
1920
2021``` bash
2122# Linux AMD64
22- curl -L https://dl.furiatona.dev/azctl/v0.2.0/azctl-linux-amd64 -o azctl
23+ curl -L https://dl.furiatona.dev/azctl/v0.2.0/azctl_linux_amd64 -o azctl
2324chmod +x azctl
2425sudo mv azctl /usr/local/bin/
2526
2627# macOS AMD64
27- curl -L https://dl.furiatona.dev/azctl/v0.2.0/azctl-darwin-amd64 -o azctl
28+ curl -L https://dl.furiatona.dev/azctl/v0.2.0/azctl_darwin_amd64 -o azctl
2829chmod +x azctl
2930sudo mv azctl /usr/local/bin/
3031
3132# macOS ARM64
32- curl -L https://dl.furiatona.dev/azctl/v0.2.0/azctl-darwin-arm64 -o azctl
33+ curl -L https://dl.furiatona.dev/azctl/v0.2.0/azctl_darwin_arm64 -o azctl
3334chmod +x azctl
3435sudo mv azctl /usr/local/bin/
3536
3637# Windows AMD64
37- # Download azctl-windows-amd64 .exe from https://dl.furiatona.dev/azctl/v0.2.0/
38+ # Download azctl_windows_amd64 .exe from https://dl.furiatona.dev/azctl/v0.2.0/
3839```
3940
4041### From Source
@@ -71,39 +72,7 @@ make build
7172
7273> ** 📖 Need more detailed setup instructions?** See [ SETUP.md] ( SETUP.md ) for comprehensive configuration and deployment guides.
7374
74- ## Configuration
75-
76- ### Precedence Order (highest to lowest)
77-
78- 1 . ** CLI Flags** - Explicit command-line arguments
79- 2 . ** Environment Variables** - Shell environment and CI variables
80- 3 . ** .env File** - Local development only (skipped when ` CI=true ` )
81- 4 . ** Azure App Configuration** - Centralized defaults (optional)
82-
83- ### Required Variables
84-
85- #### ACR Commands
86- - ` REGISTRY ` - ACR registry name
87- - ` ACR_RESOURCE_GROUP ` - Resource group containing ACR
88- - ` IMAGE_NAME ` - Container image name
89- - ` IMAGE_TAG ` - Container image tag
90-
91- #### WebApp Deployment
92- - ` AZURE_RESOURCE_GROUP ` - Target resource group
93- - ` REGISTRY ` - ACR registry name
94- - ` IMAGE_NAME ` - Container image name
95- - ` IMAGE_TAG ` - Container image tag
96-
97- #### ACI Deployment
98- - ` AZURE_RESOURCE_GROUP ` - Target resource group
99- - ` CONTAINER_GROUP_NAME ` - ACI container group name
100- - ` IMAGE_REGISTRY ` - ACR registry name
101- - ` IMAGE_NAME ` - Container image name
102- - ` IMAGE_TAG ` - Container image tag
103- - ` ACR_USERNAME ` - Registry username
104- - ` ACR_PASSWORD ` - Registry password
105-
106- ## Usage Examples
75+ ## Basic Usage
10776
10877### Build and Push to ACR
10978
@@ -112,12 +81,15 @@ make build
11281azctl acr
11382
11483# Using CLI flags
115- azctl acr --registry myregistry --image myapp --tag v1.0.0 --resource-group my-rg
84+ azctl acr --registry myregistry --image myapp --tag v1.0.0
11685
11786# With environment-specific config
11887azctl acr --env dev
11988azctl acr --env staging
12089azctl acr --env production
90+
91+ # In CI - environment auto-detected from branch name
92+ azctl acr # Auto-detects 'staging' from 'staging' branch
12193```
12294
12395### Deploy to WebApp
@@ -128,6 +100,9 @@ azctl webapp --env staging --resource-group my-rg
128100
129101# Deploy with custom WebApp name
130102azctl webapp --env production --name my-custom-webapp
103+
104+ # In CI - environment auto-detected
105+ azctl webapp --resource-group my-rg # Auto-detects environment
131106```
132107
133108### Deploy to ACI
@@ -141,6 +116,9 @@ azctl aci --template ./my-aci-template.json --env production
141116
142117# Dry run - generate JSON without deploying
143118azctl aci --dry-run --env staging --resource-group staging-rg
119+
120+ # In CI - environment auto-detected
121+ azctl aci --resource-group my-rg # Auto-detects environment
144122```
145123
146124## Development
@@ -159,6 +137,20 @@ make lint
159137make release
160138```
161139
140+ ``` bash
141+ # Run tests
142+ make test
143+
144+ # Build binary
145+ make build
146+
147+ # Lint code
148+ make lint
149+
150+ # Cross-platform release build
151+ make release
152+ ```
153+
162154## Contributing
163155
1641561 . Fork the repository
0 commit comments