pfefferf / ui5-nwabap-deployer Goto Github PK
View Code? Open in Web Editor NEWUI5 Deployer for SAP NetWeaver ABAP
License: Apache License 2.0
UI5 Deployer for SAP NetWeaver ABAP
License: Apache License 2.0
How do I refer to an environment variable in the ui5.yaml file? I wanted to avoid hard coding of user credentials in the example configuration file provided below. The idea is to have the environment variables set for user/password and to refer to these environment variables in the configuration file. Appreciate any inputs. Thank you.
specVersion: '1.0'
metadata:
name: ui5proj1
type: application
builder:
customTasks:
- name: ui5-task-nwabap-deployer
afterTask: generateVersionInfo
configuration:
resources:
pattern: "**/*.*"
connection:
server: https://host:port
client: 100
useStrictSSL: false
authentication:
user: xxx
password: xxx
See #16, https://openui5.slack.com/archives/C0A7QFN6B/p1590570444152800 and https://github.com/SAP/ui5-builder/issues/204#issuecomment-508032943 .
I would propose adding an option resourcesFromDependencies also with a glob pattern and then not only using workspace.byGlob(sResourcePattern) in https://github.com/pfefferf/ui5-nwabap-deployer/blob/master/packages/ui5-task-nwabap-deployer/lib/ui5-task-nwabap-deployer.js#L63 but also dependencies.byGlob(sResourceFromDependenciesPattern) if this option was provided.
Hey,
I am receiving an error during build:
info builder:builder Building project ProjectName not including dependencies...
info builder:builder π (1/1) Building project ProjectName
ERR! builder:builder Build failed in 3.93 ms
info builder:builder Executing cleanup tasks...
β οΈ Process Failed With Error
Error Message:
taskRepository: Unknown Task ui5-task-nwabap-deployer
Any tips? :)
Hi,
firstly thanks for making that great CI tool!
Since last commit I get the "Connection configuration not (fully) specificed (check server and client)." error.
I'm using the grunt-nwabap-ui5uploader. Maybe I need to add something new to my grunt config?
var config = {
nwabap_ui5uploader: {
options: {
conn: {
server: abapDevelopmentServerHost
},
auth: {
user: abapDevelopmentUser,
pwd: abapDevelopmentPassword
}
},
// It uses a already created Transport and package, for deployment.
upload_build: {
options: {
ui5: {
package: abapPackage,
bspcontainer: abapApplicationName,
bspcontainer_text: abapApplicationDesc,
transportno: abapTransportNumber,
language: "DE",
calc_appindex: true
},
resources: {
cwd: targetDir,
src: "**/*.*"
}
}
}
}
};
Thanks for the help.
Best regards
Marco
Hi,
when having a client specified under connection.client in the yaml file the app is still deployed to the default client.
Hi!
i'm trying to deploy ui5 app with grunt, using nwabap-ui5uploader.
I want to upload app in transport, attached curent user, but i got error in console:
I wanted to know why it might be ...
Could this be because I did not initially create this request, and only then I changed the owner of the request to myself? Although it would be logical for apap-uploader to pick up the request (since it works in sap webide fullstack)
upload only files that have been changed like Eclipse do. is it possible?
Hi,
i have a question: Does the deployser support the deployment of adaptation projects in the layered repository? Or is only the deployment of SAPUI5-Apps in a BSP application possible?
Thanks and Regards
Haunted
Hi,
Running the grunt deploy task does not fail the pipeline because it does not return exit code 1 on failure. To fix this, grunt.fail.fatal should be used.
It would be helpful if this could be added to the grunt deploy task.
Thanks in advance
How do I resolve this issue?
Last update brought the following issues while executing:
info builder:builder Building project Z_CREATE_INC not including dependencies...
info builder:builder π (1/1) Building project Z_CREATE_INC
info builder:builder application Z_CREATE_INC π¨ (1/9) Running task escapeNonAsciiCharacters...
info builder:builder application Z_CREATE_INC π¨ (2/9) Running task replaceCopyright...
info builder:builder application Z_CREATE_INC π¨ (3/9) Running task replaceVersion...
info builder:builder application Z_CREATE_INC π¨ (4/9) Running task generateFlexChangesBundle...
info builder:builder application Z_CREATE_INC π¨ (5/9) Running task generateComponentPreload...
info builder:builder application Z_CREATE_INC π¨ (6/9) Running task createDebugFiles...
info builder:builder application Z_CREATE_INC π¨ (7/9) Running task uglify...
info builder:builder application Z_CREATE_INC π¨ (8/9) Running task generateVersionInfo...
info builder:builder application Z_CREATE_INC π¨ (9/9) Running task ui5-task-nwabap-deployer...
(node:386) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined-task-nwabap-deployer...
at AdtClient.sendRequest (/usr/node/home/node_modules/ui5-nwabap-deployer-core/lib/AdtClient.js:186:103)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:386) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 44)
(node:386) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ui5.yaml excerpt:
builder:
customTasks:
- name: upload0
afterTask: generateVersionInfo
configuration:
resources:
pattern: '**/*'
connection:
server: http://my.box:12345
customQueryParams:
spnego: disabled
client: 99
hitting of the deploy task via ui5 build
then produces an authentication error that upon further investigation shows that in
\ui5-nwabap-deployer-core\lib\AdtClient.js:98
the parameter oRequestOptions.url
doesn't contain the custom query parameters.
Actual: http://my.box:12345/sap/bc/adt/filestore/ui5-bsp/objects/Z_BLA/content
Expected: http://my.box:12345/sap/bc/adt/filestore/ui5-bsp/objects/Z_BLA/content?spnego=disabled
Thanks in advance for taking a look!
request is deprecated since Feb 2020; to be replaced by something else - axios preferred
Dear maintainers of this nice project,
I use it for deploying of my apps into an abap gateway.
I found out, that I have to reset the ICF-Cache after an update of an app. Otherwise the changes are not effective, because the
I do it now by calling /ui2/invalidate_client_caches on the gateway.
Ist it possible, that you toll can call this program optionally after the upload is finished?
Thank you!
JeMo
Dear Florian,
when building the zip before the deploy to ABAP with OData service currently only the files are added to the zip but not the folders:
https://github.com/pfefferf/ui5-nwabap-deployer/blob/master/packages/ui5-nwabap-deployer-core/lib/UI5ABAPRepoClient.js#L82
This causes issues in the deployment as the OData service tries to delete the missing folder but fails as there are still files in it. We just received a customer ticket about that.
Would be great if you could also add the folders to the zip and provide new version of ui5-task-nwabap-deployer.
Many thanks in advance and best regards
Matthias & Silke
When deploying applications, sometimes the request fails with the below error message:
Request body larger than maxBodyLength limit
Fix: Add the below lines to AdtClient.js at line 105.
oAxiosReqOptions.maxBodyLength = Infinity;
oAxiosReqOptions.maxContentLength = Infinity;
Hi Florian,
thanks for implementing this cool custom UI5 task. We use it in a CI/CD scenario and it would be cool if our deployment step would fail in following situations:
At the moment it's only logged to STDERR, but for the build task everything seems fine despite that the app is not successfully uploaded.
Best regards,
Marcel
Hi Team,
I have an requirement where while uploading files via this module I want to skip files which are already there in SAP BSP Application.
For example i already have a file in SAP system webcontent/configuration.js
By using this module how can I skip this file while uploading I tried using negate option while providing src but it's trying to delete the file rather skipping
Hi,
We are developing the ui5 project using yomen generator (easy ui5) and trying to deploy the app using npm run deploy but it did not deploy the app and gives the error "Error: Operation Existing Transport Determination for BSP Container: Expected status code 200, actual status code 403".
After investigation we came to know that issue is at the line no. 80:
fnCallback(new Error(Operation Existing Transport Determination: Expected status code ${fsutil.HTTPSTAT.ok}, actual status code ${oResponse.statusCode}
));
it is not passing the credentials and coming back with mentioned error.
Please help us to resolve the issue.
Regards
Saket A
We have transpile for task and middleware in our ui5 build.
To also have the required babel runtime we use https://github.com/pwasem/ui5-shim-babel-polyfill exactly as described in the README there.
For ui5 serve this works, the two files added to the manifest are served and the app runs.
When using ui5 build --all the files from this babel runtime are in dist/resource, however they are NOT deployed by ui5-task-nwabap-deployer. Thus the deployed app does not find these two files and thus dooes not run.
Hi,
Im getting following error for the first upload of new BSP app:
Object R3TR WAPA ABC_DEF is already locked in request M62K000060 of user DEVELOPER
configuration:
ui5: {
package: "ABC_DEF_UI",
bspcontainer: "ABC_DEF",
bspcontainer_text: "ABC App",
calc_appindex: true,
create_transport: true,
transport_use_locked: true,
transport_text: "ABC UI"
}
Any idea what could be wrong?
Hi,
I have found a strange error when I try to deploy an application for the first time to a system.
This happens on a jenkins server running in AWS cloud. I cannot reproduce it on my local machine. If I hit replay on the jenkins build, it works just fine.
Version 2.1.0
This is the error:
This the full verbose log:
Error Message:
Parse Error: Header overflow
Stack Trace:
Error: Parse Error: Header overflow
at /home/ec2-user/workspace/UI5-Build-and-Deploy/node_modules/ui5-task-nwabap-deployer/lib/ui5-task-nwabap-deployer.js:126:19
at processTicksAndRejections (internal/process/task_queues.js:97:5)
If you think this is an issue of the UI5 Tooling, you might report it using the following URL: https://github.com/SAP/ui5-tooling/issues/new/choose
[Pipeline] echo
Fehler beim Test-Deploy des Tasks: uploadCOS
Best Regards
fjaoos
This rather a question than an issue.
It will be great to have possibility to parameterize target sap client during deployment of the ui5 application. Basically this is done via url prefix ?sap-client= that is usually part of url.
Hi!
first: Great tool / npm-package that you created - I especially like the fast responses here in the issues π
We want to use your "ui5-nwabap-deployer-cli" UI5 Deployer together with our CI/CD Pipeline in AWS.
We are running an AWS deployment agent on the OS of our Gateway development Systems.
When the Pipeline is successful, it triggers the deployment agent . Then, on the OS, this script is running:
Now to the "question":
We have two nearly identical development-systems.
On one of them it works flawless, on the other it doesn't:
Both times, we get the same error after the ui5-deployer deploy
command: "Connection error has occurred; retry attempt x":
We investigated and viewed a lot of logs but can not figure out the difference between both systems or what might be the difference on OS level.
Do you have any tip how we could proceed any further to circumscribe the cause for that and what needs to be changed in our setup?
Many thanks in advance!
Hi,
I tried to deploy a change in one App, for testing purposes, from a jenkins server and from my local machine.
Although all checks are passed and a successfull build and deploy to the system, the ressources on that system remain unchanged, the app acts as before and no transport is created or updated.
We are using a certain user for the deployment though.
This is the ui5.yaml:
No error in st22 and the Transport is not updated either.
Here's the build log:
`PS C:\Git\gkvuipatestd> ui5 build
INFO: Using local @ui5/cli installation
info builder:builder Building project gkvuipatestd not including dependencies...
info builder:builder π (1/1) Building project gkvuipatestd
info builder:builder application gkvuipatestd π¨ (1/9) Running task escapeNonAsciiCharacters...
info builder:builder application gkvuipatestd π¨ (2/9) Running task replaceCopyright...
info builder:builder application gkvuipatestd π¨ (3/9) Running task replaceVersion...
info builder:builder application gkvuipatestd π¨ (4/9) Running task generateFlexChangesBundle...
info builder:builder application gkvuipatestd π¨ (5/9) Running task generateComponentPreload...
info builder:builder application gkvuipatestd π¨ (6/9) Running task createDebugFiles...
info builder:builder application gkvuipatestd π¨ (7/9) Running task uglify...
info builder:builder application gkvuipatestd π¨ (8/9) Running task generateVersionInfo...
info builder:builder application gkvuipatestd π¨ (9/9) Running task upload0...
info builder:customtask:nwabap-deployer file /manifest-bundle.zip: deleted.9/9) Running task upload0...
info builder:customtask:nwabap-deployer file /sap-ui-cachebuster-info.json: deleted.ing task upload0...
info builder:customtask:nwabap-deployer file /resources/gkv/uipa00/gkvuipatestd/di.code-validation.core_issues.json: deleted.
info builder:customtask:nwabap-deployer file /resources/gkv/uipa00/gkvuipatestd/neo-app.json: deleted..
info builder:customtask:nwabap-deployer file /resources/gkv/uipa00/gkvuipatestd/resources.json: deleted.
info builder:customtask:nwabap-deployer folder /resources/gkv/uipa00/gkvuipatestd: deleted.k upload0...
info builder:customtask:nwabap-deployer folder /resources/gkv/uipa00: deleted.) Running task upload0...
info builder:customtask:nwabap-deployer folder /resources/gkv: deleted.π¨ (9/9) Running task upload0...
info builder:customtask:nwabap-deployer file /Component-dbg.js: no change detectednning task upload0...
info builder:customtask:nwabap-deployer file /Component-preload.js: updated./9) Running task upload0...
info builder:customtask:nwabap-deployer file /Component.js: no change detected) Running task upload0...
info builder:customtask:nwabap-deployer file /control/XmlInputTreeItem-dbg.js: no change detectedad0...
info builder:customtask:nwabap-deployer file /control/XmlInputTreeItem.js: no change detectedupload0...
info builder:customtask:nwabap-deployer file /controller/Main-dbg.controller.js: updated.ask upload0...
info builder:customtask:nwabap-deployer file /controller/Main.controller.js: updated.ng task upload0...
info builder:customtask:nwabap-deployer file /css/style.css: no change detected Running task upload0...
info builder:customtask:nwabap-deployer file /i18n/i18n.properties: no change detectedg task upload0...
info builder:customtask:nwabap-deployer file /index.html: no change detected/9) Running task upload0...
info builder:customtask:nwabap-deployer file /localService/YGKV_PAOO_C_SPRO_RDS_ANNO_MDL.xml: no change detected
info builder:customtask:nwabap-deployer file /localService/metadata.xml: no change detectedk upload0...
info builder:customtask:nwabap-deployer file /localService/mockdata/ProcessSet.json: no change detected
info builder:customtask:nwabap-deployer file /localService/mockserver-dbg.js: no change detectedoad0...
info builder:customtask:nwabap-deployer file /localService/mockserver.js: no change detected upload0...
info builder:customtask:nwabap-deployer file /manifest.json: no change detected Running task upload0...
info builder:customtask:nwabap-deployer file /model/models-dbg.js: no change detectedng task upload0...
info builder:customtask:nwabap-deployer file /model/models.js: no change detectedunning task upload0...
info builder:customtask:nwabap-deployer file /model/util/Converter-dbg.js: no change detectedupload0...
info builder:customtask:nwabap-deployer file /model/util/Converter.js: no change detectedask upload0...
info builder:customtask:nwabap-deployer file /model/util/Formatter-dbg.js: no change detectedupload0...
info builder:customtask:nwabap-deployer file /model/util/Formatter.js: no change detectedask upload0...
info builder:customtask:nwabap-deployer file /resources/sap-ui-version.json: updated.ng task upload0...
info builder:customtask:nwabap-deployer file /test/integration/navigationJourney-dbg.js: no change detected
info builder:customtask:nwabap-deployer file /test/integration/navigationJourney.js: no change detected
info builder:customtask:nwabap-deployer file /test/integration/opaTests.qunit.html: no change detected.
info builder:customtask:nwabap-deployer file /test/integration/pages/Main-dbg.js: no change detected...
info builder:customtask:nwabap-deployer file /test/integration/pages/Main.js: no change detectedoad0...
info builder:customtask:nwabap-deployer file /test/mockserver.html: no change detectedg task upload0...
info builder:customtask:nwabap-deployer file /test/unit/model/models-dbg.js: no change detectedload0...
info builder:customtask:nwabap-deployer file /test/unit/model/models.js: no change detectedk upload0...
info builder:customtask:nwabap-deployer file /test/unit/model/util/Converter-dbg.js: no change detected
info builder:customtask:nwabap-deployer file /test/unit/model/util/Converter.js: no change detected0...
info builder:customtask:nwabap-deployer file /test/unit/model/util/Formatter-dbg.js: no change detected
info builder:customtask:nwabap-deployer file /test/unit/model/util/Formatter.js: no change detected0...
info builder:customtask:nwabap-deployer file /test/unit/types/XmlType-dbg.js: no change detectedoad0...
info builder:customtask:nwabap-deployer file /test/unit/types/XmlType.js: no change detected upload0...
info builder:customtask:nwabap-deployer file /test/unit/unitTest.qunit.html: no change detectedload0...
info builder:customtask:nwabap-deployer file /types/XmlType-dbg.js: no change detectedg task upload0...
info builder:customtask:nwabap-deployer file /types/XmlType.js: no change detectednning task upload0...
info builder:customtask:nwabap-deployer file /view/ATDATable.fragment.xml: no change detectedupload0...
info builder:customtask:nwabap-deployer file /view/Add.fragment.xml: no change detected task upload0...
info builder:customtask:nwabap-deployer file /view/Main.view.xml: updated.(9/9) Running task upload0...
info builder:builder Build succeeded in 21 s
info builder:builder Executing cleanup tasks...`
Hi,
I am very sorry to bother you again but I expected the plugin to report an error, if the resources of the application have not been locked on a transport already while create_transport = false and transport_use_user_match= false.
In my use case, the developer has to specify a certain transport from the system and the transports cannot be created by the plugin.
I think this might be because of "&& oOptionsAdapted.conn.testMode !== true". If this code would be added to the following if and elseif, my case would be working.
Thanks in advance
fjaoos
As described in SAP/ui5-tooling#781 (comment),
for compatibility with UI5 Tooling 3.0, the custom task need to be adjusted:
implement the recommended callback to signal this to UI5 Tooling as outlined here. Alternatively, the task could also switch to specifying specVersion: 3.0
Without these adjustments, the UI5 Tooling v3 would build all the projects dependencies even if the custom task doesn't require access to them (What may take a lot of time).
Advantages
dist
folder has to be created as payloadHi Florian,
I was updating grunt-nwabap-ui5uploader from a rather old version (0.2.10).
With version 1.0.6 I get the following error:
"The requested URL could not be retrieved"
"https://..../sap/bc/adt/filestore/ui5-bsp/objects/ZRM_UI5_SAMPLE/content?"
The last version that is working for me is 1.0.3.
It seems to be the AdtClient change.
Best regards,
RamΓ³n
In the new version of ui5-nwabap-deployer-core that uses axios, I can't deploy to a Gateway that has an invalid SSL certificate, even If I have the option useStrictSSL set to false. To deploy, now, I am using an old version of grunt-nwabap-ui5uploader.
I think that this can't be solved in a clean way because it's a bug of axios. axios/axios#535
Maybe axios can be replaced but I think that is not easy.
If I put process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; in the code, it works. But I think that this is not the best way to go.
I have debugged the code and found that the following line line 130 AdtClient.js is not enough for invalid SSL certificates.
Hi,
I have a BSP application locked on a open transport. When I specify createTransport:true and transportUseLocked:true what happens is that the application is deployed correctly on the existing transport however an empty new transport request is created each time. Is this the intended functionality? I hoped the new transport would only be created if a transport was not found with the BSP package. As I use this as part of a CI build pipeline, I'm ending up with a lot of empty transports being created.
Thanks
Sivajan
There are several fixed/pre-defined environment variables that can be used if the value is not specified in YAML file.
I would suggest to also have a "special" value inside the YAML file, that points to a defined Environment Variable.
This special value should be the same, like it is used in @sap/ux-ui5-tooling: "env:MY_OWN_VAR".
I may create a PR if you accept this feature request.
Hi!
I think i found a bug in:
I think this line:
rejectUnauthorized: that._oOptions.useStrictSSL
should look like this:
rejectUnauthorized: that._oOptions.conn.useStrictSSL
Or this is intentional? I am facing problems with SSL certificates in secure connections...
Thanks!
In older versions there was an error stating something like this when trying to deploy under a transport that is already released:
"Request XYZ is already released."
It looks like the latest commit in the 1.x.x branch resolves this issue, but this is not yet available in the 1.0.7 branch on NPM:
https://www.npmjs.com/package/grunt-nwabap-ui5uploader?activeTab=versions
Unfortunately, our corporate firewall doesn't allow us to install directly from Github. Is it possible that the 1.x version on the NPM repository needs an update?
Thanks a ton!
Hi Florian,
I wanted do define path from where the source files would be collected and couldn't find it in the documentation(readme file). Then I saw path parameter under resource section in comments of the SCP blog.
Parameter "path" I saw on this image.
[ui5.yaml]
`builder:
customTasks:
My suggestion would be to add it to the readme file of this project.
Regards, Dalibor
Given that I pass in a custom GET
parameter as the server
config option,
https://example.org/?spnego=disabled
,
the GET
parameter is treated as part of the host url, not as url parameter:
https://example.org/?spnego=disabled/sap/bc/adt/cts/transports
Valid (upload) scenarios for this are to bypass SAML2 and SPNEGO authentication (?saml2=disabled ?spnego=disabled
)
I will provide a fix for this as a PR - just keeping track of the issue here π
"devDependencies": { "ui5-task-nwabap-deployer": "*" }, "ui5": { "dependencies": [ "ui5-task-nwabap-deployer" ] }
If I remove this part from package.json and run npm install, after that ui5 serve works.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.