parameters: temp_cfg: $(System.DefaultWorkingDirectory)/bindings/java/src/main/native/build-java/tmp-settings.xml gpg_dir: $(System.DefaultWorkingDirectory)/bindings/java/src/main/native/build-java/gpg target: package jobs: - job: jucx_release pool: name: MLNX demands: - harbor_registry -equals yes # we need to use lowest version for compatible container: centos7_cuda11 steps: - checkout: self clean: true fetchDepth: 100 path: "we/need/to/go/deeper" # ^workaround agent issue with container in root path - bash: | set -eEx gcc --version ./autogen.sh ./contrib/configure-release --with-java displayName: Configure - bash: | set -eEx make -s -j`nproc` displayName: Build ucx - bash: | set -eE { echo -e "" echo -e "ossrh\${env.SONATYPE_USERNAME}" echo -e "\${env.SONATYPE_PASSWORD}" echo -e "" } > ${{ parameters.temp_cfg }} displayName: Generate temporary config - task: DownloadSecureFile@1 displayName: Download Secure file inputs: secureFile: sparkucx-secret.gpg name: privateKey - task: DownloadSecureFile@1 displayName: Download Secure file inputs: secureFile: sparkucx-public.gpg name: publicKey - bash: | mkdir ${{ parameters.gpg_dir }} export GPG_TTY=`tty` chmod 700 ${{ parameters.gpg_dir }} cp $(publicKey.secureFilePath) ${{ parameters.gpg_dir }}/pubring.gpg cp $(privateKey.secureFilePath) ${{ parameters.gpg_dir }}/secring.gpg export GNUPGHOME=${{ parameters.gpg_dir }} TAG=`git describe --tags` # Maven requires version to be of form MAJOR_VERSION.MINOR_VERSIOn,... # ucx tags are of form v1.x.x - need to remove 'v' from the beginning of string MAVEN_VERSION=${TAG:1} make -C bindings/java/src/main/native/ ${{ parameters.target }} \ ARGS="--settings ${{ parameters.temp_cfg }}" JUCX_VERSION=${MAVEN_VERSION} displayName: Publish JUCX jar to maven central env: GPG_PASSPHRASE: $(GPG_PASSPHRASE) SONATYPE_PASSWORD: $(SONATYPE_PASSWORD) SONATYPE_USERNAME: $(SONATYPE_USERNAME)