-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#32) Add a build pipeline #42
Merged
JPRuskin
merged 4 commits into
chocolatey-community:develop
from
corbob:32-build-pipeline
Mar 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
(#32) Adjust CI builds
Add the configuration for building on Team City and GitHub Actions. Also remove the AppVeyor configuration.
- Loading branch information
commit aeee1d0516a39358988152656b8bb12e5d211d31
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Chocolatey-AU Builds | ||
|
||
on: | ||
# Trigger on pushes and on pull requests | ||
push: | ||
pull_request: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Build on Windows | ||
windows-build: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Cache Tools | ||
uses: actions/cache@v3.0.11 | ||
with: | ||
path: tools | ||
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }} | ||
- name: Build Chocolatey-AU module | ||
run: .\build.ps1 -Task CI -Verbose -ErrorAction Stop | ||
- name: Upload Windows build results | ||
uses: actions/upload-artifact@v3 | ||
# Always upload build results | ||
if: ${{ always() }} | ||
with: | ||
name: build-results | ||
path: | | ||
code_drop/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import jetbrains.buildServer.configs.kotlin.v2019_2.* | ||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests | ||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests | ||
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.powerShell | ||
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs | ||
|
||
project { | ||
buildType(ChocolateyAU) | ||
} | ||
|
||
object ChocolateyAU : BuildType({ | ||
id = AbsoluteId("ChocolateyAU") | ||
name = "Build" | ||
|
||
artifactRules = """ | ||
+:code_drop/** | ||
""".trimIndent() | ||
|
||
params { | ||
param("env.vcsroot.branch", "%vcsroot.branch%") | ||
param("env.Git_Branch", "%teamcity.build.vcs.branch.ChocolateyAU_ChocolateyAUVcsRoot%") | ||
param("teamcity.git.fetchAllHeads", "true") | ||
password("env.GITHUB_PAT", "%system.GitHubPAT%", display = ParameterDisplay.HIDDEN, readOnly = true) | ||
} | ||
|
||
vcs { | ||
root(DslContext.settingsRoot) | ||
|
||
branchFilter = """ | ||
+:* | ||
""".trimIndent() | ||
} | ||
|
||
steps { | ||
step { | ||
name = "Include Signing Keys" | ||
type = "PrepareSigningEnvironment" | ||
} | ||
powerShell { | ||
name = "Build Module" | ||
formatStderrAsError = true | ||
scriptMode = script { | ||
content = """ | ||
try { | ||
& .\build.ps1 -Task CI -Verbose -ErrorAction Stop | ||
} | ||
catch { | ||
${'$'}_ | Out-String | Write-Host -ForegroundColor Red | ||
exit 1 | ||
} | ||
""".trimIndent() | ||
} | ||
noProfile = false | ||
param("jetbrains_powershell_script_file", "build.ps1") | ||
} | ||
} | ||
|
||
triggers { | ||
vcs { | ||
branchFilter = "" | ||
} | ||
} | ||
|
||
features { | ||
pullRequests { | ||
provider = github { | ||
authType = token { | ||
token = "%system.GitHubPAT%" | ||
} | ||
} | ||
} | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite alot of users make use of AU through AppVeyor, it might be best to keep such a build for AppVeyor around purely for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure what would be needed to have AppVeyor work on this repository. I imagine it's a little bit more complex than just updating this file.
I would not be opposed to leaving the configuration file there for adding AppVeyor builds in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets leave it as is for now, and perhaps create a followup issue for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created issue #43 off of this. I'll go back to it after this PR is merged and link directly to the commit that removes the appveyor.yaml file to make it easy to locate in the future.