2024 Dec 09 1:58 PM - edited 2024 Dec 09 2:00 PM
Hi Experts,
I'm trying to deploy a Fiori Application with an additional Header Parameter during deployment. We will enhance ABAP_REPOSITORY later to fit our requirement.
My ask is, is it possible to pass headers in the ui5-deploy.yml file? Like below. Currently when I pass something like below I don't see this header value in ABAP_REPOSITORY_SRV.
builder:
customTasks:
- name: deploy-to-abap
afterTask: generateCachebusterInfo
configuration:
ignoreCertError: true
target:
url: https://s4-system.example.com/sap/opu/odata/sap/YOUR_SERVICE_SRV
client: "100"
headers:
X-Custom-Header: "value-here"
app:
name: ZUI_SAMPLE_01
package: ZPACKAGE
transport: T100000
Request clarification before answering.
Hi.
For deployment purposes, appending additional headers is not supported.
If I've read the comments correctly, here are some improvements you can make; Please refer to the following guide for more info;
https://www.npmjs.com/package/@sap/ux-ui5-tooling
Create a .env file in the root of your SAPUI5 project and append the following content;
XYZ_USER=myusername
XYZ_PASSWORD=mypassword
Next, update your ui5-deploy.yaml as follows where you are appending the credentials node;
configuration:
yes: true
failfast: true
target:
url: https://XYZ.sap-system.corp:44311
client: 200
credentials:
username: env:XYZ_USER
password: env:XYZ_PASSWORD
Now, when you run npm run deploy it will pickup the env variables configured with your credentials.
Additionally, if you are using a CI/CD pipeline, you can update the ui5-deploy.yaml to bypass the Yes confirmation prompt and fail immediately if any of the requests fails. A typical scenario is where authentication might fail and you want to disable the credentials prompts from being shown again.
If you want to create TR on the fly during each deployment task, then append the REPLACE_WITH_TRANSPORT bookmark to your app configuration in ui5-deploy.yaml;
app:
name: /TEST/SAMPLE_APP
package: /TEST/UPLOAD
transport: REPLACE_WITH_TRANSPORT
FYI, using the TR REPLACE_WITH_TRANSPORT for undeployment works as well, for example, when you run npm run undeploy.
To go a step further, you can also generate CLI commands for your CI/CD pipeline;
Sample CLI flow;
npx fiori deploy --url https://your-env.hana.ondemand.com --name 'SAMPLE_APP' --package 'MY_PACKAGE' --transport 'REPLACE_WITH_TRANSPORT' --archive-path 'archive.zip' --username 'env:XYZ_USER' --pasword 'my-client-secret' --noConfig --failfast --yes
You can manipulate these CLI params to suit your needs.
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
42 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.