Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ee4j-build] how to release staged artifacts?

Hi,

I just wanted to share where I am at with creating a job to promote artifacts from staging that I am working on for the JTA project (https://jenkins.eclipse.org/jta/job/eclipse-ee4j_jta-api-EE4J_8-promote/). It uses some of the nexus goals that Romain identified earlier.

Create a new freestyle project: eclipse-ee4j_jta-api-EE4J_8-promote

Settings are as follows:

* General
** GitHub project https://github.com/eclipse-ee4j/jta-api/
** This build is parameterized: TAG
** I turned off "Restrict where this project can be run"

* Source Code Management:
** Git
*** Repositories
**** git@xxxxxxxxxx:eclipse-ee4j/jta-api.git
**** Credentials jta-bot
**** Branch specifier: tags/$TAG
 
* Build Environment
** Provide configuration files
*** Add file settings-security.xml /home/jenkins/.m2/
*** Add file settings-jta.xml /home/jenkins/.m2/
** SSH Agent
*** jta-bot

* Build
** Add build step
*** Execute shell

#!/bin/bash -ex

TOOLS_PREFIX='/opt/tools'
JAVA_PREFIX="${TOOLS_PREFIX}/java/oracle"
MVN_HOME="${TOOLS_PREFIX}/apache-maven/latest"
JAVA_HOME="${JAVA_PREFIX}/jdk-8/latest"
PATH="${MVN_HOME}/bin:${JAVA_HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

NEXUS_PLUGIN='org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8'

STAGING_REPO_ID=$(mvn -U -C -s /home/jenkins/.m2/settings-jta.xml \
    -DskipTests -Ddoclint=none -Poss-release \
    $NEXUS_PLUGIN:rc-list -DnexusUrl=https://oss.sonatype.org/ -DserverId=<from-settings-jta.xml> | \
  egrep "^\[INFO\] jakartatransaction\-[0-9]+[ ]+OPEN[ ]+Implicitly created.*" | \
  awk '{print $2}' | head -1)

echo Will be closing $STAGING_REPO_ID

# Close and release the nexus staging repository
#mvn -U -C -s /home/jenkins/.m2/settings-jta.xml \
#    -DskipTests -Ddoclint=none -Poss-release \
#    $NEXUS_PLUGIN:rc-close -DnexusUrl=https://oss.sonatype.org/ -DserverId= <from-settings-jta.xml> \
#  -DstagingRepositoryId=${STAGING_REPO_ID}

On 12 October 2018 at 20:36, Bill Shannon <bill.shannon@xxxxxxxxxx> wrote:
I've asked this several times but never gotten an answer...

After I do "mvn deploy", my artifacts are staged.  How do I "release" them?
How do I discard them if I decide I don't want them to be released?

I believe there's some Maven plugin I need to do this, but I don't know
what that is or how to set up a Jenkins job to use it.

Can someone explain this?  Perhaps create a wiki page with the information?

Thanks.
_______________________________________________
ee4j-build mailing list
ee4j-build@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ee4j-build


Back to the top