Code Monkey home page Code Monkey logo

psake-vsts's Introduction

Welcome to the psake project

Azure Pipelines GitHub Actions PS Gallery Chocolatey Nuget.org Gitter
Azure Pipelines Build Status GitHub Actions Status PowerShell Gallery Chocolatey Nuget downloads Join the chat at https://gitter.im/psake/psake

psake is a build automation tool written in PowerShell. It avoids the angle-bracket tax associated with executable XML by leveraging the PowerShell syntax in your build scripts. psake has a syntax inspired by rake (aka make in Ruby) and bake (aka make in Boo), but is easier to script because it leverages your existing command-line knowledge.

psake is pronounced sake โ€“ as in Japanese rice wine. It does NOT rhyme with make, bake, or rake.

How to get started

Step 1: Download and extract the project

You will need to "unblock" the zip file before extracting - PowerShell by default does not run files downloaded from the Internet. Just right-click the zip and click on "properties" and click on the "unblock" button.

Step 2: CD into the directory where you extracted the project (where the psake.psm1 file is)

Import-Module .\psake.psm1

If you encounter the following error "Import-Module : ...psake.psm1 cannot be loaded because the execution of scripts is disabled on this system." Please see "get-help about_signing" for more details.

  1. Run PowerShell as administrator
  2. Set-ExecutionPolicy RemoteSigned

Get-Help Invoke-psake -Full

  • this will show you help and examples of how to use psake

Step 3: Run some examples

CD .\examples

Invoke-psake

  • This will execute the "default" task in the "psakefile.ps1"

Invoke-psake .\psakefile.ps1 Clean

  • will execute the single task in the psakefile.ps1 script

Step 4: Set your PATH variable

If you wish to use the psake command from outside of the install folder, add the folder install directory to your PATH variable.

Step 5: (With VS2017) Install the VSSetup dependency

psake uses VSSetup to locate msbuild when using Visual Studio 2017. The VSSetup PowerShell module must be installed prior to compiling a VS2017 project with psake. Install instructions for VSSetup can be found here and here.

Release Notes

You can find all the information about each release of psake in the releases section.

How To Contribute, Collaborate, Communicate

If you'd like to get involved with psake, we have discussion groups over at Google: psake-dev psake-users

Anyone can fork the main repository and submit patches, as well. And lastly, the wiki and issues list are also open for additions, edits, and discussion.

Also check out the psake-contrib project for scripts, modules and functions to help you with a build.

License

psake is released under the MIT license.

psake-vsts's People

Contributors

codeconcussion avatar qetza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

psake-vsts's Issues

Extension is not available in Azure Pipelines even after installing from Market place

I have already installed Psake marketplace extension for my organization in Azure DevOps services but i am still not able to add the task from build definition. When i am searching with name Psake, it does show up the extension and installed button is grayed out since i have already installed it but it won't give me any option to add any task, it does not appear in build section of task either.

Error for tasks with parameters

I tried to input some parameters (like this @{'BuildWorkingFolderNumber'="$(BuildWorkingFolderNumber)"} and this BuildWorkingFolderNumber=14) and it didn't worked. The psake build step doesn't treat parameters in any way that I've tried.

##[warning]Cannot parse parameter or property

Extension fails task if parameter value contains comma. Example:
"TestParam='HereIs,Comma"

The following warning will be shown "WARNING: Cannot parse parameter or property 'Comma'" and the task will be executed incorrectly since the value is partly passed.

Pass multiple values to same parameter

Is there a way to pass multiple values to a single parameter? Like a string array

 psake test -parameters @{testProjects=@("Api,Acceptance")}

I tried a few things but the , gets interpreted as a new parameter

Centralised PSake build scripts and tasks

Hi PSake-VSTS,

We have an onpremise set of psake build and deploy scripts that we share across all of our repositories,
The set of scripts are in the build script repo.
So 100+ code repos with one set of scripts.
Each 100+ repo is different, but by convention we have webapps, services, consoleapps etc building, deploying and installing across many different machines.

I've just setup of first repo in VSTS and installed the psake task from the marketplace, it's asking me to configure the psake file path which is not possible as there is no psake files at all in our code repos.

Our environment configuration settings are stored in another repo, which our psake looks up for settings, so i'm thinking i need to use a feature inside VSTS to handle settings and configuration.

Any advice our guidance as to how I can configure a similar situation in VSTS with reusing our conventions inside psake and vsts?

We've invested a lot of time into our psake scripts and i'm hoping to not have to abandon them, or use a copy inside each repo, or completely rebuild our conventions inside.

I know i need to completely redesign the deploy side of these scripts, but i'd like to reuse the conventions of the build scripts to abstract and simply this transition.

Any advice or pointers to the concepts that I need to understand inside VSTS would be greatly appreciated.

Regards,
Matt

psake step never fails build

Hi!

The step even with errors never fails the build. Is there a way to fail the build when the psake doesn't do what the task is supposed to that I haven't seen?

Psake VSTS Extension cannot find psake module

Been using Psake locally for a while but looking to setup CI/CD for my PowerShell Modules and found the Psake Extension. However when I point that at my build.psake.ps1 script it fails due to being unable to locate the psake module as per the requires tag. I think I got the build.psake.ps1 script from a scaffolding with Plaster, just not sure if I should be writing my own custom script to wrap the build.psake.ps1 or not, but then why would I use the psake extension as I could just use the PowerShell task as I already have done and it works.

2018-02-19T01:06:43.0230747Z ##[section]Starting: psake build.psake.ps1 Build
2018-02-19T01:06:43.0499446Z ==============================================================================
2018-02-19T01:06:43.0499708Z Task         : Psake
2018-02-19T01:06:43.0499904Z Description  : Build with the psake build system
2018-02-19T01:06:43.0500112Z Version      : 5.0.0
2018-02-19T01:06:43.0500480Z Author       : Guillaume Rouchon
2018-02-19T01:06:43.0500710Z Help         : v5.0.0, [More Information](https://github.com/psake/psake-vsts#readme)
2018-02-19T01:06:43.0500947Z ==============================================================================
2018-02-19T01:06:52.0386297Z psake version 4.7.0
2018-02-19T01:06:52.0386885Z Copyright (c) 2010-2017 James Kovacs & Contributors
2018-02-19T01:06:52.0387100Z 
2018-02-19T01:06:52.9198223Z Error: 2/19/2018 1:06:52 AM: 
2018-02-19T01:06:52.9198672Z At D:\a\_tasks\psake_a5a8cf40-b907-4f57-9d89-8d34034c3f97\5.0.0\ps_modules\psake\private\ExecuteInBuildFileScope.ps1:33 char:7
2018-02-19T01:06:52.9199004Z  +     . $psake.build_script_file.FullName
2018-02-19T01:06:52.9199324Z  +       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [<<==>>] Exception: The script 'build.psake.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: psake.
2018-02-19T01:06:53.2095252Z ##[error]Invoke-psake exited with build_success 'False'.
2018-02-19T01:06:53.2490951Z ##[section]Finishing: psake build.psake.ps1 Build

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.