Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Ignore warning while importing package through script mode

Avatar

Level 2

Hi,

we have a requirement to ignore warning for one of the package type to import it.

Can some one help what should be added or command for doing that.

package -instance:stage -import:/sftp/incoming/from_campaign/test/<%= instance.vars.packageName %> -verbose

when importing manually it fails if you do not select ignore warning because the package has some reference to internal value not present in next environment.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

In the <package/> node at the top of your xml add ignoreWarnings="true"; maybe something like `perl -pi -e 's/<package/<package ignoreWarnings="true"/' file` ahead of the import call.

Obligatory note of caution:

It looks like you're automating import of campaigns uploaded to an sftp. Just know that there is a ton of danger in this, ranging from innocuous user error to not-so-innocuous trivial root exploitation of the app. If you're sure of this approach, consider at least adding a check to constrain import to nms:operation schema.

Thanks,

-Jon

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

In the <package/> node at the top of your xml add ignoreWarnings="true"; maybe something like `perl -pi -e 's/<package/<package ignoreWarnings="true"/' file` ahead of the import call.

Obligatory note of caution:

It looks like you're automating import of campaigns uploaded to an sftp. Just know that there is a ton of danger in this, ranging from innocuous user error to not-so-innocuous trivial root exploitation of the app. If you're sure of this approach, consider at least adding a check to constrain import to nms:operation schema.

Thanks,

-Jon

Avatar

Level 1

Hi : I tried with ignoreWarning = "true" but it doesn't work. Do you know the correct format how it can be given in the below schema xml file which we import

 

<package author="test" buildDate="2019-07-09 08:36:27.500Z"
buildNumber="8850" buildVersion="6.7" img="xtk:installedPackage.png" label="Shared schema"
name="sharedSchemas" namespace="test" vendor="">