Skip to content

Changes to enable module use within an Azure DevOps pipeline - #34

Closed
whiteken wants to merge 2 commits into
mkellerman:masterfrom
whiteken:master
Closed

Changes to enable module use within an Azure DevOps pipeline#34
whiteken wants to merge 2 commits into
mkellerman:masterfrom
whiteken:master

Conversation

@whiteken

Copy link
Copy Markdown

For issues #32 and #33

If this PR is accepted, the -ArgumentList parameter is configured to look for $true which will introduce some changes designed for Azure DevOps build agents.

Command:
Import-Module PSTwitterAPI -ArgumentList $true -Force -Scope Local -Verbose

This will change current default module behaviour so that:

  1. API creds are stored as a climl file instead of an environment variable
  2. Some currently terminating errors become Write-Verbose messages instead

This will enable a successful module import from PSGallery during Azure DevOps pipeline release
If the ArgumentList parameter is not supplied on module load then no change is introduced.

(Sorry about the version number - but at least 0.0.8 is still a 00 agent - https://en.wikipedia.org/wiki/00_Agent)

@mkellerman

Copy link
Copy Markdown
Owner

I'm not exactly sure what you're trying to accomplish.
How is anyone supposed to know that this ArgumentList $true is to allow the usage of a config file? Why not simply look for the presence of a config file, if it's there, use it, if it's not, use the default workflow?!

I've made the changes to remove the Throw error in PR #35.

@mkellerman mkellerman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more information as to why this is done this way. Let's chat on Slack/Discord. Do you have access to the PowerShell Slack/Discord group? There is a #pstwitterapi channel.

@mkellerman

Copy link
Copy Markdown
Owner

@whiteken havent heard back...

@mkellerman mkellerman closed this Feb 27, 2020
@whiteken

Copy link
Copy Markdown
Author

@mkellerman Please accept sincere apologies for total radio silence, I have to admit I completely forgot about this until a note from github on the last update this morning. "How is anyone supposed to know that this ArgumentList $true is to allow the usage of a config file?" is completely fair point. In the end (if I remember correctly) I forked and made those changes privately but they were pretty specific to my issue. Thanks for looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants