-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from tgharold/20240412-0654
Update JFrog .NET build scripts
- Loading branch information
Showing
4 changed files
with
388 additions
and
17 deletions.
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 |
---|---|---|
|
@@ -86,8 +86,8 @@ on: | |
dotnet_version: | ||
value: ${{ inputs.dotnet_version }} | ||
|
||
jfrog_build_name_build: | ||
description: The JFrog build name for the 'build' step is suffixed with '-build'. | ||
jfrog_build_name: | ||
description: The JFrog build name for the 'dotnet-build' step is suffixed with '-dotnet-build'. | ||
value: ${{ jobs.build.outputs.jfrog_build_name }} | ||
|
||
persisted_workspace_artifact_name: | ||
|
@@ -107,16 +107,16 @@ jobs: | |
working-directory: ${{ inputs.project_directory }} | ||
|
||
outputs: | ||
persisted_workspace_artifact_name: ${{ steps.persist-workspace.outputs.artifact_name }} | ||
jfrog_build_name: ${{ env.JFROG_CLI_BUILD_NAME }} | ||
persisted_workspace_artifact_name: ${{ steps.persist-workspace.outputs.artifact_name }} | ||
|
||
env: | ||
CONFIGURATION: ${{ inputs.configuration }} | ||
DOTNET_RESTORE_VERBOSITY: ${{ inputs.dotnet_restore_verbosity }} | ||
NUGETHASHFILES: "${{ inputs.project_directory }}**/*.csproj" | ||
PROJECTDIRECTORY: ${{ inputs.project_directory }} | ||
JFROG_API_BASE_URL: ${{ inputs.jfrog_api_base_url }} | ||
JFROG_CLI_BUILD_NAME: "${{ inputs.jfrog_build_name }}-build" | ||
JFROG_CLI_BUILD_NAME: "${{ inputs.jfrog_build_name }}-dotnet-build" | ||
JFROG_CLI_BUILD_NUMBER: ${{ inputs.jfrog_build_number }} | ||
JFROG_CLI_LOG_LEVEL: ${{ inputs.jfrog_cli_log_level }} | ||
JFROG_NUGET_FEED_REPO: ${{ inputs.jfrog_nuget_feed_repo }} | ||
|
@@ -131,6 +131,12 @@ jobs: | |
regex_pattern: "^debug|release$" | ||
value: ${{ env.CONFIGURATION }} | ||
|
||
- name: Validate inputs.jfrog_build_name | ||
uses: ritterim/public-github-actions/actions/[email protected] | ||
with: # This regex pattern is a bit of a guess | ||
regex_pattern: '^[A-Za-z0-9\-]{5,55}$' | ||
value: ${{ inputs.jfrog_build_name }} | ||
|
||
- name: Validate inputs.jfrog_nuget_feed_repo | ||
uses: ritterim/public-github-actions/actions/[email protected] | ||
with: | ||
|
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ on: | |
type: string | ||
|
||
jfrog_artifactory_repository: | ||
description: 'JFrog Artifactory repository identifier.' | ||
description: 'JFrog Artifactory repository identifier where artifacts will be uploaded to.' | ||
required: true | ||
type: string | ||
|
||
|
@@ -47,11 +47,6 @@ on: | |
required: true | ||
type: string | ||
|
||
jfrog_build_name_build: | ||
description: 'JFrog build name from the build step. We append that build to the pack step build-info.' | ||
required: true | ||
type: string | ||
|
||
jfrog_build_number: | ||
description: 'JFrog build number. Can be an integer, a semantic version, or a string.' | ||
required: true | ||
|
@@ -96,6 +91,10 @@ on: | |
artifact_name: | ||
value: ${{ inputs.artifact_name }} | ||
|
||
jfrog_build_name: | ||
description: The JFrog build name for the 'dotnet-pack' step is suffixed with '-dotnet-pack'. | ||
value: ${{ jobs.pack.outputs.jfrog_build_name }} | ||
|
||
jobs: | ||
|
||
pack: | ||
|
@@ -105,6 +104,9 @@ jobs: | |
run: | ||
working-directory: ${{ inputs.project_directory }} | ||
|
||
outputs: | ||
jfrog_build_name: ${{ env.JFROG_CLI_BUILD_NAME }} | ||
|
||
env: | ||
ARTIFACTNAME: ${{ inputs.artifact_name }} | ||
ARTIFACTPATHSPEC: "${{ inputs.project_directory }}artifacts/*.*nupkg" | ||
|
@@ -113,8 +115,7 @@ jobs: | |
JFROG_SERVER_ID: setup-jfrog-cli-server | ||
JFROG_API_BASE_URL: ${{ inputs.jfrog_api_base_url }} | ||
JFROG_ARTIFACTORY_REPOSITORY: ${{ inputs.jfrog_artifactory_repository }} | ||
JFROG_CLI_BUILD_NAME: "${{ inputs.jfrog_build_name }}" | ||
JFROG_CLI_BUILD_NAME_BUILD: "${{ inputs.jfrog_build_name_build }}" | ||
JFROG_CLI_BUILD_NAME: "${{ inputs.jfrog_build_name }}-dotnet-pack" | ||
JFROG_CLI_BUILD_NUMBER: ${{ inputs.jfrog_build_number }} | ||
JFROG_CLI_LOG_LEVEL: ${{ inputs.jfrog_cli_log_level }} | ||
JFROG_NUGET_FEED_REPO: ${{ inputs.jfrog_nuget_feed_repo }} | ||
|
@@ -138,6 +139,12 @@ jobs: | |
regex_pattern: "^debug|release$" | ||
value: ${{ env.CONFIGURATION }} | ||
|
||
- name: Validate inputs.jfrog_build_name | ||
uses: ritterim/public-github-actions/actions/[email protected] | ||
with: # This regex pattern is a bit of a guess | ||
regex_pattern: '^[A-Za-z0-9\-]{5,55}$' | ||
value: ${{ inputs.jfrog_build_name }} | ||
|
||
- name: Validate inputs.project_directory | ||
uses: ritterim/public-github-actions/actions/[email protected] | ||
with: | ||
|
@@ -254,8 +261,5 @@ jobs: | |
working-directory: ${{ env.ARTIFACTRELATIVEFOLDER }} | ||
continue-on-error: true | ||
|
||
- name: Append the JFrog "-build" build-info to this build-info | ||
run: jf rt build-append "${JFROG_CLI_BUILD_NAME}" "${JFROG_CLI_BUILD_NUMBER}" "${JFROG_CLI_BUILD_NAME_BUILD}" "${JFROG_CLI_BUILD_NUMBER}" | ||
|
||
- name: Push JFrog Build Information | ||
run: jf rt build-publish "${JFROG_CLI_BUILD_NAME}" "${JFROG_CLI_BUILD_NUMBER}" |
Oops, something went wrong.