Skip to content

Commit 59ee855

Browse files
committed
feat: Updating with latest version
fix(functions): 🚑 Login check did not work. PAT was always used feat(functions): Added a way to function to clear authentication header refactor: 🚚 Moving all the functions in different folders feat: Added function for branch control on pipeline feat(workflow): Added psscriptanalyzer chore(release): v0.1.0 [skip ci] fix(worklows): 🚀 Added repo parameter chore(release): v0.2.0 [skip ci] chore(release): v0.3.0 [skip ci] chore(release): v0.4.0 [skip ci] fix: 🚀 Fixing psgallery Api key fix: 🚀 Added build task to psake feat: adding version to publish fix: typo fix: changed to publish-module fix: Added update-modulemanifest fix: typo fix: -as [version] fix: changed to init fix: typo fix:typo fix: removed cast fix: testing build fix: Switch order fix: replaced path fix: update manifest fix: added functionsToExport to workflow fix: testing version from tripss action fix: fixed version fix: typo fix: testing new github release
1 parent 62a994d commit 59ee855

123 files changed

Lines changed: 11587 additions & 1390 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG USER_UID=1000
1414
ARG USER_GID=$USER_UID
1515

1616
# install git iproute2, process tools
17-
RUN apt-get update && apt-get -y install git openssh-client less iproute2 procps \
17+
RUN apt-get update && apt-get -y install git openssh-client less iproute2 procps gnupg2 python3 python3-pip \
1818
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
1919
&& groupadd --gid $USER_GID $USERNAME \
2020
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
@@ -28,3 +28,5 @@ RUN apt-get update && apt-get -y install git openssh-client less iproute2 procps
2828
&& apt-get clean -y \
2929
&& rm -rf /var/lib/apt/lists/*
3030

31+
RUN pip install mkdocs-awesome-pages-plugin
32+

.devcontainer/devcontainer.json

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
{
2-
"name": "PowerShell",
3-
"dockerFile": "Dockerfile",
4-
// "image": "mcr.microsoft.com/powershell",
5-
6-
// Set *default* container specific settings.json values on container create.
7-
"settings": {
8-
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
2+
"name": "PowerShell",
3+
"dockerFile": "Dockerfile",
4+
// "image": "mcr.microsoft.com/powershell",
5+
// Set *default* container specific settings.json values on container create.
6+
"settings": {
7+
"terminal.integrated.profiles.linux": {
8+
"PowerShell": {
9+
"path": "/usr/bin/pwsh",
10+
"args": []
11+
}
912
},
10-
11-
// Add the IDs of extensions you want installed when the container is created.
12-
"extensions": [
13-
"ms-vscode.powershell",
14-
"davidanson.vscode-markdownlint"
15-
],
16-
17-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18-
// "forwardPorts": [],
19-
20-
// Bootstrap build modules
21-
"postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'",
22-
23-
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
24-
// "remoteUser": "vscode"
13+
"terminal.integrated.defaultProfile.windows": "PowerShell"
14+
},
15+
// Add the IDs of extensions you want installed when the container is created.
16+
"extensions": [
17+
"ms-vscode.powershell-preview",
18+
"davidanson.vscode-markdownlint",
19+
"eamodio.gitlens",
20+
"GitHub.vscode-pull-request-github",
21+
"pspester.pester-test",
22+
"mhutchie.git-graph",
23+
"cschleiden.vscode-github-actions",
24+
"rangav.vscode-thunder-client",
25+
"Gruntfuggly.todo-tree",
26+
"ms-vscode.azure-account",
27+
"vivaxy.vscode-conventional-commits"
28+
],
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
31+
// Bootstrap build modules
32+
"postCreateCommand": "pwsh -c './build.ps1 -Task Init -Bootstrap'"
33+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
34+
// "remoteUser": "vscode"
2535
}
26-

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @WeAreInSpark/expertteam-deployment-automation

.github/CONTRIBUTING.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,48 @@ Below are some guidelines that will help make the process as smooth as possible.
55

66
## Getting Started
77

8-
- Make sure you have a [GitHub account](https://github.com/signup/free)
98
- Submit a new issue, assuming one does not already exist.
109
- Clearly describe the issue including steps to reproduce when it is a bug.
1110
- Make sure you fill in the earliest version that you know has the issue.
12-
- Fork the repository on GitHub
1311

1412
## Suggesting Enhancements
1513

16-
I want to know what you think is missing from InfrastructureAsCode and how it can be made better.
14+
We want to know what you think is missing from InfrastructureAsCode and how it can be made better.
1715

1816
- When submitting an issue for an enhancement, please be as clear as possible about why you think the enhancement is needed and what the benefit of it would be.
1917

2018
## Making Changes
2119

22-
- From your fork of the repository, create a topic branch where work on your change will take place.
23-
- To quickly create a topic branch based on master; `git checkout -b my_contribution master`.
24-
Please avoid working directly on the `master` branch.
20+
- Create a topic branch where work on your change will take place.
21+
- To quickly create a topic branch based on master; `git checkout -b my_contribution master`. <br>
22+
We have policies in place to prevent direct committing on main to prevent error and malicious acts.
2523
- Make commits of logical units.
2624
- Check for unnecessary whitespace with `git diff --check` before committing.
27-
- Please follow the prevailing code conventions in the repository.
28-
Differences in style make the code harder to understand for everyone.
25+
- Check the build workflows when creating a PR. Our standards are added in CI as much as we can.
2926
- Make sure your commit messages are in the proper format.
3027

3128
```
3229
Add more cowbell to Get-Something.ps1
3330
3431
The functionality of Get-Something would be greatly improved if there was a little
3532
more 'pizzazz' added to it. I propose a cowbell. Adding more cowbell has been
36-
shown in studies to both increase one's mojo, and cement one's status
37-
as a rock legend.
33+
shown in studies to both increase one's work satisfaction, and cement one's status
34+
as a rock legend. We gotta have more cowbell!
3835
```
3936

4037
- Make sure you have added all the necessary Pester tests for your changes.
4138
- Run _all_ Pester tests in the module to assure nothing else was accidentally broken.
4239

4340
## Documentation
4441

45-
I am infallible and as such my documenation needs no corectoin.
46-
In the highly unlikely event that that is _not_ the case, commits to update or add documentation are highly apprecaited.
42+
There is always something to improve in documentation. Please let us know via an issue or share a PR to improve our documentation.
4743

4844
## Submitting Changes
4945

50-
- Push your changes to a topic branch in your fork of the repository.
51-
- Submit a pull request to the main repository.
52-
- Once the pull request has been reviewed and accepted, it will be merged with the master branch.
53-
- Celebrate
46+
- Push your changes to a topic branch.
47+
- Submit a pull request to the main branch.
48+
- Once the pull request has been reviewed and accepted, it will be merged with the main branch.
49+
- Celebrate 🎊
5450

5551
## Additional Resources
5652

@@ -59,4 +55,3 @@ In the highly unlikely event that that is _not_ the case, commits to update or a
5955
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
6056
- [GitHub Flow guide](https://guides.github.com/introduction/flow/)
6157
- [GitHub's guide to contributing to open source projects](https://guides.github.com/activities/contributing-to-open-source/)
62-

.github/workflows/CI.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- "AzureDevOpsPowerShellAPI/**"
8+
- "docs/**"
9+
jobs:
10+
Docs:
11+
name: Deploy docs to GitHub Pages
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Test
17+
shell: pwsh
18+
run: |
19+
./build.ps1 -Task Build -Bootstrap
20+
- name: Build
21+
uses: Tiryoh/actions-mkdocs@v0
22+
with:
23+
requirements: "mkdocs.txt"
24+
- name: Deploy
25+
uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./site

.github/workflows/Release.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
name: Release module
9+
runs-on: windows-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Conventional Changelog Action
17+
id: changelog
18+
uses: TriPSs/conventional-changelog-action@v3
19+
with:
20+
output-file: "false"
21+
skip-version-file: "false"
22+
skip-commit: "true"
23+
skip-git-pull: "true"
24+
25+
- name: Release
26+
uses: softprops/action-gh-release@v1
27+
with:
28+
draft: false
29+
prerelease: false
30+
body: ${{ steps.changelog.outputs.clean_changelog }}
31+
tag_name: ${{ steps.changelog.outputs.tag }}
32+
name: Release ${{ steps.changelog.outputs.tag }}
33+
34+
# - name: Create Release
35+
# uses: actions/create-release@v1
36+
# if: ${{ steps.changelog.outputs.skipped == 'false' }}
37+
# env:
38+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
# with:
40+
# tag_name: ${{ steps.changelog.outputs.tag }}
41+
# release_name: Release ${{ steps.changelog.outputs.tag }}
42+
# body: ${{ steps.changelog.outputs.clean_changelog }}
43+
# draft: false
44+
# prerelease: false
45+
46+
- name: Release module to PSGallery
47+
shell: pwsh
48+
env:
49+
PSGALLERY_API_KEY: ${{ secrets.PAT }}
50+
run: |
51+
$version = "${{ steps.changelog.outputs.tag }}" -replace "v", ""
52+
$public = @(Get-ChildItem -Path (Join-Path -Path ".\AzureDevOpsPowerShellAPI" -ChildPath 'Public\*.ps1') -Recurse -ErrorAction Stop)
53+
54+
Update-ModuleManifest -Path ".\AzureDevOpsPowerShellAPI\AzureDevOpsPowerShellAPI.psd1" -ModuleVersion "$version"
55+
Update-ModuleManifest -Path ".\AzureDevOpsPowerShellAPI\AzureDevOpsPowerShellAPI.psd1" -FunctionsToExport $public.Basename
56+
57+
Publish-Module -NuGetApiKey "$env:PSGALLERY_API_KEY" -Repository PSGallery -path ".\AzureDevOpsPowerShellAPI"

.github/workflows/Tests.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
on: [pull_request]
3+
jobs:
4+
test:
5+
name: Run Tests
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-latest, windows-latest]
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Test
14+
shell: pwsh
15+
run: |
16+
Install-Module -Name Microsoft.Graph.Applications -Force
17+
Install-Module -Name Az.Accounts -Force
18+
Install-Module -Name Az.KeyVault -Force
19+
./build.ps1 -Task Test -Bootstrap
20+
validate-commits:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out code into the Go module directory
24+
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
- name: Commitsar check
28+
uses: docker://aevea/commitsar

.github/workflows/powershell.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
#
6+
# https://github.com/microsoft/action-psscriptanalyzer
7+
# For more information on PSScriptAnalyzer in general, see
8+
# https://github.com/PowerShell/PSScriptAnalyzer
9+
10+
name: PSScriptAnalyzer
11+
12+
on:
13+
push:
14+
branches: [ "main"]
15+
pull_request:
16+
branches: [ "main" ]
17+
schedule:
18+
- cron: '27 5 * * 3'
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
build:
25+
permissions:
26+
contents: read # for actions/checkout to fetch code
27+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
28+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
29+
name: PSScriptAnalyzer
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
34+
- name: Run PSScriptAnalyzer
35+
uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f
36+
with:
37+
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
38+
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
39+
path: .\
40+
recurse: true
41+
# Include your own basic security rules. Removing this option will run all the rules
42+
includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"'
43+
output: results.sarif
44+
45+
# Upload the SARIF file generated in the previous step
46+
- name: Upload SARIF results file
47+
uses: github/codeql-action/upload-sarif@v2
48+
with:
49+
sarif_file: results.sarif

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Don't check in the Output dir
22
Output/
3+
site/

0 commit comments

Comments
 (0)