Skip to content

Commit

Permalink
[circleci] update settings to for deplay artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
SteVio89 committed Feb 10, 2022
1 parent 0aa652f commit 0488a10
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .circleci.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>snapshots</id>
<id>repo.languagetool.org</id>
<username>${env.ARTIFACTORY_USERNAME}</username>
<password>${env.ARTIFACTORY_API_TOKEN}</password>
</server>
</servers>
Expand Down
18 changes: 15 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ parameters:
run_on_pull:
default: true
type: boolean
deploy_after_test:
default: false
type: boolean
orbs:
shallow-checkout: expo/[email protected]
workflows:
Expand Down Expand Up @@ -89,6 +92,9 @@ commands:
ignore_diff:
type: boolean
default: false
deploy_artifact:
type: boolean
default: false
steps:
- when:
condition: << parameters.ignore_diff >>
Expand All @@ -100,6 +106,10 @@ commands:
then
echo "" > /home/circleci/git_diffs.txt
cd $CIRCLE_WORKING_DIRECTORY && mvn -pl '!languagetool-rpm-package' test -fae
if << parameters.deploy_artifact >> = true || << pipeline.deploy_after_test >>
then
cd mvn -s .circleci.settings.xml -pl '!languagetool-rpm-package' -DskipTests deploy
fi
else
echo "No changes detected in <<parameters.path_to_check>>"
fi
Expand All @@ -112,6 +122,10 @@ commands:
if grep -q -e << parameters.path_to_check >>/.* /home/circleci/git_diffs.txt
then
cd $CIRCLE_WORKING_DIRECTORY && mvn --projects << parameters.path_to_check >> --also-make test -fae
if << parameters.deploy_artifact >> = true || << pipeline.deploy_after_test >>
then
cd mvn -s .circleci.settings.xml --projects << parameters.path_to_check >> -DskipTests deploy
fi
else
echo "No changes detected in <<parameters.path_to_check>>"
fi
Expand All @@ -124,9 +138,7 @@ commands:
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: ~/test-results
# - store_artifacts:
# path: ~test-results/junit
path: ~/test-results
executors:
docker-openjdk8:
docker:
Expand Down
3 changes: 1 addition & 2 deletions languagetool-commandline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>false</skip>
<!-- TODO: decide if this should published to a maven-repo as well. -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 1 addition & 2 deletions languagetool-dev/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>false</skip>
<!-- TODO: decide if this should published to a maven-repo as well. -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 1 addition & 2 deletions languagetool-rpm-package/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1192,8 +1192,7 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>false</skip>
<!-- TODO: decide if this should published to a maven-repo as well. -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion languagetool-standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>false</skip>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
3 changes: 1 addition & 2 deletions languagetool-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>false</skip>
<!-- TODO: decide if this should published to a maven-repo as well. -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion languagetool-wikipedia/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>false</skip>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
Expand Down
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@
<url>[email protected]:languagetool-org/languagetool.git</url>
</scm>

<!-- TODO: update to new repo for snapshots -->
<distributionManagement>
<snapshotRepository>
<!-- see ~/.m2/settings.xml for authentication -->
<id>snapshots</id>
<name>a0oneieyqx0fu-artifactory-primary-0-snapshots</name>
<url>https://languagetool.jfrog.io/artifactory/languagetool-libs-snapshot</url>
<id>repo.languagetool.org</id>
<name>languagetool-os-snapshot</name>
<url>https://repo.languagetool.org/artifactory/languagetool-os-snapshot/</url>
</snapshotRepository>
<repository>
<id>repo.languagetool.org</id>
<name>languagetool-os-snapshot</name>
<url>https://repo.languagetool.org/artifactory/languagetool-os-release/</url>
</repository>
</distributionManagement>

<!-- TODO remove if nothing failed after reorganize
Expand Down

0 comments on commit 0488a10

Please sign in to comment.