Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Adp writer deploy scripts #2362

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
db47981
fix: update deploy scripts
GDamyanov Sep 12, 2024
10ea50a
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 12, 2024
9bfc39c
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 12, 2024
b86b711
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 13, 2024
327a1ac
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 16, 2024
3fe6c68
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 18, 2024
66d4ec7
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
longieirl Sep 25, 2024
a3c9caa
feat: configure ui5.yaml with the latest builder config
GDamyanov Sep 27, 2024
633a480
chore: add changeset
GDamyanov Sep 27, 2024
edc0c85
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 30, 2024
f4aa2ec
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Sep 30, 2024
2c7b570
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 3, 2024
9c1c8dc
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 7, 2024
74ad9fe
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 9, 2024
7d80f41
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 14, 2024
927cb2d
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 15, 2024
e799bb8
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 16, 2024
3e3107e
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 29, 2024
c5254a5
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 30, 2024
28da205
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Oct 31, 2024
2b1a2b6
Merge branch 'main' into fix/2361/cloud-adp-project-deployment
GDamyanov Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dull-moons-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sap-ux/adp-tooling': patch
---

Update deploy scripts and ui5.yaml with latest ui5 builder configurations
18 changes: 18 additions & 0 deletions packages/adp-tooling/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,24 @@ export interface CustomConfig {
support: ToolsSupport;
};
}
export interface CloudTarget {
url: string | undefined;
authenticationType: string | undefined;
ignoreCertErrors: boolean;
}

export interface OnPremTarget {
destination?: string;
}

export type CloudCustomTaskConfigTarget = OnPremTarget | CloudTarget;

export interface CloudCustomTaskConfig {
type: string;
appName: string | undefined;
languages: Language[];
target: CloudCustomTaskConfigTarget;
}

export interface InboundChangeContentAddInboundId {
inbound: {
Expand Down
38 changes: 25 additions & 13 deletions packages/adp-tooling/src/writer/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import type {
Content,
CloudApp,
ChangeInboundNavigation,
InternalInboundNavigation
InternalInboundNavigation,
CloudCustomTaskConfig,
CloudCustomTaskConfigTarget
} from '../types';

/**
* Generate the configuration for the middlewares required for the ui5.yaml.
*
Expand Down Expand Up @@ -178,21 +179,32 @@ function addOpenSourceMiddlewares(ui5Config: UI5Config, config: AdpWriterConfig)
* @returns list of required tasks.
*/
function getAdpCloudCustomTasks(config: AdpWriterConfig & { target: AbapTarget } & { app: CloudApp }): CustomTask[] {
let target: CloudCustomTaskConfigTarget;
if (config.target.destination) {
target = { destination: config.target.destination };
} else {
target = {
url: config.target.url,
authenticationType: config.target.authenticationType,
ignoreCertErrors: false
};
}
const configuration: CloudCustomTaskConfig = {
type: 'abap',
appName: config?.app?.bspName,
languages: config?.app?.languages?.map((language: Language) => {
return {
sap: language.sap,
i18n: language.i18n
};
}),
target
};
return [
{
name: 'app-variant-bundler-build',
beforeTask: 'escapeNonAsciiCharacters',
configuration: {
type: 'abap',
destination: config.target?.destination,
appName: config?.app?.bspName,
languages: config?.app?.languages?.map((language: Language) => {
return {
sap: language.sap,
i18n: language.i18n
};
})
}
configuration
}
];
}
Expand Down
7 changes: 4 additions & 3 deletions packages/adp-tooling/templates/project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
"@sap-ux/ui5-proxy-middleware": "^1.3.0",
"@sap-ux/deploy-tooling": "^0.11.7"<%}%>,
"@ui5/task-adaptation": "^1.3.0",
"@ui5/cli": "^3.9.2"
"@ui5/cli": "^3.9.2"<%if (locals.deploy) {%>,
"rimraf": "^5.0.5"<%}%>
},
"scripts": {
"build": "ui5 build --exclude-task generateFlexChangesBundle generateComponentPreload minify --clean-dest",
"start": "<%= locals.options?.fioriTools ? 'fiori run' : 'ui5 serve' %> --open /test/flp.html#app-preview",
"start-editor": "<%= locals.options?.fioriTools ? 'fiori run' : 'ui5 serve' %> --open /test/adaptation-editor.html"<%if (locals.deploy) {%>,
"deploy": "ui5 build --config ui5-deploy.yaml --exclude-task <%= locals.options?.fioriTools ? 'deploy-to-abap' : 'abap-deploy-task' %> generateFlexChangesBundle generateComponentPreload --clean-dest && <%= locals.options?.fioriTools ? 'fiori deploy' : 'deploy' %> --config ui5-deploy.yaml",
"undeploy": "<%= locals.options?.fioriTools ? 'fiori undeploy' : 'undeploy' %> --config ui5-deploy.yaml --lrep \"apps/<%= app.reference %>/appVariants/<%= app.id %>/\"",
"deploy": "npm run build && <%= locals.options?.fioriTools ? 'fiori deploy' : 'deploy' %> --config ui5-deploy.yaml && rimraf archive.zip",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite a change. Before your change, the the build configuration from the ui5-deploy.yaml was used for building the sources, now it is using the ui5.yaml. Are you sure about that?

So, maybe something like npm run build -- --config ui5-deploy.yaml && <%= locals.options?.fioriTools ? 'fiori deploy' : 'deploy' %> --config ui5-deploy.yaml && rimraf archive.zip is the better option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well we don't need ui5-deploy.yaml for build, we need it only for deployment.

"undeploy": "npm run build && <%= locals.options?.fioriTools ? 'fiori undeploy' : 'undeploy' %> --config ui5-deploy.yaml",
"deploy-test": "npm run build && fiori deploy --config ui5-deploy.yaml --testMode true"<%}%>
}
}
Loading
Loading