add new signing to jdt extension bundles
This commit is contained in:
@@ -51,6 +51,9 @@
|
||||
<signing.skip>true</signing.skip>
|
||||
<signing.alias>vmware</signing.alias>
|
||||
<misc.p2.repo.version>3.9.4.202211021051</misc.p2.repo.version>
|
||||
|
||||
<vm-signing.ssh.user>signer</vm-signing.ssh.user>
|
||||
<vm-signing.ssh.key>/home/bamboo/.ssh/id_rsa</vm-signing.ssh.key>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
@@ -61,6 +64,32 @@
|
||||
<signing.key.password>${env.bamboo_vault_signing_passphrase}</signing.key.password>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>vm-signing</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>VM JAR Sign</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<arguments>
|
||||
<argument>${project.build.directory}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
@@ -98,6 +127,7 @@
|
||||
<url>https://dist.springsource.com/release/TOOLS/third-party/misc-p2-repo/${misc.p2.repo.version}</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -176,5 +206,22 @@
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<configuration>
|
||||
<executable>scripts/sign-jars.sh</executable>
|
||||
<environmentVariables>
|
||||
<SSH_USER>${vm-signing.ssh.user}</SSH_USER>
|
||||
<SSH_KEY>${vm-signing.ssh.key}</SSH_KEY>
|
||||
</environmentVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
</build>
|
||||
</project>
|
||||
|
||||
29
headless-services/jdt-ls-extension/scripts/sign-jars.sh
Executable file
29
headless-services/jdt-ls-extension/scripts/sign-jars.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
set -e
|
||||
target_folder=$1
|
||||
if [ -d "$target_folder" ]
|
||||
then
|
||||
echo "Sign JARs in directory: $target_folder"
|
||||
files=`ls $target_folder`
|
||||
for file in $files
|
||||
do
|
||||
# echo "Found $file..."
|
||||
if ! [ -d $file ]
|
||||
then
|
||||
# echo "Looking at: $target_folder/$file"
|
||||
extension="${file##*.}"
|
||||
# echo "Detected extension = $extension"
|
||||
if [ "$extension" = "jar" ]
|
||||
then
|
||||
echo "Copying $file to remote machine..."
|
||||
scp -i $SSH_KEY $target_folder/$file $SSH_USER@vm-tools.spring.vmware.com:/opt/bamboo
|
||||
echo "Signing $file..."
|
||||
ssh -i $SSH_KEY $SSH_USER@vm-tools.spring.vmware.com -- /build/apps/signing/signserver/signc -v --input=/opt/bamboo/$file --keyid=jarsign_vmware --signmethod="jdk-1.8.0_121" --output=/opt/bamboo/$file
|
||||
echo "Copying **signed** $file back... (into $target_folder/$file)"
|
||||
scp -i $SSH_KEY $SSH_USER@vm-tools.spring.vmware.com:/opt/bamboo/$file $target_folder/$file
|
||||
echo "Cleaning up remote machine..."
|
||||
ssh -i $SSH_KEY $SSH_USER@vm-tools.spring.vmware.com -- rm /opt/bamboo/$file
|
||||
echo "Successfully signed $file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user