Skip to content

Commit 7a9bb06

Browse files
committed
Fix spring-enterprise-release-bundle.yml for async=false
* Also fix `actions\spring-website-project-version-update` for an explicit API version, since `{version}` placeholder is resolved as an Antora version, where not all projects provides an API as a part of Antora distribution * Extracting common parts of the `curl` for `spring-enterprise-release-bundle.yml` script
1 parent 02a5bb9 commit 7a9bb06

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/actions/spring-website-project-version-update/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ runs:
6060
6161
for VERSION in $VERSIONS_TO_UPDATE
6262
do
63-
VERSION_JSON='{"version": "'$VERSION'", "referenceDocUrl": "'https://docs.spring.io/$PROJECT/reference/\{version\}'", "apiDocUrl": "'https://docs.spring.io/$PROJECT/docs/\{version\}/api'", "isAntora": true}'
63+
VERSION_JSON='{"version": "'$VERSION'", "referenceDocUrl": "'https://docs.spring.io/$PROJECT/reference/\{version\}'", "apiDocUrl": "'https://docs.spring.io/$PROJECT/docs/$VERSION/api'", "isAntora": true}'
6464
eval $SPRING_WEBSITE_CLIENT/releases -X POST -d '"$VERSION_JSON"' --fail --show-error
6565
done
6666

.github/workflows/spring-enterprise-release-bundle.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,11 @@ jobs:
3939
steps:
4040

4141
- run: |
42-
curl -s -u "${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }}" \
43-
-X POST -H "X-JFrog-Signing-Key-Name: packagesKey" -H "Content-Type: application/json" \
44-
"${{ inputs.artifactoryUrl }}/lifecycle/api/v2/release_bundle?project=spring" \
45-
-d '{"release_bundle_name": "${{ inputs.bundleName }}", "release_bundle_version": "${{ inputs.releaseVersion }}", "skip_docker_manifest_resolution": true, "source_type": "builds", "source": {"builds": [ {"build_repository": "spring-build-info", "build_name": "${{ inputs.buildName }}", "build_number": "${{ inputs.buildNumber }}", "include_dependencies": false}]}}'
42+
ARTIFACTORY_CLIENT='curl -s -u "${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }}" -X POST -H "Content-Type: application/json" --fail --show-error --url "${{ inputs.artifactoryUrl }}/lifecycle/api/v2"'
4643
47-
sleep 10
48-
49-
curl -s -u "${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_PASSWORD }}" \
50-
-X POST -H "Content-Type: application/json" \
51-
"${{ inputs.artifactoryUrl }}/lifecycle/api/v2/distribution/distribute/${{ inputs.bundleName }}/${{ inputs.releaseVersion }}?project=spring" \
52-
-d '{"auto_create_missing_repositories": "false", "distribution_rules": [{"site_name": "JP-SaaS"}], "modifications": {"mappings": [{"input": "spring-enterprise-maven-prod-local/(.*)", "output": "spring-enterprise/$1"}]}}'
44+
BUNDLE_JSON='{"release_bundle_name": "${{ inputs.bundleName }}", "release_bundle_version": "${{ inputs.releaseVersion }}", "skip_docker_manifest_resolution": true, "source_type": "builds", "source": {"builds": [ {"build_repository": "spring-build-info", "build_name": "${{ inputs.buildName }}", "build_number": "${{ inputs.buildNumber }}"}]}}'
45+
eval $ARTIFACTORY_CLIENT/release_bundle?project=spring&async=false -H "X-JFrog-Signing-Key-Name: packagesKey" -d '"$BUNDLE_JSON"'
46+
47+
DISTRIBUTION_JSON='{"auto_create_missing_repositories": "false", "distribution_rules": [{"site_name": "JP-SaaS"}], "modifications": {"mappings": [{"input": "spring-enterprise-maven-prod-local/(.*)", "output": "spring-enterprise/$1"}]}}'
48+
eval $ARTIFACTORY_CLIENT/distribution/distribute/${{ inputs.bundleName }}/${{ inputs.releaseVersion }}?project=spring -d '"$DISTRIBUTION_JSON"'
5349

0 commit comments

Comments
 (0)