-
Notifications
You must be signed in to change notification settings - Fork 80
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
Frogbot pipeline on Azure DevOps fails with .NET 8 Windows app #795
Comments
Hi @mikeKuester - Thanks for reporting this issue. I also noticed that based on the Also - in order to escalate support issues - you can use the client portal via https://jfrog.com/support/ |
@hadarshjfrog Thanks for your response. I can check this if I'm back at work next year. Ciao, |
Hello @hadarshjfrog, I added a build task, before the frogbot task, which runs without any error: variables:
solution: '**/*.sln'
buildConfiguration: 'Release' - task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(solution)'
arguments: '/p:EnableWindowsTargeting=true --configuration $(buildConfiguration)'
configuration: '$(buildConfiguration)' But the error from the FrogBot task doesn't disappear:
In my frogbot-config.yml, the install command is defined with "nuget restore", as mentioned in the frogbot-config.yml template. But the error says: 'dotnet restore' command failed? I modified the frogbot-config.yml in order to use scan:
projects:
- installCommand: dotnet restore -p:EnableWindowsTargeting=true # /p:Ena.. is also ignored Now it uses the
How can I force FrogBot to use the EnableWindowsTargeting? Without that, .NET projects targetting Windows can not be build (or restored) on non-Windows maschines. |
I got the info from the JFrog support, that I should try this undocumented flag in the pipeline YAML:
And - it works! This is my .frogbot/frogbot-config.yml # Frogbot configuration
- params:
git:
repoName: xxx
branches:
- main
scan:
projects:
- installCommand: dotnet restore -p:EnableWindowsTargeting=true
- workingDirs:
- sources/xxx And this the pipeline Yaml schedules:
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- main
pr: none
trigger: none
pool:
vmImage: ubuntu-latest
variables:
# For DotNetCoreCLI restore task
solution: '**/*.sln'
buildConfiguration: 'Release'
# Predefined Azure Pipelines variables. There's no need to modify them.
JF_GIT_PROJECT: $(System.TeamProject)
JF_GIT_REPO: $(Build.Repository.Name)
JF_GIT_API_ENDPOINT: $(System.CollectionUri)
JF_GIT_BASE_BRANCH: $(Build.SourceBranchName)
JF_GIT_OWNER: $(System.TeamProject)
JF_GIT_PROVIDER: 'azureRepos'
jobs:
- job:
displayName: "Frogbot Scan Repository and Fix"
steps:
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(solution)'
arguments: '/p:EnableWindowsTargeting=true --configuration $(buildConfiguration)'
configuration: '$(buildConfiguration)'
- task: CmdLine@2
displayName: 'Download and Run Frogbot'
env:
# [Mandatory]
# JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
JF_URL: $(JF_URL)
# [Mandatory if JF_USER and JF_PASSWORD are not provided]
# JFrog access token with 'read' permissions for Xray
# JF_ACCESS_TOKEN: $(JF_ACCESS_TOKEN)
# [Mandatory if JF_ACCESS_TOKEN is not provided]
# JFrog user and password with 'read' permissions for Xray
JF_USER: $(JF_USER)
JF_PASSWORD: $(JF_PASSWORD)
# [Mandatory]
# Azure Repos personal access token with Code -> Read & Write permissions
JF_GIT_TOKEN: $(JF_GIT_TOKEN)
# Set log level to debug
JFROG_CLI_LOG_LEVEL: DEBUG
# From the JFrog Support:
# This fixes the error:
JF_SKIP_AUTO_INSTALL: true
# [Optional]
inputs:
script: |
getFrogbotScriptPath=$(if [ -z "$JF_RELEASES_REPO" ]; then echo "https://releases.jfrog.io"; else echo "${JF_URL}/artifactory/${JF_RELEASES_REPO}"; fi)
curl -fLg "$getFrogbotScriptPath/artifactory/frogbot/v2/[RELEASE]/getFrogbot.sh" | sh
./frogbot cfpr |
Describe the bug
I have a .NET 8 solution in Git on Azure DevOps, which I want to scan with Frogbot. I tried this first with a small console app, were it works. But scanning my Windows .NET WPF app fails. I can scan the same .NET WPF app on my windows machine with the actual JFrog CLI (v2.72.0) without errors.
Current behavior
Reproduction steps
Pipeline:
Expected behavior
Frogbot should scan this solution without any errors from the pipeline.
JFrog Frogbot version
2.23.6
Package manager info
Nuget
Git provider
Azure DevOps
JFrog Frogbot configuration yaml file
.frogbot/frogbot-config.yml
Operating system type and version
ubuntu-latest
JFrog Xray version
No response
The text was updated successfully, but these errors were encountered: