github.com/grafana/synthetic-monitoring-agent@v0.64.2/scripts/package/verify-deb-install.sh (about)

     1  #!/usr/bin/env sh
     2  
     3  set -euxo pipefail
     4  
     5  docker ps
     6  image="$(docker ps --filter ancestor=jrei/systemd-debian:12 --latest --format "{{.ID}}")"
     7  echo "Running on container: ${image}"
     8  
     9  dir="."
    10  if [ -n "${CI}" ]; then
    11      dir="/drone/src"
    12  fi
    13  echo "Running on directory: ${dir}"
    14  
    15  cat <<EOF | docker exec --interactive "${image}" sh
    16      set -x
    17  
    18      # Install the agent and check the files are in the right place
    19      dpkg -i ${dir}/dist/synthetic-monitoring-agent*amd64.deb
    20  
    21      if [ ! -x "\$(command -v synthetic-monitoring-agent)" ]; then
    22          echo "ERROR: synthetic-monitoring-agent not installed."
    23          exit 1
    24      fi
    25  
    26      if [ ! -f "/etc/synthetic-monitoring/synthetic-monitoring-agent.conf" ]; then
    27          echo "ERROR: synthetic-monitoring-agent config file not installed."
    28          exit 1
    29      fi
    30  EOF