-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…725)
- Loading branch information
1 parent
dee7ddb
commit 077fcef
Showing
11 changed files
with
83 additions
and
302 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 was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
.github/actions/nexus-close-staging/close-payload-template.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
.github/actions/nexus-create-staging/staging-repository-payload-template.xml
This file was deleted.
Oops, something went wrong.
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,71 @@ | ||
name: Move artifacts to destination repository | ||
description: Move artifacts to destination repository in Nexus 3 | ||
inputs: | ||
nexus-username: | ||
description: Nexus username | ||
required: true | ||
nexus-password: | ||
description: Nexus password | ||
required: true | ||
nexus-url: | ||
description: Base URL to the Nexus server | ||
required: true | ||
destination-repository: | ||
description: The destination repository | ||
required: true | ||
source-repository: | ||
description: The source repository | ||
required: true | ||
group: | ||
description: The maven group-id of the components to be moved | ||
required: true | ||
version: | ||
description: The version of the components to be moved | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: count-artifacts | ||
id: count-artifacts | ||
shell: bash | ||
env: | ||
NEXUS_USERNAME: ${{ inputs.nexus-username }} | ||
NEXUS_PASSWORD: ${{ inputs.nexus-password }} | ||
NEXUS_URL: ${{ inputs.nexus-url }} | ||
SOURCE_REPOSITORY: ${{ inputs.source-repository }} | ||
GROUP: ${{ inputs.group }} | ||
VERSION: ${{ inputs.version }} | ||
run: | | ||
echo "Counting artifacts in repository ${SOURCE_REPOSITORY} in Nexus" | ||
search_response=$(curl -sSf -u "${NEXUS_USERNAME}:${NEXUS_PASSWORD}" \ | ||
-X GET "${NEXUS_URL}/service/rest/v1/search?repository=${SOURCE_REPOSITORY}&group=${GROUP}&version=${VERSION}" \ | ||
-H 'Content-Type: application/json' \ | ||
-H 'accept: application/json' \ | ||
-d '{}') | ||
count=$(echo "$search_response" | yq '.items | length') | ||
echo "count=$count" >> $GITHUB_OUTPUT | ||
- name: move-artifacts | ||
id: move-artifacts | ||
shell: bash | ||
env: | ||
NEXUS_USERNAME: ${{ inputs.nexus-username }} | ||
NEXUS_PASSWORD: ${{ inputs.nexus-password }} | ||
NEXUS_URL: ${{ inputs.nexus-url }} | ||
DESTINATION_REPOSITORY: ${{ inputs.destination-repository }} | ||
SOURCE_REPOSITORY: ${{ inputs.source-repository }} | ||
GROUP: ${{ inputs.group }} | ||
VERSION: ${{ inputs.version }} | ||
run: | | ||
count="${{ steps.count-artifacts.outputs.count }}" | ||
if [ $count -eq 0 ]; then | ||
echo "No artifacts found in repository ${SOURCE_REPOSITORY} for group ${GROUP} and version ${VERSION}" | ||
else | ||
echo "Moving artifacts to destination repository ${DESTINATION_REPOSITORY} from source repository ${SOURCE_REPOSITORY} in Nexus" | ||
curl -sSf -u "${NEXUS_USERNAME}:${NEXUS_PASSWORD}" \ | ||
-X POST "${NEXUS_URL}/service/rest/v1/staging/move/${DESTINATION_REPOSITORY}?repository=${SOURCE_REPOSITORY}&group=${GROUP}&version=${VERSION}" \ | ||
-H 'Content-Type: application/json' \ | ||
-H 'accept: application/json' \ | ||
-d '{}' | ||
fi |
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
.github/actions/nexus-release-staging/promote-payload-template.json
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.