Commit 4065712f authored by Watchtek's avatar Watchtek
Browse files

Update .gitlab-ci.yml file

parent 06a7c001
Loading
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -8,9 +8,12 @@ stages:
    DEST_DIR: /tmp/tmp
    PACKAGE_NAME: google-chrome-stable   # Default package, can be overridden
  before_script:
    # Create destination folder
    - mkdir -p "$DEST_DIR"
    - apt-get update
    - apt-get install -y wget gnupg apt-rdepends
    # Update package list quietly
    - apt-get update -qq
    # Install necessary tools quietly
    - apt-get install -y -qq wget gnupg apt-rdepends
  script:
    # Optional: add repository if PACKAGE_NAME is Chrome
    - if [ "$PACKAGE_NAME" = "google-chrome-stable" ]; then
@@ -18,17 +21,17 @@ stages:
        wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -;
      fi

    # Update package lists after adding repo
    - apt-get update
    # Update package list again quietly after adding repo
    - apt-get update -qq

    # Get exact dependencies for PACKAGE_NAME
    - deps=$(apt-rdepends "$PACKAGE_NAME" | grep -v "^ " | grep -v "$PACKAGE_NAME")
    - deps="$PACKAGE_NAME $deps"

    # Download package and dependencies into DEST_DIR
    # Download package and dependencies quietly into DEST_DIR
    - cd "$DEST_DIR"
    - for pkg in $deps; do
        apt-get download "$pkg";
        apt-get download -qq "$pkg";
      done

    - echo "All .deb files for $PACKAGE_NAME and dependencies are in $DEST_DIR"
@@ -37,6 +40,12 @@ stages:
    paths:
      - /tmp/tmp

  # Cache apt downloads to speed up future jobs
  cache:
    key: apt-cache
    paths:
      - /var/cache/apt/archives

# Job for Ubuntu 22.04
ubuntu_22_04:
  <<: *download_template