提交 8148731d authored 作者: husishuai's avatar husishuai

测试jfrog

上级 5b774a72
流水线 #288 已失败 于阶段
in 1 分 25 秒
......@@ -12,3 +12,23 @@ sonarqube-check:
allow_failure: true
only:
- master # or the name of your main branch
before_script:
# Install JFrog CLI
- curl -fL https://getcli.jfrog.io | sh
# Configure Artifactory instance with JFrog CLI
- ./jfrog rt config --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS
- ./jfrog rt c show
# Set the M2_HOME environment variable
# - export M2_HOME=/usr/share/maven
# Replace the repository name in the configuration.yml to the correct one.
- sed -i 's,MAVEN_REPO_KEY,'"$MAVEN_REPO_KEY"',g' configuration.yml
build:
script:
# Run the MVN command
- export JAVA_HOME=/data/jdk/jdk-17.0.7
- ./jfrog rt mvn "clean install" configuration.yml --build-name=gitlabci-maven-artifactory --build-number=$CI_JOB_ID
# Collect the environment variables
- ./jfrog rt bce gitlabci-maven-artifactory $CI_JOB_ID
# Pass the build information to Artifactory
- ./jfrog rt bp gitlabci-maven-artifactory $CI_JOB_ID
\ No newline at end of file
version: 1
type: maven
resolver:
snapshotRepo: devops
releaseRepo: maven
serverID: artifactory-server
deployer:
snapshotRepo: devops
releaseRepo: maven
serverID: artifactory-server
\ No newline at end of file
version: 1
issues:
serverID: artifactory-server
trackerName: JIRA
regexp: (.+-[0-9]+)\s-\s(.+)
keyGroupIndex: 1
summaryGroupIndex: 2
trackerUrl: http://my-jira.com/issues
aggregate: true
aggregationStatus: RELEASED
\ No newline at end of file
......@@ -33,4 +33,17 @@
<module>test</module>
</modules>
<distributionManagement>
<repository>
<id>central</id>
<name>123fe8141975-releases</name>
<url>http://192.168.126.20:8081/artifactory/maven</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>123fe8141975-snapshots</name>
<url>http://192.168.126.20:8081/artifactory/maven</url>
</snapshotRepository>
</distributionManagement>
</project>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论