forked from OCram85/PSCredentialStore
OCram85
6fce8d6a8c
#### 📖 Summary - adds missing `vendor` files into build package. - adds missing `openssl.conf` in build package. - updates libressl / openssl to v3.5.3 #### 📑 Test Plan > 💡 Select your test plan for the code changes. - [x] Tested via Drone.io pipeline - [ ] Custom test - [ ] No test plan ##### Details / Justification <!-- Add your test details or justification for missing tests here. --> #### 📚 Additional Notes - ⚡ See `v1.1.0-dev9` build - https://gitea.ocram85.com/OCram85/PSCredentialStore/releases/tag/v1.1.0-dev9 Co-authored-by: OCram85 <marco.blessing@googlemail.com> Reviewed-on: OCram85/PSCredentialStore#71
152 lines
4.2 KiB
YAML
152 lines
4.2 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: "Build Pipeline"
|
|
|
|
trigger:
|
|
branch:
|
|
exclude:
|
|
- droneDocs/*
|
|
|
|
steps:
|
|
- name: "Pwsh FileLinter"
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
failure: ignore
|
|
environment:
|
|
EXCLUDE: "(.exe|.dll|.ico|.gitkeep|Vendor|.Tests.ps1)"
|
|
commands:
|
|
- |
|
|
apt-get update
|
|
apt-get install -y file
|
|
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module 'DroneHelper' -ErrorAction 'Stop';
|
|
Invoke-FileLinter
|
|
}"
|
|
|
|
- name: "ScriptAnalyzer"
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
failure: ignore
|
|
commands:
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Install-ModuleDependency;
|
|
Invoke-Linter
|
|
}"
|
|
|
|
- name: "Pester"
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
failure: ignore
|
|
commands:
|
|
- |
|
|
apt-get update
|
|
apt-get install -y file
|
|
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Install-ModuleDependency;
|
|
Invoke-UnitTest -Verbosity 'Detailed' -ExcludeTag 'Integration'
|
|
}"
|
|
|
|
- name: "PRComment"
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
failure: ignore
|
|
environment:
|
|
GITEA_TOKEN:
|
|
from_secret: GITEA_TOKEN
|
|
CUSTOM_PIPELINE_STATE: true
|
|
LOG_FILES: "build/*.log"
|
|
commands:
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Send-PRComment
|
|
}"
|
|
when:
|
|
event:
|
|
include:
|
|
- pull_request
|
|
depends_on:
|
|
- "Pwsh FileLinter"
|
|
- "ScriptAnalyzer"
|
|
- "Pester"
|
|
|
|
- name: "buildState"
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
commands:
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Install-ModuleDependency;
|
|
Invoke-BuildState
|
|
}"
|
|
depends_on:
|
|
- "PRComment"
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: "Publish Pipeline"
|
|
|
|
depends_on:
|
|
- "Build Pipeline"
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
steps:
|
|
- name: BuildArtifacts
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
#failure: ignore
|
|
commands:
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Install-ModuleDependency;
|
|
Update-ModuleMeta -Verbose
|
|
}"
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Install-ModuleDependency;
|
|
New-BuildPackage -Verbose -AdditionalPath @('./src/Vendor', './src/openssl.conf')
|
|
}"
|
|
|
|
- name: GiteaRelease
|
|
image: plugins/gitea-release
|
|
settings:
|
|
api_key:
|
|
from_secret: GITEA_TOKEN
|
|
base_url: https://gitea.ocram85.com
|
|
files:
|
|
- "bin/${DRONE_REPO_NAME}.zip"
|
|
- "bin/PSModule.zip"
|
|
title: "${DRONE_TAG}"
|
|
note: CHANGELOG.md
|
|
|
|
- name: "PublishModule"
|
|
image: mcr.microsoft.com/dotnet/sdk:6.0-focal
|
|
#failure: ignore
|
|
environment:
|
|
NuGetToken:
|
|
from_secret: PSGallery
|
|
commands:
|
|
- |
|
|
pwsh -NonInteractive -c "& {
|
|
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
|
|
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
|
|
Install-ModuleDependency;
|
|
Invoke-Publish -Verbose
|
|
}"
|