Expand my Community achievements bar.

SOLVED

Folder "/apps" been overwritten during deploy

Avatar

Level 2

We are facing a problem related to deploy, when we start the deploy of a project, any other project that is already on the environment loses the content of the created pages, basically goes away.

 

Since our company's repository does not have external access, we can not use the git submodules to deploy multiple projects. So we create a structure with a parent folder (with the pom.xml and dispatcher folder) that receive one of our projects, and then we do a push to adobe in branch set to start our pipeline.

sirbrunocabral_0-1686058325895.png

In our main POM.XML we change the deployed project and push to adobe repository.

sirbrunocabral_1-1686058387337.png

This does not happen in the local environment. We tried to change the "filter.xml" file using "mode=update" but without success.

Checking CRXDE Lite we saw that "/apps" folder was completely replaced

sirbrunocabral_2-1686058576499.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@aanchal-sikka  already shared the link how to correctly setup your git repo for such cases. See https://www.initialyze.com/insights/handle-multiple-projects-with-cloud-manager

 

Create this structure in your "stage-deployment" branch, and then each team can branch off from there and create their own working branch. When they are done, they merge back to the "stage-deployment" branch, which is then deployed to the Stage and PROD environments.

View solution in original post

13 Replies

Avatar

Community Advisor

Hello @sirbrunocabral 

 

I am hoping this is an AEM as a Cloud Service instance. In cloud, when images are created during deployment, only mutable content is retained, like /content /conf etc.

 

No custom code would be retained from previous /apps. Only the folders from the current branch would be available under /apps.

 

You would have to merge /apps code from all the projects/modules into one branch for deployment.


Aanchal Sikka

Avatar

Level 2

Hello @aanchal-sikka.

 

It is AEM as a Cloud Service instance.

So when I have to deploy to cloud, I need to include in build all project that's already on environment?

 

How does it work properly with multiple project?

Avatar

Level 2

Thanks for the answer @aanchal-sikka

 

In this doc I saw that we have to put two projects in a pom.xml and build both simultaneously. Is there a way where we build only the project that has changed?

Avatar

Community Advisor

@sirbrunocabral : As per my knowledge, we need to build all the projects.

Its not possible to build selectively on AEM as a Cloud Service


Aanchal Sikka

Avatar

Employee Advisor

That can be achieved quite easily, if you follow this approach:

  • configure your PROD pipeline to deploy from a "stage-deployment" branch.
  • Project A and Project B work on distinct branches.
  • Whenever they want to bring something into Production, they merge it into the "stage-deployment" branch.

 

 

 

Avatar

Level 2

Hello @Jörg_Hoh,

 

How this "stage-deployment" branch should be structured? Did I need to overwrite everything on it with the project that need to be deployed?

 

Thanks in advance!

Avatar

Correct answer by
Employee Advisor

@aanchal-sikka  already shared the link how to correctly setup your git repo for such cases. See https://www.initialyze.com/insights/handle-multiple-projects-with-cloud-manager

 

Create this structure in your "stage-deployment" branch, and then each team can branch off from there and create their own working branch. When they are done, they merge back to the "stage-deployment" branch, which is then deployed to the Stage and PROD environments.

Avatar

Level 2

Thanks for the answer!

 

So we will have to build all projects every time we push changes into one of them, right?

Avatar

Employee Advisor

Yes; in AEM CS there is no "incremental deployment" possible with the FullStack Pipeline.

Avatar

Level 2

Thanks for the help!


One last question: is there any kind of unavailability during this deploy?

Avatar

Level 4

it would be helpful if you share the filter.xml of ui.apps and pom.xml of the ui.conf

Avatar

Level 2

Sure,

/ui.apps/src/main/content/META-INF/vault/filter.xml

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter mode="update" root="/apps/webapp--adobe-experience-ds/clientlibs" />
    <filter mode="update" root="/apps/webapp--adobe-experience-ds/components" />
    <filter mode="update" root="/apps/webapp--adobe-experience-ds/i18n" />
</workspaceFilter>

/ui.config/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
 |  Copyright 2015 Adobe Systems Incorporated
 |
 |  Licensed under the Apache License, Version 2.0 (the "License");
 |  you may not use this file except in compliance with the License.
 |  You may obtain a copy of the License at
 |
 |      http://www.apache.org/licenses/LICENSE-2.0
 |
 |  Unless required by applicable law or agreed to in writing, software
 |  distributed under the License is distributed on an "AS IS" BASIS,
 |  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 |  See the License for the specific language governing permissions and
 |  limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!-- ====================================================================== -->
    <!-- P A R E N T  P R O J E C T  D E S C R I P T I O N                      -->
    <!-- ====================================================================== -->
    <parent>
        <groupId>com.webapp.adobe.experience.ds</groupId>
        <artifactId>webapp--adobe-experience-ds</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <!-- ====================================================================== -->
    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
    <!-- ====================================================================== -->
    <artifactId>webapp--adobe-experience-ds.ui.config</artifactId>
    <packaging>content-package</packaging>
    <name>Design System - Componentes PAN - UI config</name>
    <description>UI config package for Design System - Componentes PAN</description>

    <!-- ====================================================================== -->
    <!-- B U I L D   D E F I N I T I O N                                        -->
    <!-- ====================================================================== -->
    <build>
        <sourceDirectory>src/main/content/jcr_root</sourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.apache.jackrabbit</groupId>
                <artifactId>filevault-package-maven-plugin</artifactId>
                <configuration>
                    <properties>
                        <cloudManagerTarget>none</cloudManagerTarget>
                    </properties>
                    <packageType>container</packageType>
                    <showImportPackageReport>false</showImportPackageReport>
                    <repositoryStructurePackages>
                        <repositoryStructurePackage>
                            <groupId>com.webapp.adobe.experience.ds</groupId>
                            <artifactId>webapp--adobe-experience-ds.ui.apps.structure</artifactId>
                        </repositoryStructurePackage>
                    </repositoryStructurePackages>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.webapp.adobe.experience.ds</groupId>
            <artifactId>webapp--adobe-experience-ds.ui.apps.structure</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
    </dependencies>
</project>