or Create a profile
30 Jul, 2021 09:45 PM
I have a project where I create a Chocolatey package from a build. I want to automatically install this NuGet package onto a test VM and run some tests after it's installed.
- configured the build to publish a ZIP and NuGet package artifact
- set up the AppVeyor agent environment
- installed the AppVeyor Deployment Agent on the EC2 VM instance using the environment access key
- added the following to appveyor.yml.
- provider: Environment
I've also tried using deploy_script but couldn't figure out how to get it to run my deploy.ps1 script.
At the end of the day, all I need is to send the generated NuGet package to my AppVeyor agent and run a PowerShell script on the deployment agent and then run some Pester tests afterward.
Can anyone help?
on 30 Jul, 2021 11:14 PM
Provided you can trigger a run of arbirtrary PowerShell script on the server side with the help of Deployment Agent a NuGet package can be downloaded from AppVeyor's NuGet feed.
At minimum your zip should contain deploy.ps1 which will be run on agent side and zip must be configured as windows application. You don't need any files in that zip except deploy.ps1.
In that deploy.ps1 you can download NuGet package from AppVeyor feed directly (nuget CLI or cURL with Basic auth) and do your tests. You have a bunch of environment variables in the script to relate to the specific build: https://www.appveyor.com/docs/deployment/agent/#running-powershell-...
Let me know if that sounds like what you need.
on 31 Jul, 2021 06:16 PM
This gets me closer. Thank you. What if the artifact name is dynamic? I
can't add it to the AppVeyor Agent environment.
on 31 Jul, 2021 06:22 PM
Also, is there a way to connect to the agent after the PowerShell script
ran and invoke some Pesters tests on the agent?
on 31 Jul, 2021 06:57 PM
It's not artifact name, but artifact "deployment" name which is constant.
Could you please elaborate on the second question? As I understand you can put all the logic into deploy.ps1 or you need to run something in between?
on 31 Jul, 2021 08:54 PM
Thanks! I believe I've got the artifact deployment figured out now.
Formatting help /
(switch to plain text)
(switch to Markdown)
You can attach files up to 10MB
If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.
A conversation has been started with the AppVeyor staff to resolve this discussion.
This discussion is private.
Only you and AppVeyor support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
You can use Command ⌘ instead of Control ^ on Mac
Powered by Tender™.