Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idempotent OSS and ALT deploy #234

Closed
trydofor opened this issue May 14, 2024 · 4 comments
Closed

idempotent OSS and ALT deploy #234

trydofor opened this issue May 14, 2024 · 4 comments
Labels
better :gem: something is better investigate :no_bell: something may be defective
Milestone

Comments

@trydofor
Copy link
Owner

trydofor commented May 14, 2024

current deployment

  • release - ossrh
  • snapshot - altrh(more), ossrh(less)

and central repo have some lag.

SHOULD package once, multiply deploy the artifacts without rebuilding.

  • skip any building, just use the old
  • back and restore, replace the new with old
@trydofor trydofor converted this from a draft issue May 14, 2024
@trydofor trydofor added the better :gem: something is better label May 14, 2024
@trydofor trydofor changed the title MessageException resolver idempotent May 15, 2024
@trydofor trydofor changed the title idempotent idempotent de'p'ly May 15, 2024
@trydofor trydofor changed the title idempotent de'p'ly idempotent deploy oss and alt May 15, 2024
@trydofor trydofor changed the title idempotent deploy oss and alt idempotent OSS and ALT deploy May 15, 2024
@trydofor
Copy link
Owner Author

trydofor commented May 15, 2024

apache/maven-jar-plugin#62

can not skip building jar.

The packaging for this project did not assign a file to the build artifact

deploy-file is too heavy.

@trydofor
Copy link
Owner Author

trydofor commented May 16, 2024

<profile>
    <id>deploy-alt</id>
    <properties>
        <!--suppress UnresolvedMavenProperty -->
        <altrh.release.url>${MVN_ALT_REPO}</altrh.release.url>
        <altrh.release.id>altrh</altrh.release.id>
        <!--suppress UnresolvedMavenProperty -->
        <altrh.snapshot.url>${MVN_ALT_SNAP}</altrh.snapshot.url>
        <altrh.snapshot.id>altrh</altrh.snapshot.id>
        <altReleaseDeploymentRepository>${altrh.release.id}::${altrh.release.url}</altReleaseDeploymentRepository>
        <altSnapshotDeploymentRepository>${altrh.snapshot.id}::${altrh.snapshot.url}</altSnapshotDeploymentRepository>
    </properties>
</profile>
#!/bin/bash

## need deploy-alt profile
function mvn_eval_expr(){
   mvn -P deploy-alt help:evaluate -q -DforceStdout -Dexpression="$1"
}

GROUP_ID=$(mvn_eval_expr project.groupId)
ARTIFACT_ID=$(mvn_eval_expr project.artifactId)
VERSION=$(mvn_eval_expr project.version)

if [[ $VERSION == *"-SNAPSHOT" ]]; then
    REPO_URL=$(mvn_eval_expr altrh.snapshot.url)
    REPO_ID=$(mvn_eval_expr altrh.snapshot.id)
else
    REPO_URL=$(mvn_eval_expr altrh.release.url)
    REPO_ID=$(mvn_eval_expr altrh.release.id)
fi


##
echo "Group ID: $GROUP_ID"
echo "Artifact ID: $ARTIFACT_ID"
echo "Version: $VERSION"
echo "Repository URL: $REPO_URL"
echo "Repository ID: $REPO_ID"

deploy:deploy-file do NOT handle maven-metadata.xml

@trydofor trydofor added the investigate :no_bell: something may be defective label May 16, 2024
@trydofor trydofor added this to the Batrider milestone May 17, 2024
@trydofor
Copy link
Owner Author

backup artifacts and restore for deploy by deploy-old profile

@trydofor trydofor moved this from 🔖 Ready to 🏗 In progress in WingsBoot Backlog May 17, 2024
@trydofor
Copy link
Owner Author

trydofor commented May 17, 2024

change doc and git loglevel to WARN

-Dorg.slf4j.simpleLogger.log.lombok=WARN
-Dorg.slf4j.simpleLogger.log.org.jetbrains.dokka=WARN 
-Dorg.slf4j.simpleLogger.log.pl.project13.maven.git=WARN

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in WingsBoot Backlog May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better :gem: something is better investigate :no_bell: something may be defective
Projects
Archived in project
Development

No branches or pull requests

1 participant