Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed Dec 23, 2020
2 parents 3a6ef31 + 9459808 commit fc3de20
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 1,141 deletions.
115 changes: 115 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
version: 2.1

executors:
openjdk_executor:
docker:
- image: circleci/openjdk@sha256:012843a8f91da1ea5e22e142bb5cb8c999a7457e03b8c79ab45d5fcb68043383
environment:
_JAVA_OPTIONS: "-Xmx3g"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"

jobs:
checkout_run_test:
executor: openjdk_executor
description: "Perform all setup steps"
steps:
- checkout
- run:
name: Create output directories
command: "mkdir -vp ~/circleci-artifacts ~/circleci-test-results ~/circleci-test-results/junit/"

- restore_cache:
keys:
- gradle-repo-v5-{{ .Branch }}-{{ checksum "gradle.properties" }}
- gradle-repo-v5-{{ .Branch }}-
- gradle-repo-v5-
- run:
name: Download uncached dependencies
command: ./gradlew dependencies
no_output_timeout: 1h

- save_cache:
paths:
- ~/.gradle
key: gradle-repo-v5-{{ .Branch }}-{{ checksum "gradle.properties" }}

- run:
name: Compile
command: ./gradlew -PbuildNumber=$CIRCLE_BUILD_NUM -PbuildAccess=opensource -PbuildTag=$CIRCLE_TAG --refresh-dependencies --info --stacktrace clean assemble

# Test
- run:
name: Run tests
command: xvfb-run ./gradlew -PbuildAccess=opensource -PbuildNumber=$CIRCLE_BUILD_NUM -PbuildTag=$CIRCLE_TAG --info --stacktrace test

- run:
name: Collect test results
command: find . -type f -regex ".*/build/test-results/.*xml" -exec cp -v {} ~/circleci-test-results/junit/ \;
- run:
name: Collect artifacts
command: '[ ! -d build/reports ] || cp -R build/reports ~/circleci-artifacts/'

# Teardown
# Save test results
- store_test_results:
path: ~/circleci-test-results
# Save artifacts
- store_artifacts:
path: ~/circleci-artifacts
- store_artifacts:
path: ~/circleci-test-results

- run: rm -rf .git
# Persist the specified paths (workspace/echo-output) into the workspace for use in build/test jobs.
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: ~/
# Must be relative path from root
paths:
- .gradle
- project

deploy_snapshot:
executor: openjdk_executor
steps:
- attach_workspace:
at: ~/
- run:
name: Deploy snapshot to Artifactory
command: ./gradlew -PbuildAccess=opensource -PbuildNumber=$CIRCLE_BUILD_NUM -PbuildTag=$CIRCLE_TAG -PartifactoryUrl=$ARTIFACTORY_URL -PartifactoryRepository=$SNAPSHOT_ARTIFACTORY_REPOSITORY -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --info --stacktrace artifactoryPublish
deploy_release:
executor: openjdk_executor
steps:
- attach_workspace:
at: ~/
- run:
name: Deploy release to Artifactory
command: ./gradlew -PbuildAccess=opensource -PbuildNumber=$CIRCLE_BUILD_NUM -PbuildTag=$CIRCLE_TAG -PartifactoryUrl=$ARTIFACTORY_URL -PartifactoryRepository=$RELEASE_ARTIFACTORY_REPOSITORY -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --info --stacktrace artifactoryPublish
- run:
name: Deploy release to Bintray
command: ./gradlew -PbuildAccess=opensource -PbuildNumber=$CIRCLE_BUILD_NUM -PbuildTag=$CIRCLE_TAG -PbintrayUser=$BINTRAY_USER -PbintrayKey=$BINTRAY_KEY -PbintrayRepo=$BINTRAY_REPO -PbintrayUserOrg=$BINTRAY_USER_ORG --info --stacktrace clean bintrayUpload

workflows:
version: 2
build-test-deploy:
jobs:
- checkout_run_test:
filters:
tags:
only: /[0-9.]+(-(a|b|rc)[0-9]+)?/
- deploy_snapshot:
requires:
- checkout_run_test
filters:
branches:
only: /((release|hotfix|support)/[0-9.]+(-(a|b|rc)[0-9]+)?|master|develop)/
- deploy_release:
requires:
- checkout_run_test
filters:
tags:
only: /[0-9.]+(-(a|b|rc)[0-9]+)?/
branches:
ignore: /.*/

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.idea
.gradle
build
*.iml
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'org.openmbee.testrail'
version '1.0.3'
version '1.1.0'

apply plugin: 'java'
apply plugin: 'idea'
Expand Down Expand Up @@ -29,13 +29,18 @@ buildscript {

repositories {
jcenter()
/*
maven {
url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'
}
*/
}

dependencies {
compile "org.projectlombok:lombok:1.16.16"

compile group: 'org.openmbee.junit', name: 'junit-xml-parser', version: '1.0.0'
compile group: 'org.openmbee.testrail', name: 'testrail-client-wrapper', version: '1.0.1'
compile group: 'org.openmbee.testrail', name: 'testrail-client-wrapper', version: '1.1.0'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
}

Expand Down
14 changes: 0 additions & 14 deletions circle.yml

This file was deleted.

91 changes: 0 additions & 91 deletions out/production/testrail-junit-publisher/junit-4.xsd

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void run() {
}
}

TestRailUser user = api.getUsers().stream().filter(u -> u.getName().equalsIgnoreCase(api.getUsername()) || u.getEmail().equalsIgnoreCase(api.getUsername())).findAny().orElseThrow(() -> new NullPointerException("No user found matching \"" + api.getUsername() + "\"."));
TestRailUser user = api.getCurrentUser();

TestRailRun requestRun = new TestRailRun().setProjectId(suite.getProjectId()).setSuiteId(suite.getId());

Expand Down

0 comments on commit fc3de20

Please sign in to comment.