github.com/grafana/synthetic-monitoring-agent@v0.64.2/scripts/package/verify-rpm-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-centos:8 --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      # Import the Grafana GPG key
    19      rpm --import https://packages.grafana.com/gpg.key
    20  
    21      # Install the agent and check the files are in the right place
    22      rpm -i ${dir}/dist/synthetic-monitoring-agent*_amd64.rpm
    23  
    24      if [ ! -x "\$(command -v synthetic-monitoring-agent)" ]; then
    25          echo "ERROR: synthetic-monitoring-agent not installed."
    26          exit 1
    27      fi
    28  
    29      if [ ! -f "/etc/synthetic-monitoring/synthetic-monitoring-agent.conf" ]; then
    30          echo "ERROR: synthetic-monitoring-agent config file not installed."
    31          exit 1
    32      fi
    33  EOF