Salesforce ant deployment
Installing java latest version
https://techviewleo.com/install-java-openjdk-on-amazon-linux-system/
wget https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_linux-x64_bin.tar.gz
tar xvf openjdk-17_linux-x64_bin.tar.gz
sudo mv jdk-17 /opt/
sudo tee /etc/profile.d/jdk.sh <<EOF
export JAVA_HOME=/opt/jdk-17
export PATH=$PATH:$JAVA_HOME/bin
EOF
source /etc/profile.d/jdk.sh
echo $JAVA_HOME
java -version
wget http://www-us.apache.org/dist//ant/binaries/apache-ant-1.9.7-bin.zip
unzip apache-ant-1.9.7-bin.zip
mv apache-ant-1.9.7-bin.zip /opt/ant
export ANT_HOME=/opt/ant
export PATH=$PATH:$ANT_HOME/bin/
ant --version
download the jdk and ant for the first time in pipeline and use export options. When running the ci pipeline for the second time use
If you get permission denied error, choose any location where you have rights and use export path for using the commands in jenkins pipeline.
Comments
Post a Comment