Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
[eclipse/xtext#2065] Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten Thoms committed Jun 22, 2022
1 parent ac05cb2 commit 1520c23
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions releng/jenkins/sign-and-deploy/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,37 +86,34 @@ pipeline {
steps {
// see https://wiki.eclipse.org/Jenkins#How_can_artifacts_be_deployed_to_OSSRH_.2F_Maven_Central.3F
dir('publishing') {
sh '''
XTEXT_VERSION=$(cat version.txt)
echo "Xtext version on branch $BRANCH_TO_DEPLOY is $XTEXT_VERSION"
gpg --version
gpg --batch --import "${KEYRING}"
ls -a /home/jenkins/.gnupg
echo "pinentry-mode loopback" >> /home/jenkins/.gnupg/gpg.conf
#gpg --export-secret-key D1AE0CFD > ~/.gnupg/secring.gpg
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u);
do
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust;
done
ls -a /home/jenkins/.gnupg
withCredentials([string(credentialsId: 'gpg_passphrase', variable: 'GPG_PASSPHRASE')]) {
sh '''
XTEXT_VERSION=$(cat version.txt)
echo "Xtext version on branch $BRANCH_TO_DEPLOY is $XTEXT_VERSION"
gpg --version
gpg --batch --import "${KEYRING}"
./gradlew -info \
--warning-mode all \
--refresh-dependencies \
-PJENKINS_URL=$JENKINS_URL \
-Posspub.userMavenSettings=/home/jenkins/.m2/settings.xml \
-Posspub.mavenSecurityFile=/home/jenkins/.m2/settings-security.xml \
-Posspub.version=$XTEXT_VERSION \
-Posspub.signJars=$ORG_GRADLE_PROJECT_OSSPUB_SIGN_JARS \
-Posspub.packJars=$ORG_GRADLE_PROJECT_OSSPUB_PACK_JARS \
-Posspub.branch=$BRANCH_TO_DEPLOY \
-Psigning.secretKeyRingFile=/home/jenkins/.gnupg/secring.gpg \
-Psigning.keyId=D1AE0CFD \
clean publishEclipseXtext
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u);
do
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust;
done
find build -name "*.jar" -exec gpg2 --local-user D1AE0CFD --detach-sign {} \\;
'''
./gradlew -info \
--warning-mode all \
--refresh-dependencies \
-PJENKINS_URL=$JENKINS_URL \
-Posspub.userMavenSettings=/home/jenkins/.m2/settings.xml \
-Posspub.mavenSecurityFile=/home/jenkins/.m2/settings-security.xml \
-Posspub.version=$XTEXT_VERSION \
-Posspub.signJars=$ORG_GRADLE_PROJECT_OSSPUB_SIGN_JARS \
-Posspub.packJars=$ORG_GRADLE_PROJECT_OSSPUB_PACK_JARS \
-Posspub.branch=$BRANCH_TO_DEPLOY \
-Psigning.secretKeyRingFile=/home/jenkins/.gnupg/secring.gpg \
-Psigning.keyId=D1AE0CFD \
-Psigning.gnupg.passphrase=$GPG_PASSPHRASE \
clean publishMavenXtext publishEclipseXtext
'''
} // END withCredentials
} // END dir
}
}
Expand Down

0 comments on commit 1520c23

Please sign in to comment.