GithubHelp home page GithubHelp logo

kangasta / pullnrun Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 90 KB

A simple python app for running a set of commands from remote sources and pushing result files to remote targets.

License: MIT License

Python 82.78% HTML 17.22%

pullnrun's People

Contributors

kangasta avatar

Watchers

 avatar  avatar  avatar

pullnrun's Issues

Add support for vars and var_files

  • Add vars and var_files settings.
  • Load var_files from path relative to plan.
  • vars overrides var_files.
  • vars and var_files overrides globals.
  • Pass these as kwargs to resolve_templates(...) and resolve_expression(...).

Missing boto3 should be communicated

Action output should include error message that boto3 was not found when functions with boto3 dependencies are called after importing boto3 has failed.

Inline variables are not escaped

Describe the bug

pullnrun_python_executable value is invalid when it is passed to command inside a string command.

To Reproduce

Minimal execution plan to reproduce the bug.

debug: yes
tasks:
- name: Inline variable not escaped
  run_command:
    command: "{{ pullnrun_python_executable }} -c 'exit(1)'"

Output of the included plan that reproduces the bug.

# Start plan execution
# Run pre-tasks
# Execute task: Log versions
# Log versions
pullnrun 0.7.0
jinja2 2.11.2
python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
C:\Python39\python.exe
Windows-10-10.0.19041-SP0
C:\Users\tonia\Documents\github.com\pull-n-run\pullnrun\__init__.py
# Execute task: Log builtin variables
# Echo values
pullnrun_python_executable: C:\Python39\python.exe
pullnrun_sys_platform: win32
pullnrun_generate_report: False
pullnrun_environment_tags: []
pullnrun_plan_tags: []
pullnrun_task_count: 1
# Run tasks
# Execute task 1/1: Inline variable not escaped
+ C:Python39python.exe -c exit(1)
Caught error raised from task: [WinError 2] Määritettyä tiedostoa ei löydy
Traceback (most recent call last):
  File "C:\Users\tonia\Documents\github.com\pull-n-run\pullnrun\execute.py", line 31, in execute_task
    return_value = function(**task.parameters, settings=task.settings)
  File "C:\Users\tonia\Documents\github.com\pull-n-run\pullnrun\builtin\_run.py", line 17, in run_command
    process = run(
  File "C:\Python39\lib\subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Python39\lib\subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python39\lib\subprocess.py", line 1416, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Määritettyä tiedostoa ei löydy

# Plan execution completed
# Run post-tasks
# Execute task: Log statistics
# Execution statistics
Started:   2021-01-28T21:50:18.740472Z
Elapsed:   0.064724 s
Success:   0
Ignored:   0
Fail:      0
Error:     1
Skipped:   0
# Skip task: Generate HTML report

Expected behavior

pullnrun_python_executable should provide valid value also when used inside a string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.