forked from yahoojapan/yosegi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yahoojapan#117 from jufukuka/circleci
Change circleci/config.yml
- Loading branch information
Showing
3 changed files
with
103 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<!-- Maven Central Deployment --> | ||
<id>ossrh</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
orbs: | ||
sonatype: sonatype-nexus-community/[email protected] | ||
sonatype-dryrun: sonatype-nexus-community/[email protected] | ||
|
||
jobs: | ||
build: | ||
docker: | ||
|
@@ -40,16 +45,10 @@ jobs: | |
- run: mvn clean package | ||
|
||
# Save JUnit result. | ||
- run: | ||
name: Save test results | ||
command: | | ||
mkdir -p ~/junit/ | ||
find . -type f -regex "./src/.*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \; | ||
when: always | ||
- store_test_results: | ||
path: ~/junit | ||
path: target/surefire-reports | ||
- store_artifacts: | ||
path: ~/junit | ||
path: target/surefire-reports | ||
|
||
# run site | ||
- run: mvn site | ||
|
@@ -60,3 +59,42 @@ jobs: | |
- store_artifacts: | ||
path: ~/site | ||
|
||
custom_filters: | ||
master_only: &master_only | ||
filters: | ||
branches: | ||
only: master | ||
master_ignore: &master_ignore | ||
filters: | ||
branches: | ||
ignore: master | ||
|
||
workflows: | ||
build-and-test: | ||
jobs: | ||
- build: | ||
<<: *master_ignore | ||
run-release: | ||
jobs: | ||
- build: | ||
<<: *master_only | ||
- sonatype-dryrun/run-maven-release: | ||
<<: *master_only | ||
requires: | ||
- build | ||
mvn-release-perform-command: | | ||
mvn --batch-mode release:perform -DdryRun=true -s .circleci/.maven.xml | ||
mvn-release-prepare-command: | | ||
mvn --batch-mode release:prepare -DscmCommentPrefix="[skip ci][maven-release-plugin] " -DdryRun=true -s .circleci/.maven.xml | ||
ssh-fingerprints: b2:fa:12:27:7a:f5:b8:39:85:90:05:6d:58:8e:24:32 | ||
- approve: | ||
type: approval | ||
<<: *master_only | ||
requires: | ||
- sonatype-dryrun/run-maven-release | ||
- sonatype/run-maven-release: | ||
<<: *master_only | ||
requires: | ||
- approve | ||
ssh-fingerprints: b2:fa:12:27:7a:f5:b8:39:85:90:05:6d:58:8e:24:32 |
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