Not Monitored
Tag not monitored by Microsoft.
41,969 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
if some one could help with the problem of .env file in azure pipeline. I saved my .env file in "Secret files" and the pipeline part regarding the Maven goal execution looks like this:
- task: DownloadSecureFile@1
inputs:
secureFile: '.env'
- task: CopyFiles@2
inputs:
SourceFolder: $(Agent.TempDirectory)
Contents: '**\.env'
TargetFolder: $(Build.SourcesDirectory)
cleanTargetFolder: false
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '17'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'verify'
The DownloadSecureFile@1 and CopyFiles@2 works fine:
found 1 files
Copying /home/vsts/work/_temp/.env to /home/vsts/work/1/s/.env
But the goal fails, it looks like .env file is not picked up or not seen... If I hardcode variables in the application.yaml and thus avoid using .env then everything works fine...