Difference between revisions of "Azure Pipelines: AWSShellScript@1"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
 
  /home/[[vsts]]/work/_temp/awsshellscript_1568.sh: line 2: your_python_script.py: [[command not found]]
 
  /home/[[vsts]]/work/_temp/awsshellscript_1568.sh: line 2: your_python_script.py: [[command not found]]
 +
 +
== Example ==
 +
 +
  - task: AWSShellScript@1
 +
    displayName: Name for you task
 +
    [[condition:]] always()
 +
    inputs:
 +
      awsCredentials: "${{ parameters.awsCredentials }}"
 +
      regionName: "${{ parameters.awsRegion }}"
 +
      scriptType: inline
 +
      inlineScript: |
 +
        ls -lah
 +
        pip3 install virtualenv
 +
        virtualenv venv
 +
        venv/bin/pip install -r requirements.txt
 +
        venv/bin/python s3_restore.py \
 +
            --environment "${{ parameters.awsAccountName }}" \
 +
            --service "${{ parameters.sphereServiceName }}"
 +
      disableAutoCwd: true
 +
      failOnStandardError: false
 +
      workingDirectory: "$(System.DefaultWorkingDirectory)"
  
  
  
[[inlineScript:]]
 
[[workingDirectory:]]
 
  
 
== Related ==
 
== Related ==
Line 12: Line 31:
 
* <code>[[script:]]</code>
 
* <code>[[script:]]</code>
 
* <code>[[env]]</code>
 
* <code>[[env]]</code>
 +
[[inlineScript:]]
 +
[[workingDirectory:]]
  
 
== See also ==
 
== See also ==

Revision as of 12:11, 22 March 2022

/home/vsts/work/_temp/awsshellscript_1568.sh: line 2: your_python_script.py: command not found

Example

 - task: AWSShellScript@1
   displayName: Name for you task
   condition: always()
   inputs:
     awsCredentials: "$Template:Parameters.awsCredentials"
     regionName: "$Template:Parameters.awsRegion"
     scriptType: inline
     inlineScript: |
       ls -lah
       pip3 install virtualenv
       virtualenv venv
       venv/bin/pip install -r requirements.txt
       venv/bin/python s3_restore.py \
           --environment "$Template:Parameters.awsAccountName" \
           --service "$Template:Parameters.sphereServiceName"
     disableAutoCwd: true
     failOnStandardError: false
     workingDirectory: "$(System.DefaultWorkingDirectory)"



Related

inlineScript:
workingDirectory:

See also

Advertising: