Sign script POC
This commit is contained in:
@@ -100,6 +100,9 @@
|
||||
<misc.p2.repo.version>3.9.4.202211021051</misc.p2.repo.version>
|
||||
|
||||
<gpg.passphrase>${env.bamboo_vault_tools_signing_gpg_secret_passphrase}</gpg.passphrase>
|
||||
|
||||
<vm-signing.ssh.user>signer</vm-signing.ssh.user>
|
||||
<vm-signing.ssh.key>/home/bamboo/.ssh/id_rsa</vm-signing.ssh.key>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
@@ -383,6 +386,40 @@
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>aboyko</id>
|
||||
<properties>
|
||||
<vm-signing.ssh.user>aboyko</vm-signing.ssh.user>
|
||||
<vm-signing.ssh.key>~/.ssh/id_rsa</vm-signing.ssh.key>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>vm-signing</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<executions>
|
||||
<execution><!-- Run our version calculation script -->
|
||||
<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>
|
||||
@@ -515,6 +552,7 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
<pluginManagement>
|
||||
@@ -629,6 +667,19 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<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>
|
||||
|
||||
20
eclipse-language-servers/scripts/sign-jars.sh
Executable file
20
eclipse-language-servers/scripts/sign-jars.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
set -e
|
||||
if [ -d "$1" ]
|
||||
then
|
||||
echo "Sign JARs in directory: $1"
|
||||
files=`ls $1`
|
||||
for file in $files
|
||||
do
|
||||
if ! [ -d $file ] && [[ $file == *.jar ]]
|
||||
then
|
||||
echo "Copying $file to remote machine..."
|
||||
scp -i $SSH_KEY $1/$file $SSH_USER@vm-tools.spring.vmware.com:/opt/bamboo
|
||||
echo "Signing $file..."
|
||||
echo "Copying **signed** $file back... (into $1/$file)"
|
||||
scp -i $SSH_KEY $SSH_USER@vm-tools.spring.vmware.com:/opt/bamboo/$file $1/$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
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user