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

Publish-Site command needed or Publish-Item needs tuning for publishing #620

Closed
michaellwest opened this Issue Apr 11, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@michaellwest
Member

michaellwest commented Apr 11, 2016

The combinations required to publish a site or an item just has too many combinations. I think we need one command for site and one for item.

Publish-Site Smart -AsJob

Publish-Item -Recurse -Related -AsJob

@AdamNaj

This comment has been minimized.

Member

AdamNaj commented Apr 11, 2016

I might not be understanding the concept of "Publish Site", but isn't it just publication of the whole Sitecore tree? If that is the case I do not see much point as it can be achieved simply by:

Publish-Item -Path master:\ -Recurse 

Other than it always working on root and being recursive by default wouldn't it share 99% of the code (which is already pretty complex) with Publish-Item?

@michaellwest michaellwest changed the title from Publish-Site command needed for publishing to Publish-Item command needs tuning for publishing Apr 13, 2016

@michaellwest michaellwest changed the title from Publish-Item command needs tuning for publishing to Publish-Site command needed or Publish-Item needs tuning for publishing Apr 13, 2016

@michaellwest

This comment has been minimized.

Member

michaellwest commented Apr 13, 2016

Can't make up my mind for the title. Trying to produce some better examples for publishing.

@michaellwest

This comment has been minimized.

Member

michaellwest commented Apr 13, 2016

// Publish Site - Smart
Publish-Item -Path "master:\" -PublishMode Smart

Item = null
Mode = Full
Deep = true
Compare = true

// Publish Site - Republish
Publish-Item -Path "master:\" -PublishMode Full -RepublishAll
Publish-Item -Path "master:\" -PublishMode SingleItem -Recurse -PublishRelatedItems

Item = null
Mode = Full
Deep = true
Compare = false
RebuildAll = true (for RebuildDatabase)

// Publish Site - Incremental
Publish-Item -Path "master:\" -PublishMode Incremental

Item = null
Mode = Incremental
Deep = false
Compare = false

// Publish Item
Publish-Item -Path "master:\content\home" -PublishMode SingleItem
Publish-Item -Path "master:\content\home" -PublishMode Full -Recurse -PublishRelatedItems

Item = "master:\content\home"
Mode = Full
Deep = true
Compare = true

@michaellwest

This comment has been minimized.

Member

michaellwest commented Apr 15, 2016

Updated so now only these options are used through remoting:

# Republish Site
$jobId = Invoke-RemoteScript -Session $session -ScriptBlock {
        (Publish-Item -Path "master:\" -PublishMode Full -Recurse -RepublishAll -AsJob).Handle.ToString()
}
Wait-RemoteSitecoreJob -Session $session -Id $jobId -Delay 2 -Verbose

# Smart Publish Site
$jobId = Invoke-RemoteScript -Session $session -ScriptBlock {
        (Publish-Item -Path "master:\" -PublishMode Smart -Recurse -AsJob).Handle.ToString()
}
Wait-RemoteSitecoreJob -Session $session -Id $jobId -Delay 2 -Verbose

# Smart Publish item with children and related items
$jobId = Invoke-RemoteScript -Session $session -ScriptBlock {
        (Publish-Item -Path "master:\content\home" -PublishMode SingleItem -Recurse -PublishRelatedItems -AsJob).Handle.ToString()
}
Wait-RemoteSitecoreJob -Session $session -Id $jobId -Delay 2 -Verbose

# Incremental Publish Site
$jobId = Invoke-RemoteScript -Session $session -ScriptBlock {
        (Publish-Item -Path "master:\" -PublishMode Incremental -FromDate "03/17/2016" -AsJob).Handle.ToString()
}
Wait-RemoteSitecoreJob -Session $session -Id $jobId -Delay 2 -Verbose
@AdamNaj

This comment has been minimized.

Member

AdamNaj commented May 18, 2016

Do you think this is now working as you expected? Feel free to close the issue if so.

@michaellwest

This comment has been minimized.

Member

michaellwest commented May 30, 2016

Yes. Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment