|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +apply plugin: 'eclipse' |
| 19 | +eclipse { |
| 20 | + project { |
| 21 | + natures 'org.eclipse.wst.jsdt.core.jsNature' |
| 22 | + buildCommand 'org.eclipse.wst.jsdt.core.javascriptValidator' |
| 23 | + } |
| 24 | +} |
| 25 | + |
| 26 | +ext.dockerImageName = 'action-nodejs-v18' |
| 27 | +apply from: '../../gradle/docker.gradle' |
| 28 | + |
| 29 | +distDocker.dependsOn 'copyPackageJson' |
| 30 | +distDocker.dependsOn 'copyProxy' |
| 31 | +distDocker.dependsOn 'copyRunner' |
| 32 | +distDocker.dependsOn 'copyService' |
| 33 | +distDocker.dependsOn 'copyPlatform' |
| 34 | +distDocker.dependsOn 'copyOpenWhisk' |
| 35 | +distDocker.dependsOn 'copyKnative' |
| 36 | +distDocker.dependsOn 'copyBuildTemplate' |
| 37 | +distDocker.finalizedBy('cleanup') |
| 38 | + |
| 39 | +task copyPackageJson(type: Copy) { |
| 40 | + from '../nodejsActionBase/package.json' |
| 41 | + into '.' |
| 42 | +} |
| 43 | + |
| 44 | +task copyProxy(type: Copy) { |
| 45 | + from '../nodejsActionBase/app.js' |
| 46 | + into '.' |
| 47 | +} |
| 48 | + |
| 49 | +task copyRunner(type: Copy) { |
| 50 | + from '../nodejsActionBase/runner.js' |
| 51 | + into '.' |
| 52 | +} |
| 53 | + |
| 54 | +task copyService(type: Copy) { |
| 55 | + from '../nodejsActionBase/src/service.js' |
| 56 | + into './src' |
| 57 | +} |
| 58 | + |
| 59 | +task copyPlatform(type: Copy) { |
| 60 | + from '../nodejsActionBase/platform/platform.js' |
| 61 | + into './platform' |
| 62 | +} |
| 63 | + |
| 64 | +task copyOpenWhisk(type: Copy) { |
| 65 | + from '../nodejsActionBase/platform/openwhisk.js' |
| 66 | + into './platform' |
| 67 | +} |
| 68 | + |
| 69 | +task copyKnative(type: Copy) { |
| 70 | + from '../nodejsActionBase/platform/knative.js' |
| 71 | + into './platform' |
| 72 | +} |
| 73 | + |
| 74 | +task copyBuildTemplate(type: Copy) { |
| 75 | + from '../nodejsActionBase/buildtemplate.yaml' |
| 76 | + into '.' |
| 77 | +} |
| 78 | + |
| 79 | +task cleanup(type: Delete) { |
| 80 | + delete 'package.json' |
| 81 | + delete 'app.js' |
| 82 | + delete 'runner.js' |
| 83 | + delete 'src' |
| 84 | + delete 'platform' |
| 85 | + delete 'buildtemplate.yaml' |
| 86 | +} |
0 commit comments