mirror of https://github.com/portainer/portainer
fix(build-system): allow DevOps pipeline to leverage webpack (#2670)
* Update devopsbuild task to use webpack & remove AppVeyor environment var * Added -Force to replace the existing dist folder * Removed Test-Pathpull/2782/head
parent
ce13167c98
commit
bb8857bddc
|
@ -6,7 +6,7 @@ param (
|
|||
$ErrorActionPreference = "Stop";
|
||||
|
||||
$binary = "portainer.exe"
|
||||
$project_path = (Get-ITEM -Path env:APPVEYOR_BUILD_FOLDER).Value
|
||||
$project_path = $((Get-Location).Path)
|
||||
|
||||
New-Item -Name dist -Path "$project_path" -ItemType Directory | Out-Null
|
||||
Set-Location -Path "$project_path\api\cmd\portainer"
|
||||
|
|
|
@ -10,7 +10,7 @@ $project_path = (Get-ITEM -Path env:BUILD_SOURCESDIRECTORY).Value
|
|||
|
||||
Set-Item env:GOPATH "$project_path\api"
|
||||
|
||||
New-Item -Name dist -Path "$project_path" -ItemType Directory | Out-Null
|
||||
New-Item -Name dist -Path "$project_path" -ItemType Directory -Force | Out-Null
|
||||
New-Item -Name portainer -Path "$project_path\api\src\github.com\" -ItemType Directory | Out-Null
|
||||
|
||||
Copy-Item -Path "$project_path\api" -Destination "$project_path\api\src\github.com\portainer" -Recurse -Force -ErrorAction:SilentlyContinue
|
||||
|
|
15
gruntfile.js
15
gruntfile.js
|
@ -48,9 +48,18 @@ module.exports = function(grunt) {
|
|||
]);
|
||||
});
|
||||
|
||||
grunt.task.registerTask('devopsbuild', 'devopsbuild:<platform>:<arch>', function(p, a) {
|
||||
grunt.task.run(['config:prod', 'clean:all', 'shell:buildBinaryOnDevOps:' + p + ':' + a, 'shell:downloadDockerBinary:' + p + ':' + a, 'before-copy', 'copy:assets', 'after-copy']);
|
||||
});
|
||||
grunt.task.registerTask('devopsbuild', 'devopsbuild:<platform>:<arch>',
|
||||
function(p, a) {
|
||||
grunt.task.run([
|
||||
'config:prod',
|
||||
'env:prod',
|
||||
'clean:all',
|
||||
'copy:templates',
|
||||
'shell:buildBinaryOnDevOps:' + p + ':' + a,
|
||||
'shell:downloadDockerBinary:' + p + ':' + a,
|
||||
'webpack:prod'
|
||||
]);
|
||||
});
|
||||
|
||||
grunt.registerTask('lint', ['eslint']);
|
||||
|
||||
|
|
Loading…
Reference in New Issue