Compare commits

..

9 Commits

16 changed files with 40 additions and 28 deletions

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ task/AzureFederatedAuth/dist/
build/ build/
AGENTS.md AGENTS.md
.DS_Store .DS_Store
.env

View File

@@ -21,6 +21,8 @@ For administrator-facing installation and usage guidance, see `overview.md`.
- Downloads a blob to a local file path using the selected AzureRM service connection. - Downloads a blob to a local file path using the selected AzureRM service connection.
- `PutBlob@1` - `PutBlob@1`
- Uploads a local file as a blob using the selected AzureRM service connection. - Uploads a local file as a blob using the selected AzureRM service connection.
- `SetupGitHubRelease@1`
- Downloads and installs a binary from the latest GitHub release and prepends it to PATH.
## Repository layout ## Repository layout
@@ -29,6 +31,7 @@ For administrator-facing installation and usage guidance, see `overview.md`.
- `task/ListBlobs` - task implementation and manifest - `task/ListBlobs` - task implementation and manifest
- `task/GetBlob` - task implementation and manifest - `task/GetBlob` - task implementation and manifest
- `task/PutBlob` - task implementation and manifest - `task/PutBlob` - task implementation and manifest
- `task/SetupGitHubRelease` - task implementation and manifest
- `shared` - local npm package with shared OIDC/devops/blob helpers - `shared` - local npm package with shared OIDC/devops/blob helpers
- `scripts/build.sh` - builds tasks and packages the extension - `scripts/build.sh` - builds tasks and packages the extension
- `examples/azure-pipelines-smoke.yml` - smoke pipeline example - `examples/azure-pipelines-smoke.yml` - smoke pipeline example
@@ -77,6 +80,10 @@ Publishing requires a Visual Studio Marketplace publisher and sharing the publis
Slawomir Koszewski Slawomir Koszewski
## AI Generated Content
Parts of this repository were generated with the assistance of AI. The author has reviewed and edited the AI-generated content to ensure accuracy and clarity.
## License ## License
MIT. See `LICENSE`. MIT. See `LICENSE`.

View File

@@ -1,5 +1,4 @@
trigger: none trigger: none
pr: none
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-latest

View File

@@ -11,6 +11,7 @@ Azure DevOps extension with pipeline tasks for federated auth and blob/state ope
- `ListBlobs@1` - lists blobs in a container (optional prefix) using the selected AzureRM service connection. - `ListBlobs@1` - lists blobs in a container (optional prefix) using the selected AzureRM service connection.
- `GetBlob@1` - downloads a blob to a local file path using the selected AzureRM service connection. - `GetBlob@1` - downloads a blob to a local file path using the selected AzureRM service connection.
- `PutBlob@1` - uploads a local file as a blob using the selected AzureRM service connection. - `PutBlob@1` - uploads a local file as a blob using the selected AzureRM service connection.
- `SetupGitHubRelease@1` - downloads and installs a binary from the latest GitHub release and prepends it to PATH.
Implementation note: task shared helpers are packaged locally during build and bundled with the extension (no external package registry access required at runtime). Implementation note: task shared helpers are packaged locally during build and bundled with the extension (no external package registry access required at runtime).
@@ -45,6 +46,10 @@ https://github.com/skoszewski/ado-sk-toolkit-extension.git
Slawomir Koszewski Slawomir Koszewski
## AI Generated Content
Parts of this extension's source code were generated with the assistance of AI. The author has reviewed and edited the AI-generated content to ensure accuracy and clarity.
## License ## License
MIT. See `LICENSE`. MIT. See `LICENSE`.

View File

@@ -1,26 +1,26 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
if [[ $# -lt 3 ]]; then SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
echo "Usage: $0 <vsix-path> <publisher-id> <org1> [org2] [org3] ..." set -a
echo "Requires environment variable AZDO_PAT to be set." source "$SCRIPT_DIR/.env"
exit 1 set +a
fi
if [[ -z "${AZDO_PAT:-}" ]]; then if [[ -z "${AZDO_PAT:-}" ]]; then
echo "AZDO_PAT is not set." echo "AZDO_PAT is not set."
exit 1 exit 1
fi fi
VSIX_PATH="$1" VSIX_PATH="$SCRIPT_DIR/build/${PUBLISHER_ID}.${EXTENSION_ID}-${EXTENSION_VERSION}.vsix"
PUBLISHER_ID="$2"
shift 2
for ORG in "$@"; do if [[ ! -f "$VSIX_PATH" ]]; then
echo "Publishing to organization: $ORG" echo "VSIX file not found at path: $VSIX_PATH"
npx tfx-cli extension publish \ exit 1
fi
echo "Publishing to organization: $ORG"
tfx extension publish \
--vsix "$VSIX_PATH" \ --vsix "$VSIX_PATH" \
--publisher "$PUBLISHER_ID" \ --publisher "$PUBLISHER_ID" \
--token "$AZDO_PAT" \ --token "$AZDO_PAT" \
--share-with "$ORG" --share-with "$ORG"
done

View File

@@ -1,6 +1,6 @@
{ {
"name": "azure-federated-auth-task", "name": "azure-federated-auth-task",
"version": "1.0.9", "version": "1.0.10",
"private": true, "private": true,
"author": "Slawomir Koszewski", "author": "Slawomir Koszewski",
"license": "MIT", "license": "MIT",

View File

@@ -10,7 +10,7 @@
"version": { "version": {
"Major": 1, "Major": 1,
"Minor": 0, "Minor": 0,
"Patch": 9 "Patch": 10
}, },
"instanceNameFormat": "Configure federated auth: $(serviceConnectionARM)", "instanceNameFormat": "Configure federated auth: $(serviceConnectionARM)",
"inputs": [ "inputs": [

View File

@@ -1,6 +1,6 @@
{ {
"name": "copy-blob-task", "name": "copy-blob-task",
"version": "1.0.2", "version": "1.0.3",
"private": true, "private": true,
"author": "Slawomir Koszewski", "author": "Slawomir Koszewski",
"license": "MIT", "license": "MIT",

View File

@@ -10,7 +10,7 @@
"version": { "version": {
"Major": 1, "Major": 1,
"Minor": 0, "Minor": 0,
"Patch": 2 "Patch": 3
}, },
"instanceNameFormat": "Copy blob: $(srcStorageAccountName)/$(srcContainerName)/$(blobName)", "instanceNameFormat": "Copy blob: $(srcStorageAccountName)/$(srcContainerName)/$(blobName)",
"inputs": [ "inputs": [

View File

@@ -1,6 +1,6 @@
{ {
"name": "get-blob-task", "name": "get-blob-task",
"version": "1.0.0", "version": "1.0.1",
"private": true, "private": true,
"author": "Slawomir Koszewski", "author": "Slawomir Koszewski",
"license": "MIT", "license": "MIT",

View File

@@ -10,7 +10,7 @@
"version": { "version": {
"Major": 1, "Major": 1,
"Minor": 0, "Minor": 0,
"Patch": 0 "Patch": 1
}, },
"instanceNameFormat": "Get blob: $(storageAccountName)/$(containerName)/$(blobName)", "instanceNameFormat": "Get blob: $(storageAccountName)/$(containerName)/$(blobName)",
"inputs": [ "inputs": [

View File

@@ -1,6 +1,6 @@
{ {
"name": "list-blobs-task", "name": "list-blobs-task",
"version": "1.0.1", "version": "1.0.2",
"private": true, "private": true,
"author": "Slawomir Koszewski", "author": "Slawomir Koszewski",
"license": "MIT", "license": "MIT",

View File

@@ -10,7 +10,7 @@
"version": { "version": {
"Major": 1, "Major": 1,
"Minor": 0, "Minor": 0,
"Patch": 1 "Patch": 2
}, },
"instanceNameFormat": "List blobs: $(storageAccountName)/$(containerName)", "instanceNameFormat": "List blobs: $(storageAccountName)/$(containerName)",
"inputs": [ "inputs": [

View File

@@ -1,6 +1,6 @@
{ {
"name": "put-blob-task", "name": "put-blob-task",
"version": "1.0.0", "version": "1.0.1",
"private": true, "private": true,
"author": "Slawomir Koszewski", "author": "Slawomir Koszewski",
"license": "MIT", "license": "MIT",

View File

@@ -10,7 +10,7 @@
"version": { "version": {
"Major": 1, "Major": 1,
"Minor": 0, "Minor": 0,
"Patch": 0 "Patch": 1
}, },
"instanceNameFormat": "Put blob: $(storageAccountName)/$(containerName)/$(blobName)", "instanceNameFormat": "Put blob: $(storageAccountName)/$(containerName)/$(blobName)",
"inputs": [ "inputs": [

View File

@@ -2,7 +2,7 @@
"manifestVersion": 1, "manifestVersion": 1,
"id": "sk-azure-devops-toolkit", "id": "sk-azure-devops-toolkit",
"name": "SK Azure DevOps Toolkit", "name": "SK Azure DevOps Toolkit",
"version": "1.1.0", "version": "1.1.1",
"publisher": "skoszewski-lab", "publisher": "skoszewski-lab",
"targets": [ "targets": [
{ {