This repo contains an example to test the CBI infrastructure at Eclipse. It contains an Eclipse plugin which is used to create a feature and a p2 repository. The parent pom.xml covers the basic configuration required to upload the built artifacts to repo.eclipse.org as well as sign the code using Eclipse infrastructure.
Simply run:
mvn clean verify
If building on the CI infrastructure at Eclipse you can also sign the build by passing the 'release' profile:
mvn clean verify -Prelease
The following steps will create a Jenkins freestyle job that does signing and deploys the build artifacts to the CBI project's downloads area.
- Click New Job
- Enter a job name, e.g. 'eclipse-cbi-tycho-example-job'
- Select Build a free-style software job
- Click OK
- For JDK, select
openjdk-jdk17-latest
- Select This project is parameterized
- Click Add Parameter > String Parameter
- Name:
SITE_DIR
- Default Value:
/home/data/httpd/download.eclipse.org/your-project/some/subdir
- (Modify to point to some directory in your project's downloads area).
- Name:
- Click Add Parameter > Boolean Parameter
- Name:
DEPLOY
- Name:
- Under Source Code Management select Git
- Enter the URL for your git repo: e.g.
https://github.com/eclipse-cbi/eclipse-cbi-tycho-example
- Select branch
main
- Enter the URL for your git repo: e.g.
- Under Build Environment select SSH Agent
- From the drop-down menu select
ssh://<bot-username>@projects-storage.eclipse.org
- From the drop-down menu select
- Under Build click Add build step, select Invoke top-level Maven targets
- Set Goals to be
clean verify -Prelease -B
- Set Goals to be
- Click Add build step again, select Execute Shell
- Below is an example shell script:
#!/bin/bash login="<bot-username>@projects-storage.eclipse.org" if [[ "${DEPLOY}" == true ]]; then echo "Deploying..." #check if dir already exists if ssh ${login} test -d ${SITE_DIR}; then ssh ${login} rm -rf ${SITE_DIR} fi ssh ${login} mkdir -p ${SITE_DIR} scp -r org.eclipse.cbi.tycho.example.updatesite/target/repository ${login}:${SITE_DIR} fi
<bot-username> is "genie.<shortname>". E.g. for Eclipse CBI it's "genie.cbi".
- Click Save
At this point test that the build is able to build successfully by clicking Build Now with
- Click Build with Parameters
- Select DEPLOY checkbox
- Click on Build
Freestyle job
Pipeline job