File tree Expand file tree Collapse file tree 10 files changed +59
-8
lines changed Expand file tree Collapse file tree 10 files changed +59
-8
lines changed Original file line number Diff line number Diff line change 19
19
default : ' all'
20
20
21
21
jobs :
22
- build-services :
22
+ build-test- services :
23
23
runs-on : ubuntu-latest
24
24
steps :
25
25
- uses : actions/checkout@v2
41
41
42
42
publish-images :
43
43
needs :
44
- - build-services
44
+ - build-test- services
45
45
uses : zowe/api-layer/.github/workflows/build-conformant-images.yml@master
46
46
with :
47
47
service : ${{ github.event.inputs.service }}
Original file line number Diff line number Diff line change 5
5
branches : [ master, v2.x.x ]
6
6
7
7
jobs :
8
+ build-test-services :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ with :
13
+ ref : ${{ github.head_ref }}
14
+
15
+ - uses : ./.github/actions/setup
16
+
17
+ - name : Build and test services
18
+ run : ./gradlew build
19
+
20
+ - uses : ./.github/actions/teardown
21
+
8
22
publish-images :
23
+ needs :
24
+ - build-test-services
9
25
uses : zowe/api-layer/.github/workflows/build-conformant-images.yml@master
10
26
with :
11
27
forceNoRelease : true
Original file line number Diff line number Diff line change 8
8
required : true
9
9
10
10
jobs :
11
+ build-test-services :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ with :
16
+ ref : ${{ github.head_ref }}
17
+
18
+ - uses : ./.github/actions/setup
19
+
20
+ - name : Build and test services
21
+ run : ./gradlew build
22
+
23
+ - uses : ./.github/actions/teardown
24
+
11
25
publish-images :
26
+ needs :
27
+ - build-test-services
12
28
uses : zowe/api-layer/.github/workflows/build-conformant-images.yml@master
13
29
with :
14
30
version : ${{ github.event.inputs.release_version }}
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ node {
15
15
nodeProjectDir = file(" ${ project.projectDir} /frontend" )
16
16
}
17
17
18
+ if (project. hasProperty(' omitDevDependencies' )) {
19
+ npmInstall. args = [' --production' , ' --omit=dev' ] // different args for different npm versions
20
+ }
21
+
18
22
// =================================================
19
23
//
20
24
// Please manage all task dependencies in here and
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ cleanUpWorkingFolder
42
42
api_catalog_package=" api-catalog-package"
43
43
apiml_common_package=" apiml-common-lib-package"
44
44
45
- buildPackage $api_catalog_package " packageApiCatalog"
46
- buildPackage $apiml_common_package " packageCommonLib"
45
+ ignoredUiTasks=" $( getIgnoredUiTasks " api-catalog-ui" ) "
46
+ buildPackage $api_catalog_package " packageApiCatalog -PomitDevDependencies ${ignoredUiTasks} "
47
+ buildApimlCommonPackage
47
48
48
49
preparePackage $api_catalog_package
49
50
preparePackage $apiml_common_package " apiml-common-lib"
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ discovery_package="discovery-package"
43
43
apiml_common_package=" apiml-common-lib-package"
44
44
45
45
buildPackage $discovery_package " packageDiscovery"
46
- buildPackage $apiml_common_package " packageCommonLib "
46
+ buildApimlCommonPackage
47
47
48
48
preparePackage $discovery_package
49
49
preparePackage $apiml_common_package " apiml-common-lib"
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ gateway_package="gateway-package"
43
43
apiml_common_package=" apiml-common-lib-package"
44
44
45
45
buildPackage $gateway_package " packageApiGateway"
46
- buildPackage $apiml_common_package " packageCommonLib "
46
+ buildApimlCommonPackage
47
47
48
48
preparePackage $gateway_package
49
49
preparePackage $apiml_common_package " apiml-common-lib"
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ cleanUpWorkingFolder
42
42
metrics_package=" metrics-service-package"
43
43
apiml_common_package=" apiml-common-lib-package"
44
44
45
- buildPackage $metrics_package " packageMetricsService"
46
- buildPackage $apiml_common_package " packageCommonLib"
45
+ ignoredUiTasks=" $( getIgnoredUiTasks " metrics-service-ui" ) "
46
+ buildPackage $metrics_package " packageMetricsService -P omitDevDependencies ${ignoredUiTasks} "
47
+ buildApimlCommonPackage
47
48
48
49
preparePackage $metrics_package
49
50
preparePackage $apiml_common_package " apiml-common-lib"
Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ function cleanUpWorkingFolder {
63
63
mkdir -p " ${BASE_DIR} /${WORK_DIR} "
64
64
}
65
65
66
+ function getIgnoredUiTasks {
67
+ ui_project=$1
68
+ echo " -x ${ui_project} :test -x ${ui_project} :npmLint"
69
+ }
70
+
66
71
function buildPackage {
67
72
service_package=$1
68
73
package_task=$2
@@ -75,6 +80,10 @@ function buildPackage {
75
80
fi
76
81
}
77
82
83
+ function buildApimlCommonPackage {
84
+ buildPackage " apiml-common-lib-package" " packageCommonLib -x gateway-service:test -x discovery-service:test -x api-catalog-services:test -x api-catalog-ui:test -x api-catalog-ui:npmLint"
85
+ }
86
+
78
87
function preparePackage {
79
88
service_package=$1
80
89
subdirectory=$2
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ node {
20
20
nodeProjectDir = file(" ${ project.projectDir} /frontend" )
21
21
}
22
22
23
+ if (project. hasProperty(' omitDevDependencies' )) {
24
+ npmInstall. args = [' --production' , ' --omit=dev' ] // different args for different npm versions
25
+ }
26
+
23
27
// =================================================
24
28
//
25
29
// Please manage all task dependencies in here and
You can’t perform that action at this time.
0 commit comments