Sha256: f8b88baedf5d063af55fd2a1af6132ef0ed4d563e8d0507bfc8101f8095d75f1

Contents?: true

Size: 1.03 KB

Versions: 224

Compression:

Stored size: 1.03 KB

Contents

#!/bin/bash --login
debug=false
export PACKER_LOG=1
set -e

function usage() {
  echo -e "USAGE: ${0} <build || debug>"
  exit 1
}

function pack() {
  packer_provider_template=$1
  debug=$2
  packer_secrets='./packer_secrets.json'

  if [[ $CRYPTUM_ROOT == '' ]]; then
    if [[ ! -d '/opt/cryptum' ]]; then
      cryptum_root=$(pwd)
    else
      cryptum_root='/opt/cryptum'
    fi
  else
    cryptum_root="${CRYPTUM_ROOT}"
  fi

  cd $cryptum_root/docker

  if $debug; then
    packer build \
      -debug \
      -only docker \
      -var "box_version=latest" \
      -var "ssh_auth_sock=${SSH_AUTH_SOCK}" \
      -var-file=$packer_secrets \
      $packer_provider_template
  else
    packer build \
      -only docker \
      -var "box_version=latest" \
      -var "ssh_auth_sock=${SSH_AUTH_SOCK}" \
      -var-file=$packer_secrets \
      $packer_provider_template
  fi
}

if [[ $# < 1 ]]; then
  usage
fi

action="${1}"

case $action in
  'build')
    pack ./cryptum.json false;;
  'debug')
    pack ./cryptum.json true;;
  '*')
    usage;;
esac

Version data entries

224 entries across 224 versions & 1 rubygems

Version Path
cryptum-0.0.466 docker/cryptum_container.sh
cryptum-0.0.465 docker/cryptum_container.sh
cryptum-0.0.464 docker/cryptum_container.sh
cryptum-0.0.463 docker/cryptum_container.sh
cryptum-0.0.462 docker/cryptum_container.sh
cryptum-0.0.461 docker/cryptum_container.sh
cryptum-0.0.460 docker/cryptum_container.sh
cryptum-0.0.459 docker/cryptum_container.sh
cryptum-0.0.458 docker/cryptum_container.sh
cryptum-0.0.457 docker/cryptum_container.sh
cryptum-0.0.456 docker/cryptum_container.sh
cryptum-0.0.455 docker/cryptum_container.sh
cryptum-0.0.454 docker/cryptum_container.sh
cryptum-0.0.453 docker/cryptum_container.sh
cryptum-0.0.452 docker/cryptum_container.sh
cryptum-0.0.451 docker/cryptum_container.sh
cryptum-0.0.450 docker/cryptum_container.sh
cryptum-0.0.449 docker/cryptum_container.sh
cryptum-0.0.448 docker/cryptum_container.sh
cryptum-0.0.447 docker/cryptum_container.sh