Skip to main content

Declarative recipe-based task runner

Project description

trask Build Status

Declarative recipe-based task runner

Usage:

python3 -m trask [--dry-run] <path>

Example

docker-build {
  tag 'proj1'
  from 'amazonlinux:2'
  recipes {
    yum-install {
      pkg [ 'gcc' 'openssl-devel' ]
    }
    install-rust {
      channel 'nightly'
    }
  }
  workdir '/app'
}

docker-run {
  image 'proj1'
  init true
  volumes [
    {
      host '..'
      container '/app'
    }
  ]
  commands [
    'cargo build --release'
    'cargo test --release'
  ]
}

create-temp-dir {
  var 'install-dir'
}

copy {
  recipe 'copy'
  src [
    proj1.service'
    '../target/release/proj1'
  ]
  dst install-dir
}

set {
  user 'nbishop'
  host '12.34.56.78'
  identity env(SSH_KEY_PATH')
}

upload {
  replace true
  identity identity
  user user
  host host
  src install-dir
  dst 'app'
}

ssh {
  identity identity
  user user
  host host
  commands [
    'sudo cp app/proj1.service /etc/systemd/system/'
    'sudo systemctl enable proj1'
    'sudo systemctl restart proj1'
  ]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trask-1.2.1.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file trask-1.2.1.tar.gz.

File metadata

  • Download URL: trask-1.2.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for trask-1.2.1.tar.gz
Algorithm Hash digest
SHA256 b7cecfe6521498eb05abd33dfe8a58bcd906787f016901b3167d44d1b2858b91
MD5 1d6f8e53c0ba8f3e79bce9dc86a980f1
BLAKE2b-256 0c9fa2673d48ffbe4bbc49679c951b496553b2e70aa486c5c07231aea7393589

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page