Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenkins ssh node support on robotframework image #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions recipes-images/images/console-image-robotframework.bb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,17 @@ IMAGE_INSTALL:append = " \
dfu-util \
"


inherit extrausers

GROUPADD_PARAM:${PN} = " \
-g 100 users; \
-g 27 sudo; \
"

# jenkinsuser pwd: 'openssl passwd -6 pwd' generated passwd.
albsod marked this conversation as resolved.
Show resolved Hide resolved
EXTRA_USERS_PARAMS = "\
useradd -p '\$6\$xbyTOQbMo3y6g/Bu\$KGmgF3.wOVWjaCfVrBC6y.F/aFXmihK2lA0/CrjzprbEdt6YN6LlemfkVBccB/4WSGhMUXDcX6m/r3Tcmbzmq.' -s /bin/sh -G sudo,users,dialout jenkinsuser; \
"

export IMAGE_BASENAME = "console-image-robotframework"
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,24 @@ lpadmin -p ZebraGX430t -E -v usb://Zebra%20Technologies/ZTC%20GX430t
cupsaccept ZebraGX430t
cupsenable ZebraGX430t


#Install Java runtime from binary package
wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jre_aarch64_linux_hotspot_21.0.5_11.tar.gz
tar -xvf OpenJDK21U-jre_aarch64_linux_hotspot_21.0.5_11.tar.gz -C /opt/

#on Jenkins add env variables for the Node.
#JAVA_HOME
#/opt/jdk-21.0.5+11-jre
#PATH
#$JAVA_HOME/bin:$PATH
#or
#export JAVA_HOME=/opt/jdk-21.0.5+11-jre
#export PATH=$JAVA_HOME/bin:$PATH

#install public shh key on this machine.
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKqSuN7KghtZfxvpNzklJ+fz/Z81Jd7tMKHaxEfvDvNJSewWKWmwVfX1JXNHgrLDYsFOwptRuxHwHV2Y+rdmXztHzca6mxNGcgw4AfbQipBHYZMRzCzBQ167inOn3GmuoMvatCvVfRRrRGUdnl+fCaEx2AiJDFX68wMo+Fgyj64482DRlVbBiw0M9IKpoI3nMMz74Y5yYPQM5zYRqaOguld8JY/rtlq0/PmtaUj4IMN/o0l7uheLjSXjuw4DtKYAIA2i0YelAKxIsy2pV+9TM/cAtrqz1lZ+X+Jrha+K84yrIgIuuyWX2CQOx3DwerkkT81Cp6CtnNnLQRR6WxsrUbHUVqAnA+EYguUIrs73d94rf5w02bTf9x3TIVei1QgqCmpnrMf0PZYmG3PnvAYh0gxKm0HpKmwkSTx3LtzPMwgoiGhaTshvITmsHCWbEcTUshXyRWs2M1FnL0iJJPGjzY3Jj6nCDGaZiEsSYPYKVZELem2lXeS4/FFPYKvmXNZ3U= root@verdin-am62-hmm" > .ssh/authorized_keys
chmod 700 /home/jenkinsuser/.ssh
chmod 600 /home/jenkinsuser/.ssh/authorized_keys
chown -R jenkinsuser:jenkinsuser /home/jenkinsuser/.ssh

# configuration is done stop this service and disable it we dont need it any more.
systemctl disable ref_unit_setup.service
Expand Down