Use SSH for remaining workflows (#3407)
* install sshpass instead of ncftp * don't use file for command * change env vars * replace ncftp with sshpass in docs * switch gcov upload * use heredoc instead of file * convert ibom * whoops * messed up var * remove quotes * undo ini variable changes
This commit is contained in:
parent
d512209146
commit
c1b173a1e1
|
@ -43,9 +43,9 @@ jobs:
|
|||
path: ./android/app/build/outputs/bundle/debug/rusEFI-debug.aab
|
||||
|
||||
- name: Install Tools
|
||||
run: sudo apt-get install ncftp
|
||||
run: sudo apt-get install sshpass
|
||||
|
||||
- name: Upload rusEFI Android application
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
working-directory: .
|
||||
run: java_console/upload_file.sh ${{ secrets.RUSEFI_BUILD_FTP_USER }} ${{ secrets.RUSEFI_BUILD_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }} . android/app/build/outputs/apk/release/rusEFI-release.apk
|
||||
run: java_console/upload_file.sh ${{ secrets.RUSEFI_SSH_USER }} ${{ secrets.RUSEFI_SSH_PASS }} ${{ secrets.RUSEFI_SSH_SERVER }} . android/app/build/outputs/apk/release/rusEFI-release.apk
|
||||
|
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
run: javac -version
|
||||
|
||||
- name: Install Tools
|
||||
run: sudo apt-get install ncftp
|
||||
run: sudo apt-get install sshpass
|
||||
|
||||
- name: Generate Java (Antlr)
|
||||
working-directory: ./java_tools/configuration_definition
|
||||
|
@ -37,4 +37,4 @@ jobs:
|
|||
|
||||
- name: Upload rusEFI server
|
||||
working-directory: .
|
||||
run: java_console/upload_file.sh ${{ secrets.RUSEFI_BUILD_FTP_USER }} ${{ secrets.RUSEFI_BUILD_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }} autoupdate java_console_binary/rusefi_server.jar
|
||||
run: java_console/upload_file.sh ${{ secrets.RUSEFI_SSH_USER }} ${{ secrets.RUSEFI_SSH_PASS }} ${{ secrets.RUSEFI_SSH_SERVER }} autoupdate java_console_binary/rusefi_server.jar
|
||||
|
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
run: javac -version
|
||||
|
||||
- name: Install Tools
|
||||
run: sudo apt-get install ncftp
|
||||
run: sudo apt-get install sshpass
|
||||
|
||||
- name: Build TS plugin body
|
||||
working-directory: ./java_tools/ts_plugin
|
||||
|
@ -26,5 +26,5 @@ jobs:
|
|||
|
||||
- name: Upload plugin body
|
||||
working-directory: .
|
||||
run: java_console/upload_file.sh ${{ secrets.RUSEFI_BUILD_FTP_USER }} ${{ secrets.RUSEFI_BUILD_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }} autoupdate java_tools/ts_plugin/build/jar/rusefi_plugin_body.jar
|
||||
run: java_console/upload_file.sh ${{ secrets.RUSEFI_SSH_USER }} ${{ secrets.RUSEFI_SSH_PASS }} ${{ secrets.RUSEFI_SSH_SERVER }} autoupdate java_tools/ts_plugin/build/jar/rusefi_plugin_body.jar
|
||||
|
||||
|
|
|
@ -60,12 +60,12 @@ jobs:
|
|||
|
||||
- name: Install Coverage Tools
|
||||
if: ${{ matrix.os != 'macos-latest' }}
|
||||
run: sudo apt-get install ncftp lcov
|
||||
run: sudo apt-get install sshpass lcov
|
||||
|
||||
- name: Generate Code Coverage
|
||||
if: ${{ matrix.os != 'macos-latest' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
working-directory: ./unit_tests/
|
||||
run: ./ci_gcov.sh ${{ secrets.RUSEFI_DOXYGEN_FTP_USER }} ${{ secrets.RUSEFI_DOXYGEN_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
||||
run: ./ci_gcov.sh ${{ secrets.RUSEFI_SSH_USER }} ${{ secrets.RUSEFI_SSH_PASS }} ${{ secrets.RUSEFI_SSH_SERVER }}
|
||||
|
||||
- name: Run Tests (sharded)
|
||||
working-directory: ./unit_tests/
|
||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Install Tools
|
||||
run: sudo apt-get install ncftp sshpass mtools
|
||||
run: sudo apt-get install sshpass sshpass mtools
|
||||
|
||||
- name: Generate Enum Strings
|
||||
working-directory: ./firmware/
|
||||
|
@ -28,7 +28,6 @@ jobs:
|
|||
|
||||
- name: Upload .ini files
|
||||
working-directory: ./firmware/tunerstudio/generated
|
||||
# run: ./upload.sh ${{ secrets.RUSEFI_DOXYGEN_FTP_USER }} ${{ secrets.RUSEFI_DOXYGEN_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
||||
run: ../upload_ini.sh ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
||||
|
||||
- name: Generate Live Documentation
|
||||
|
|
|
@ -18,16 +18,16 @@ jobs:
|
|||
run: |
|
||||
sudo add-apt-repository ppa:kicad/kicad-5.1-releases
|
||||
sudo apt-get update
|
||||
sudo apt-get install kicad ncftp
|
||||
sudo apt-get install kicad sshpass
|
||||
|
||||
- name: Set FTP variables
|
||||
- name: Set SSH variables
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||
run: |
|
||||
if [ "${{github.ref}}" = "refs/heads/master" ]; then
|
||||
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
|
||||
echo "::set-env name=RUSEFI_DOXYGEN_FTP_USER::${{secrets.RUSEFI_DOXYGEN_FTP_USER}}";
|
||||
echo "::set-env name=RUSEFI_DOXYGEN_FTP_PASS::${{secrets.RUSEFI_DOXYGEN_FTP_PASS}}";
|
||||
echo "::set-env name=RUSEFI_SSH_SERVER::${{secrets.RUSEFI_SSH_SERVER}}";
|
||||
echo "::set-env name=RUSEFI_SSH_USER::${{secrets.RUSEFI_SSH_USER}}";
|
||||
echo "::set-env name=RUSEFI_SSH_PASS::${{secrets.RUSEFI_SSH_PASS}}";
|
||||
fi
|
||||
|
||||
- name: Generate documentation
|
||||
|
|
|
@ -26,18 +26,16 @@ for f in *.ini; do if [[ -f "$f" ]]; then
|
|||
hash=${BASH_REMATCH[5]}
|
||||
path="$year/$month/$day/$board/$hash.ini"
|
||||
echo "* found path: $path"
|
||||
# unbeliveable, ncftpput does not work with special characters in password?!
|
||||
# ncftpput -m -R -v -u "$1" -p "$2" "$3" $path $f
|
||||
# we do not have ssh for this user
|
||||
# sftp does not support -p flag on mkdir :(
|
||||
echo cd rusefi > cmd
|
||||
echo mkdir $year >> cmd
|
||||
echo mkdir $year/$month >> cmd
|
||||
echo mkdir $year/$month/$day >> cmd
|
||||
echo mkdir $year/$month/$day/$board >> cmd
|
||||
echo put $f $path >> cmd
|
||||
cat cmd
|
||||
sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 <<< `cat cmd`
|
||||
sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 <<SSHCMD
|
||||
cd rusefi
|
||||
mkdir $year
|
||||
mkdir $year/$month
|
||||
mkdir $year/$month/$day
|
||||
mkdir $year/$month/$day/$board
|
||||
put $f $path
|
||||
SSHCMD
|
||||
retVal=$?
|
||||
if [ $retVal -ne 0 ]; then
|
||||
echo "Upload failed"
|
||||
|
|
|
@ -21,6 +21,4 @@ echo -e "\nUploading file: $5"
|
|||
|
||||
# ncftpput -r 999 -m -R -v -u "$1" -p "$2" "$3" $4 $5
|
||||
|
||||
echo put $5 $4 > cmd
|
||||
cat cmd
|
||||
sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 <<< `cat cmd`
|
||||
sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 "put $5 $4"
|
||||
|
|
|
@ -5,8 +5,9 @@ pwd
|
|||
# ibom is part of Doxygen job simply in order to reduce workspace HDD usage on my tiny build server
|
||||
bash misc/jenkins/InteractiveHtmlBom/run.sh
|
||||
|
||||
if [ -n "$RUSEFI_FTP_SERVER" ]; then
|
||||
if [ -n "$RUSEFI_SSH_SERVER" ]; then
|
||||
echo "Uploading IBOMs"
|
||||
ncftpput -R -z -m -V -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" / hardware/ibom
|
||||
cd hardware
|
||||
tar -czf - ibom | sshpass -p "$RUSEFI_SSH_PASS" ssh -o StrictHostKeyChecking=no "$RUSEFI_SSH_USER"@"$RUSEFI_SSH_SERVER" "tar -xzf - -C docs"
|
||||
fi
|
||||
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }
|
||||
|
|
|
@ -15,7 +15,7 @@ Cygwin packages that need to be installed:
|
|||
- subversion
|
||||
- doxygen
|
||||
- zip
|
||||
- ncftp
|
||||
- sshpass
|
||||
- wget
|
||||
- ccache
|
||||
- graphviz
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
|
||||
echo "No FTP Secrets, not even generating coverage"
|
||||
echo "No SSH Secrets, not even generating coverage"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -37,5 +37,5 @@ genhtml coverage.info --output-directory gcov
|
|||
echo -e "\nGenerating rusEFI unit test HTML"
|
||||
|
||||
echo -e "\nUploading HTML"
|
||||
ncftpput -m -R -v -u "$1" -p "$2" "$3" /unit_tests_coverage gcov/*
|
||||
tar -czf - gcov/* | sshpass -p "$RUSEFI_SSH_PASS" ssh -o StrictHostKeyChecking=no "$RUSEFI_SSH_USER"@"$RUSEFI_SSH_SERVER" "tar -xzf - -C docs/unit_tests_coverage"
|
||||
echo -e "\nHappy End."
|
||||
|
|
Loading…
Reference in New Issue