diff --git a/.strata.yml b/.strata.yml new file mode 100644 index 00000000..3613bb84 --- /dev/null +++ b/.strata.yml @@ -0,0 +1,41 @@ +# https://confluence.internal.salesforce.com/display/public/ZEN/SFCI+Managed+V2+Pipelines +global: + email-reply-to: fborges@salesforce.com + production-branches: + - master +stages: + build: + - step: + name: mvn-build-install + image: dva-registry.internal.salesforce.com/sfci/docker-images/sfdc_centos7_java_build:latest + commands: + - rm -rf /root/.m2/repository/ + - ln -s /cix/tmp/.strata/.m2/repository /root/.m2/repository + - cd jvm + - mvn --version + - bash ../scripts/determine-next-version.bash ml4ir + # set pom version to the latest released-version + # increase the version incrementally + - mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} + - mvn install + - step: + name: git-tags + image: dva-registry.internal.salesforce.com/sfci/docker-images/sfdc_centos7_java_build:latest + when: + - operator: EQ + value: $$IS_PRODUCTION_BRANCH + other: 'true' + commands: + - git config user.email "sfci-team@salesforce.com" + - git config user.name "SFCI Team" + - pwd + # Sets a tag like "ml4ir-5.0.7". The command does not attempt to push the tag. + # Notice the '|| true' at the end! + - mvn build-helper:parse-version scm:tag -Dtag=ml4ir-\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion} -DpushChanges=false || true + publish: + - publish-jar: + artifacts: + - groupId: "com.salesforce.services.search" + artifactId: "ml4ir-parent" + - groupId: "com.salesforce.services.search" + artifactId: "ml4ir-inference" diff --git a/CODEOWNERS b/CODEOWNERS index 522fa4a0..569819ad 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,4 @@ # Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing. #ECCN:Open Source +#GUSINFO: Document Search Relevance,Default +* diff --git a/jvm/ml4ir-inference/pom.xml b/jvm/ml4ir-inference/pom.xml index f3f341ed..bf7708dc 100644 --- a/jvm/ml4ir-inference/pom.xml +++ b/jvm/ml4ir-inference/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - ml4ir + com.salesforce.services.search ml4ir-parent 0.1-SNAPSHOT @@ -153,6 +153,7 @@ maven-compiler-plugin + 3.10.1 ${java.version} ${java.version} diff --git a/jvm/pom.xml b/jvm/pom.xml index bd89a451..7836ad50 100644 --- a/jvm/pom.xml +++ b/jvm/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - ml4ir + com.salesforce.services.search ml4ir-parent 0.1-SNAPSHOT ml4ir-parent diff --git a/scripts/determine-next-version.bash b/scripts/determine-next-version.bash new file mode 100644 index 00000000..c5d26902 --- /dev/null +++ b/scripts/determine-next-version.bash @@ -0,0 +1,16 @@ +#!/bin/bash + +# Determines the next version to use to publish to Nexus. + +# Script is used by .strata.yml + +set -x + +GIT_TAG_PREFIX=$1 +function determine_version_from_tags() { + git tag | grep $GIT_TAG_PREFIX | sort --version-sort | tail -1 | perl -pe "s;${GIT_TAG_PREFIX}-;;" +} + +# mvn build-helper:released-version versions:set -DnewVersion=\${releasedVersion.version} || \ +mvn versions:set -DnewVersion=$(determine_version_from_tags) +