Skip to content

Commit b394fd5

Browse files
authored
Remove obsolete Azure DevOps configurations and enhance documentation (#26)
* Remove obsolete Azure DevOps pipeline configurations and scripts - Deleted pipeline.variables.yml and pipeline.yml as they are no longer needed. - Removed parameters.json files for private endpoints, storage accounts, and virtual machines. - Eliminated scripts for installing pipeline agents and runtime configurations for bare metal and RHEL. - Cleaned up unnecessary PowerShell and shell scripts related to Azure DevOps agent setup. - Removed the process-aiml-resource-groups.ps1 script for managing Azure resource groups. * Add Write-Log module for structured logging and document Azure Pipelines built-in variables * Enhance workflows and documentation - Update Bicep deployment script to use quoted variables for better handling. - Improve linter configuration with additional validation options and exclusions. - Correct email formatting in Code of Conduct for clarity. - Refine contribution guidelines for better readability and structure. - Clean up README by removing outdated external links. - Add .editorconfig for consistent coding styles across files. - Introduce .markdownlint.yaml for improved markdown linting rules. * Refactor PowerShell scripts for improved functionality and error handling; update Python scripts to enhance API interactions and add timeout management
1 parent 7009901 commit b394fd5

82 files changed

Lines changed: 3926 additions & 3993 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{yml,yaml,json,md}]
12+
indent_size = 2
13+
14+
[*.sh]
15+
indent_style = space
16+
indent_size = 4

.github/workflows/bicep_deployment.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Azure Bicep Deployment
22

3+
# Manual only: the deploy step references ./main.bicep, which does not exist in
4+
# this repo yet. Add a main.bicep and re-enable a push trigger when ready.
35
on:
4-
push:
5-
branches:
6-
- main
76
workflow_dispatch:
87
inputs:
98
resource_group:
@@ -41,5 +40,5 @@ jobs:
4140

4241
- name: Deploy Infrastructure using Bicep
4342
run: |
44-
az group create -l $LOCATION -n $RESOURCE_GROUP
45-
az deployment group create -f ./main.bicep -g $RESOURCE_GROUP
43+
az group create -l "$LOCATION" -n "$RESOURCE_GROUP"
44+
az deployment group create -f ./main.bicep -g "$RESOURCE_GROUP"

.github/workflows/linter.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,40 @@
1-
name: SuperLinter
1+
name: Linter
22

3-
on: [pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
statuses: write
411

512
jobs:
613
build:
714
name: Linter
815
runs-on: ubuntu-latest
916
steps:
1017
- name: Checkout Code
11-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
1221

1322
- name: Lint Code Base
14-
uses: github/super-linter@v4.2.2
23+
uses: super-linter/super-linter/slim@v7
1524
env:
25+
# Super-Linter v7 enables ~50 validators by default. This is a curated
26+
# opt-in: only the listed validators run (high-signal for a
27+
# PowerShell / Bash / docs repo). PowerShell is also covered by the
28+
# dedicated scriptanalyzer.yml workflow.
1629
VALIDATE_ALL_CODEBASE: false
17-
VALIDATE_MARKDOWN: false
1830
DEFAULT_BRANCH: main
31+
LINTER_RULES_PATH: .
32+
VALIDATE_BASH: true
33+
VALIDATE_YAML: true
34+
VALIDATE_GITHUB_ACTIONS: true
35+
VALIDATE_GITLEAKS: true
36+
VALIDATE_MARKDOWN: true
37+
# Exclude the vendored AVM agent playbook and informal cheatsheets from
38+
# linting, plus any local Python venv / bytecode.
39+
FILTER_REGEX_EXCLUDE: '(\.github/agents/|cheatsheets/|\.venv/|__pycache__/|/path/to/)'
1940
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
name: ScriptAnalyzer
22

3-
on: [pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
410

511
jobs:
6-
job:
7-
name: "Run PSSA"
12+
analyze:
13+
name: Run PSScriptAnalyzer
814
runs-on: ubuntu-latest
915
steps:
1016
- name: Checkout
11-
uses: actions/checkout@v2
12-
- name: ScriptAnalyzer
17+
uses: actions/checkout@v4
18+
19+
- name: Run PSScriptAnalyzer
1320
shell: pwsh
1421
run: |
15-
# $VerbosePreference = "Continue"
16-
Install-Module PSScriptAnalyzer -RequiredVersion 1.19.0 -Force
17-
Invoke-ScriptAnalyzer -Path . -Recurse -ReportSummary
22+
Set-PSRepository PSGallery -InstallationPolicy Trusted
23+
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
24+
$settings = Join-Path $PWD 'PSScriptAnalyzerSettings.psd1'
25+
$params = @{ Path = '.'; Recurse = $true; ReportSummary = $true }
26+
if (Test-Path $settings) { $params.Settings = $settings }
27+
$results = Invoke-ScriptAnalyzer @params
28+
$results | Format-Table -AutoSize
29+
if ($results | Where-Object Severity -in 'Error', 'Warning') {
30+
Write-Error "PSScriptAnalyzer found $($results.Count) issue(s)."
31+
exit 1
32+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Template Sync
2+
3+
# Keeps repositories generated from this template in sync with its scaffolding.
4+
# Runs in the generated repo (skipped in the template itself) and opens a PR
5+
# whenever this template changes. Protect repo-specific files via .templatesyncignore.
6+
7+
on:
8+
schedule:
9+
- cron: '0 6 * * 1' # Mondays 06:00 UTC
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
jobs:
17+
sync:
18+
name: Sync from template
19+
runs-on: ubuntu-latest
20+
# No-op in the template repository itself.
21+
if: github.repository != 'segraef/Template'
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Sync from template
29+
uses: AndreasAugustin/actions-template-sync@v2
30+
with:
31+
source_repo_path: segraef/Template
32+
upstream_branch: main
33+
pr_labels: template-sync
34+
pr_title: "chore: sync from segraef/Template"

.gitignore

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,20 @@
1010
!.vscode/extensions.json
1111
*.code-workspace
1212

13-
#Python
13+
# Python
14+
__pycache__/
15+
*.py[cod]
16+
.venv/
17+
venv/
18+
env/
1419
.env
20+
*.egg-info/
21+
.pytest_cache/
22+
23+
# Node
24+
node_modules/
25+
npm-debug.log*
26+
27+
# Logs / local
28+
*.log
29+
*.tmp

.markdownlint.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# markdownlint configuration (consumed by Super-Linter's MARKDOWN validator).
2+
default: true
3+
4+
# Long lines are fine: tables, badge URLs and reference links exceed 80 cols.
5+
MD013: false
6+
7+
# Allow repeated sibling headings across sections (e.g. Added/Changed/Fixed per
8+
# CHANGELOG release).
9+
MD024:
10+
siblings_only: true
11+
12+
# Badges and icons use inline HTML / images in headings.
13+
MD033: false
14+
MD041: false

.pipelines/variables.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
variables:
22
vmImage: 'ubuntu-latest'
33
poolName: ''
4-
serviceConnection: '<SERVICE_CONNECTION'
4+
serviceConnection: '<SERVICE_CONNECTION>'
55
location: 'West Europe'
6-
resourceGroupName: '<RESOURCE_GROUP_NAME'
6+
resourceGroupName: '<RESOURCE_GROUP_NAME>'
77
azurePowerShellVersion: 'latestVersion'
88
preferredAzurePowerShellVersion: ''

.templatesyncignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Files Template Sync must never overwrite in this repository.
2+
# Syntax follows .gitignore semantics (AndreasAugustin/actions-template-sync).
3+
4+
# Repository identity and history.
5+
README.md
6+
CHANGELOG.md
7+
LICENSE
8+
.github/CODEOWNERS
9+
.github/workflows/template-sync.yml
10+
11+
# This repository's own code and content. The template only supplies the
12+
# shared scaffolding (_Template.ps1, Write-Log.psm1, _Template.sh, log.sh,
13+
# PSScriptAnalyzerSettings.psd1, linter/scriptanalyzer workflows), which is
14+
# intentionally NOT ignored so it keeps tracking the template.
15+
PowerShell/Snippets/**
16+
Python/**
17+
flask/**
18+
JavaScript/**
19+
REST/**
20+
graphql/**
21+
cheatsheets/**

Bash/_

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)