forked from eclipse-edc/Connector
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1145acd
commit 1ce8dc9
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Promoting an artifact in Azure Devops | ||
|
||
After the artifacts are published, they must be [promoted](https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/views?view=azure-devops&tabs=nuget) to indicate that they are ready to use. | ||
|
||
This can either be done manually or via the web API. | ||
|
||
The [promote.sh](promote.sh) does this. | ||
|
||
You will need to specify an Azure Personal Access Token that has the permissions: | ||
- Packaging | ||
- Read | ||
- Write | ||
- Manage | ||
|
||
And use the script like this: | ||
|
||
```sh | ||
AZURE_PAT="<some pat>" VERSION="<version to promote>" ./promote.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
curl -H "Authorization: Basic $AZURE_PAT" \ | ||
"https://feeds.dev.azure.com/sovity/41799556-91c8-4df6-8ddb-4471d6f15953/_apis/packaging/Feeds/core-edc/packages?protocolType=maven&includeUrls=false&includeAllVersions=true&includeDeleted=false&api-version=7.0" > /tmp/artifacts | ||
|
||
for arti in $(cat /tmp/artifacts | jq --raw-output '.value[].name' | cut -d ':' -f 2) | ||
do | ||
curl \ | ||
-X PATCH \ | ||
-H "Authorization: Basic $AZURE_PAT" \ | ||
-H "Content-Type: application/json" \ | ||
"https://pkgs.dev.azure.com/sovity/41799556-91c8-4df6-8ddb-4471d6f15953/_apis/packaging/feeds/core-edc/maven/groups/org.eclipse.edc/artifacts/${arti}/versions/${VERSION}?api-version=7.1-preview.1" \ | ||
--data-binary @- << EOF | ||
{ | ||
"views": { | ||
"op": "add", | ||
"path": "/views/-", | ||
"value": "Release" | ||
} | ||
} | ||
EOF | ||
|
||
if [[ $? -ne 0 ]] | ||
then | ||
echo "Failed to promote $arti" | ||
exit 1 | ||
fi | ||
|
||
done |