From 2d02f0a358a224595fbf4878d429df297d3f680c Mon Sep 17 00:00:00 2001 From: Raghunandan Netrapalli Madhusudhan <raghunandan.madhusudhan@in-tech.com> Date: Mon, 24 Mar 2025 15:06:55 +0100 Subject: [PATCH] use dpkg-deb to install gtgen debian package --- utils/ci/Jenkinsfile | 14 +------------- utils/ci/scripts/pull_gtgen.sh | 22 +++++++--------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/utils/ci/Jenkinsfile b/utils/ci/Jenkinsfile index 98b18a781..6fe1ee0d5 100644 --- a/utils/ci/Jenkinsfile +++ b/utils/ci/Jenkinsfile @@ -101,23 +101,11 @@ spec: } } } - stage('Linux: Pull gecco') { + stage('Linux: Fetch binaries') { steps { container('openpass-build') { sh 'bash repo/utils/ci/scripts/pull_gecco.sh' - } - } - } - stage('Linux: Pull opTestrunner') { - steps { - container('openpass-build') { sh 'bash repo/utils/ci/scripts/pull_optestrunner.sh' - } - } - } - stage('Linux: Pull gtgen') { - steps { - container('openpass-build') { sh 'bash repo/utils/ci/scripts/pull_gtgen.sh' } } diff --git a/utils/ci/scripts/pull_gtgen.sh b/utils/ci/scripts/pull_gtgen.sh index 7e0146f1b..6740dfa3c 100755 --- a/utils/ci/scripts/pull_gtgen.sh +++ b/utils/ci/scripts/pull_gtgen.sh @@ -36,37 +36,29 @@ GTGEN_CLI_FILE=$(basename "$GTGEN_CLI_URL") #download gtgen_core and gtgen_cli download_deb() { echo "============================== Downloading $GTGEN_CORE_FILE ==============================" - wget "${GTGEN_CORE_URL}" || { echo "Unable to download astas core $GTGEN_CORE_FILE from ddad artifactory"; exit 1; } + wget "${GTGEN_CORE_URL}" || { echo "Unable to download gtgen core $GTGEN_CORE_FILE from ddad artifactory"; exit 1; } echo "============================== Download Successful ==============================" echo "============================== Downloading $GTGEN_CLI_FILE ==============================" - wget "${GTGEN_CLI_URL}" || { echo "Unable to download astas cli $GTGEN_CLI_FILE from ddad artifactory"; exit 1; } + wget "${GTGEN_CLI_URL}" || { echo "Unable to download gtgen cli $GTGEN_CLI_FILE from ddad artifactory"; exit 1; } echo "============================== Download Successful ==============================" } #Installs gtgen_core and gtgen_cli install_deb() { echo "============================== Installing $GTGEN_CORE_FILE ==============================" - sudo apt-get install -y ./"$GTGEN_CORE_FILE" || { echo "Unable to install astas core $GTGEN_CORE_FILE package"; exit 1; } + dpkg-deb -X ./"$GTGEN_CORE_FILE" "$OP_GTGEN_CLI_DIR" || { echo "Unable to install gtgen simulator $GTGEN_CORE_FILE package"; exit 1; } echo "============================== Installation Successful ==============================" echo "============================== Installing $GTGEN_CORE_FILE ==============================" - sudo apt-get install -y ./"$GTGEN_CLI_FILE" || { echo "Unable to install astas cli $GTGEN_CLI_FILE package"; exit 1; } + dpkg-deb -X ./"$GTGEN_CLI_FILE" "$OP_GTGEN_CLI_DIR" || { echo "Unable to install gtgen cli $GTGEN_CLI_FILE package"; exit 1; } echo "============================== Installation Successful ==============================" } -#Dry run gtgen_cli install_and_verify_deb() { download_deb install_deb - mv /opt/gtgen_cli/* . || { echo "Unable to move astas cli to $OP_GTGEN_CLI_DIR directory"; exit 1; } - mv /opt/astas_core/lib/* . || { echo "Unable to move astas core to $OP_GTGEN_CLI_DIR directory"; exit 1; } - ./gtgen_cli -v || { echo "Unable to execute astas cli with '-v' option"; exit 1; } -} - -# uninstall (removing gtgen_core also removes gtgen_cli) -uninstall_deb(){ - echo "============================== Removing $GTGEN_CORE_FILE ==============================" - sudo apt remove -y astas-core || { echo "Unable to remove astas core"; exit 1; } - echo "============================== Removed Successfully ==============================" + mv "$OP_GTGEN_CLI_DIR"/opt/gtgen_cli/* . || { echo "Unable to move gtgen cli to $OP_GTGEN_CLI_DIR directory"; exit 1; } + mv "$OP_GTGEN_CLI_DIR"/opt/gtgen_core/lib/* . || { echo "Unable to move gtgen core to $OP_GTGEN_CLI_DIR directory"; exit 1; } + ./gtgen_cli -v || { echo "Unable to execute gtgen cli with '-v' option"; exit 1; } } install_and_verify_deb \ No newline at end of file -- GitLab