It's all about the answers!

Ask a question

Question related to delivering snapshot to a stream


neeraj karandikar (46152) | asked Sep 13 '10, 3:57 p.m.
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the deliveries to the stream that were done after build process accepted all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same workspace state using the snapshot ID I delivered after successful build.

Please note that we are running periodic builds and it is not worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj

7 answers



permanent link
Shashikant Padur (4.2k27) | answered Sep 14 '10, 10:43 a.m.
JAZZ DEVELOPER
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the deliveries to the stream that were done after build process accepted all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same workspace state using the snapshot ID I delivered after successful build.

Please note that we are running periodic builds and it is not worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj


1. Did you mean associate a snapshot that you created with a stream? You can do that by promoting the snapshot to the stream. Take a look at 'scm snapshot promote' command. Promoting a snapshot does not deliver anything to the stream, it just associates the snapshot to the stream.

2. To run another build, instead of creating a new workspace you could reuse the existing build workspace and accept the latest changes from the stream. If you are looking at recreating a workspace from the snapshot, take a look at 'scm create workspace --snapshot <snapshot>'

permanent link
neeraj karandikar (46152) | answered Sep 17 '10, 1:59 p.m.
Thanks Shashikant. But I am not sure if I understand what snapshot promote really does. I tried to go through the documentation but it wasn't clear.

Does promote mean that all the files in the stream will have the snapshot created on them at the file version which was present in the build workspace?

What happens to the checkins done after creating the Build workspace and before we promote the snapshot to the Stream?

Another problem that I am facing is, When I create a snapshot (name: snapshot3) on the workspace, it is created on only those components which do not already have a previsous snapshot created (say snapshot2 or shapshot1). Do I need to create baselines on each components individually?

Thanks again.
Neeraj


Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the deliveries to the stream that were done after build process accepted all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same workspace state using the snapshot ID I delivered after successful build.

Please note that we are running periodic builds and it is not worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj


1. Did you mean associate a snapshot that you created with a stream? You can do that by promoting the snapshot to the stream. Take a look at 'scm snapshot promote' command. Promoting a snapshot does not deliver anything to the stream, it just associates the snapshot to the stream.

2. To run another build, instead of creating a new workspace you could reuse the existing build workspace and accept the latest changes from the stream. If you are looking at recreating a workspace from the snapshot, take a look at 'scm create workspace --snapshot <snapshot>'

permanent link
Geoffrey Clemm (30.1k33035) | answered Sep 18 '10, 1:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Yes, snapshot "promote" is somewhat confusing.
All it does is "associate" that snapshot with some stream/workspace ...
it doesn't actually change the configuration of that stream/workspace
(so the "confusing" part is that a snapshot can be associated with a
stream/workspace even if the stream/workspace never had the
configuration of that snapshot).

WRT baselines and snapshots, when you create a snapshot on a
stream/workspace, if there is already a baseline that captures the
current configuration of a component in that stream/workspace, it just
adds that existing baseline to the snapshot ... otherwise, it will
create a new baseline for that component in that stream/workspace, and
add that new baseline to the snapshot.

Cheers,
Geoff



On 9/17/2010 2:07 PM, neerajkarandikar wrote:
Thanks Shashikant. But I am not sure if I understand what snapshot
promote really does. I tried to go through the documentation but it
wasn't clear.

Does promote mean that all the files in the stream will have the
snapshot created on them at the file version which was present in the
build workspace?

What happens to the checkins done after creating the Build workspace
and before we promote the snapshot to the Stream?

Another problem that I am facing is, When I create a snapshot (name:
snapshot3) on the workspace, it is created on only those components
which do not already have a previsous snapshot created (say snapshot2
or shapshot1). Do I need to create baselines on each components
individually?

Thanks again.
Neeraj


spadurwrote:
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending
changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the
deliveries to the stream that were done after build process accepted
all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same
workspace state using the snapshot ID I delivered after successful
build.

Please note that we are running periodic builds and it is not
worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj

1. Did you mean associate a snapshot that you created with a stream?
You can do that by promoting the snapshot to the stream. Take a look
at 'scm snapshot promote' command. Promoting a snapshot does not
deliver anything to the stream, it just associates the snapshot to
the stream.

2. To run another build, instead of creating a new workspace you could
reuse the existing build workspace and accept the latest changes from
the stream. If you are looking at recreating a workspace from the
snapshot, take a look at 'scm create workspace --snapshot
snapshot>'


permanent link
neeraj karandikar (46152) | answered Sep 21 '10, 1:35 a.m.
Thanks Geoff,

I am still not sure how to achieve the following. Kindly advise -

1. After every successfull build of a repository workspace how to tag all components in a associated Stream S1 with a unique snapshot name E.g SS1 after build B1, SS2 after build B2.

2. At some later date, retreive same versions of all compoents(and all files in it) from the Stream S1 using the Snapshot id SS1 or SS2.

Regards,
-Neeraj


Yes, snapshot "promote" is somewhat confusing.
All it does is "associate" that snapshot with some stream/workspace ...
it doesn't actually change the configuration of that stream/workspace
(so the "confusing" part is that a snapshot can be associated with a
stream/workspace even if the stream/workspace never had the
configuration of that snapshot).

WRT baselines and snapshots, when you create a snapshot on a
stream/workspace, if there is already a baseline that captures the
current configuration of a component in that stream/workspace, it just
adds that existing baseline to the snapshot ... otherwise, it will
create a new baseline for that component in that stream/workspace, and
add that new baseline to the snapshot.

Cheers,
Geoff



On 9/17/2010 2:07 PM, neerajkarandikar wrote:
Thanks Shashikant. But I am not sure if I understand what snapshot
promote really does. I tried to go through the documentation but it
wasn't clear.

Does promote mean that all the files in the stream will have the
snapshot created on them at the file version which was present in the
build workspace?

What happens to the checkins done after creating the Build workspace
and before we promote the snapshot to the Stream?

Another problem that I am facing is, When I create a snapshot (name:
snapshot3) on the workspace, it is created on only those components
which do not already have a previsous snapshot created (say snapshot2
or shapshot1). Do I need to create baselines on each components
individually?

Thanks again.
Neeraj


spadurwrote:
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending
changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the
deliveries to the stream that were done after build process accepted
all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same
workspace state using the snapshot ID I delivered after successful
build.

Please note that we are running periodic builds and it is not
worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj

1. Did you mean associate a snapshot that you created with a stream?
You can do that by promoting the snapshot to the stream. Take a look
at 'scm snapshot promote' command. Promoting a snapshot does not
deliver anything to the stream, it just associates the snapshot to
the stream.

2. To run another build, instead of creating a new workspace you could
reuse the existing build workspace and accept the latest changes from
the stream. If you are looking at recreating a workspace from the
snapshot, take a look at 'scm create workspace --snapshot
snapshot>'


permanent link
neeraj karandikar (46152) | answered Sep 21 '10, 6:24 p.m.
I have figured out item 2 from last post.

To clarify item 1 -
I am able to create baselines on all components in my workspace using "scm create baseline --all" option.

I am not sure how to deliver this baseline to the stream, using SCM CLI.

Thanks,
Neeraj

Thanks Geoff,

I am still not sure how to achieve the following. Kindly advise -

1. After every successfull build of a repository workspace how to tag all components in a associated Stream S1 with a unique snapshot name E.g SS1 after build B1, SS2 after build B2.

2. At some later date, retreive same versions of all compoents(and all files in it) from the Stream S1 using the Snapshot id SS1 or SS2.

Regards,
-Neeraj


Yes, snapshot "promote" is somewhat confusing.
All it does is "associate" that snapshot with some stream/workspace ...
it doesn't actually change the configuration of that stream/workspace
(so the "confusing" part is that a snapshot can be associated with a
stream/workspace even if the stream/workspace never had the
configuration of that snapshot).

WRT baselines and snapshots, when you create a snapshot on a
stream/workspace, if there is already a baseline that captures the
current configuration of a component in that stream/workspace, it just
adds that existing baseline to the snapshot ... otherwise, it will
create a new baseline for that component in that stream/workspace, and
add that new baseline to the snapshot.

Cheers,
Geoff



On 9/17/2010 2:07 PM, neerajkarandikar wrote:
Thanks Shashikant. But I am not sure if I understand what snapshot
promote really does. I tried to go through the documentation but it
wasn't clear.

Does promote mean that all the files in the stream will have the
snapshot created on them at the file version which was present in the
build workspace?

What happens to the checkins done after creating the Build workspace
and before we promote the snapshot to the Stream?

Another problem that I am facing is, When I create a snapshot (name:
snapshot3) on the workspace, it is created on only those components
which do not already have a previsous snapshot created (say snapshot2
or shapshot1). Do I need to create baselines on each components
individually?

Thanks again.
Neeraj


spadurwrote:
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending
changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the
deliveries to the stream that were done after build process accepted
all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same
workspace state using the snapshot ID I delivered after successful
build.

Please note that we are running periodic builds and it is not
worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj

1. Did you mean associate a snapshot that you created with a stream?
You can do that by promoting the snapshot to the stream. Take a look
at 'scm snapshot promote' command. Promoting a snapshot does not
deliver anything to the stream, it just associates the snapshot to
the stream.

2. To run another build, instead of creating a new workspace you could
reuse the existing build workspace and accept the latest changes from
the stream. If you are looking at recreating a workspace from the
snapshot, take a look at 'scm create workspace --snapshot
snapshot>'


permanent link
Geoffrey Clemm (30.1k33035) | answered Sep 23 '10, 11:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I'll take a stab at this, but someone who is proficient with the command
line should elaborate/correct what I say below.

If you want to "deliver" this baseline to the stream, i.e. merge it into
whatever is currently in that stream, then you could create a new
workspace from that snapshot with:
scm create workspace --snapshot <the> <the>
and then deliver that workspace to the stream:
scm deliver ...

But I don't see a way to then use the command line to delete the
workspace, so it appears that you'd have to periodically clean up with
the GUI.

Anyone else have better ideas?

Cheers,
Geoff

On 9/21/2010 6:37 PM, neerajkarandikar wrote:
I have figured out item 2 from last post.

To clarify item 1 -
I am able to create baselines on all components in my workspace using
"scm create baseline --all" option.

I am not sure how to deliver this baseline to the stream, using SCM
CLI.

Thanks,
Neeraj

neerajkarandikarwrote:
Thanks Geoff,

I am still not sure how to achieve the following. Kindly advise -

1. After every successfull build of a repository workspace how to
tag all components in a associated Stream S1 with a unique snapshot
name E.g SS1 after build B1, SS2 after build B2.

2. At some later date, retreive same versions of all compoents(and
all files in it) from the Stream S1 using the Snapshot id SS1 or
SS2.

Regards,
-Neeraj


gmclemmwrote:
Yes, snapshot "promote" is somewhat confusing.
All it does is "associate" that snapshot with some
stream/workspace ...
it doesn't actually change the configuration of that
stream/workspace
(so the "confusing" part is that a snapshot can be
associated with a
stream/workspace even if the stream/workspace never had the
configuration of that snapshot).

WRT baselines and snapshots, when you create a snapshot on a
stream/workspace, if there is already a baseline that captures the
current configuration of a component in that stream/workspace, it
just
adds that existing baseline to the snapshot ... otherwise, it will
create a new baseline for that component in that stream/workspace,
and
add that new baseline to the snapshot.

Cheers,
Geoff



On 9/17/2010 2:07 PM, neerajkarandikar wrote:
Thanks Shashikant. But I am not sure if I understand what snapshot
promote really does. I tried to go through the documentation but it
wasn't clear.

Does promote mean that all the files in the stream will have the
snapshot created on them at the file version which was present in
the
build workspace?

What happens to the checkins done after creating the Build
workspace
and before we promote the snapshot to the Stream?

Another problem that I am facing is, When I create a snapshot
(name:
snapshot3) on the workspace, it is created on only those components
which do not already have a previsous snapshot created (say
snapshot2
or shapshot1). Do I need to create baselines on each components
individually?

Thanks again.
Neeraj


spadurwrote:
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending
changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the
deliveries to the stream that were done after build process
accepted
all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same
workspace state using the snapshot ID I delivered after successful
build.

Please note that we are running periodic builds and it is not
worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj

1. Did you mean associate a snapshot that you created with a
stream?
You can do that by promoting the snapshot to the stream. Take a
look
at 'scm snapshot promote' command. Promoting a snapshot does not
deliver anything to the stream, it just associates the snapshot to
the stream.

2. To run another build, instead of creating a new workspace you
could
reuse the existing build workspace and accept the latest changes
from
the stream. If you are looking at recreating a workspace from the
snapshot, take a look at 'scm create workspace --snapshot
snapshot>'


permanent link
neeraj karandikar (46152) | answered Sep 23 '10, 4:14 p.m.
Thanks Geoffrey, For this work around.
So it seems there isn't a SCM command to deliver a baseline to the stream.

I can otherwise go back to Snapshot promote approach. Can you please help me with SCM CLI syntax of 'snapshot promote'?

Thanks.
Neeraj

I'll take a stab at this, but someone who is proficient with the command
line should elaborate/correct what I say below.

If you want to "deliver" this baseline to the stream, i.e. merge it into
whatever is currently in that stream, then you could create a new
workspace from that snapshot with:
scm create workspace --snapshot <the> <the>
and then deliver that workspace to the stream:
scm deliver ...

But I don't see a way to then use the command line to delete the
workspace, so it appears that you'd have to periodically clean up with
the GUI.

Anyone else have better ideas?

Cheers,
Geoff

On 9/21/2010 6:37 PM, neerajkarandikar wrote:
I have figured out item 2 from last post.

To clarify item 1 -
I am able to create baselines on all components in my workspace using
"scm create baseline --all" option.

I am not sure how to deliver this baseline to the stream, using SCM
CLI.

Thanks,
Neeraj

neerajkarandikarwrote:
Thanks Geoff,

I am still not sure how to achieve the following. Kindly advise -

1. After every successfull build of a repository workspace how to
tag all components in a associated Stream S1 with a unique snapshot
name E.g SS1 after build B1, SS2 after build B2.

2. At some later date, retreive same versions of all compoents(and
all files in it) from the Stream S1 using the Snapshot id SS1 or
SS2.

Regards,
-Neeraj


gmclemmwrote:
Yes, snapshot "promote" is somewhat confusing.
All it does is "associate" that snapshot with some
stream/workspace ...
it doesn't actually change the configuration of that
stream/workspace
(so the "confusing" part is that a snapshot can be
associated with a
stream/workspace even if the stream/workspace never had the
configuration of that snapshot).

WRT baselines and snapshots, when you create a snapshot on a
stream/workspace, if there is already a baseline that captures the
current configuration of a component in that stream/workspace, it
just
adds that existing baseline to the snapshot ... otherwise, it will
create a new baseline for that component in that stream/workspace,
and
add that new baseline to the snapshot.

Cheers,
Geoff



On 9/17/2010 2:07 PM, neerajkarandikar wrote:
Thanks Shashikant. But I am not sure if I understand what snapshot
promote really does. I tried to go through the documentation but it
wasn't clear.

Does promote mean that all the files in the stream will have the
snapshot created on them at the file version which was present in
the
build workspace?

What happens to the checkins done after creating the Build
workspace
and before we promote the snapshot to the Stream?

Another problem that I am facing is, When I create a snapshot
(name:
snapshot3) on the workspace, it is created on only those components
which do not already have a previsous snapshot created (say
snapshot2
or shapshot1). Do I need to create baselines on each components
individually?

Thanks again.
Neeraj


spadurwrote:
Hi,

For building our project, we have written a shell script to
1. Load a build workspace using scm load,
2. Accept latest changes (scm accpet) and
3. invoke ant build over it.
4. If the build succeeds, create snapshot over the workspace.

When I open the build workspace in RTC eclipse client, in pending
changes view I see outgoing snapshot that was created by the build.

I have following questions related to this -
1. Can I deliver the snapshot to the stream without losing the
deliveries to the stream that were done after build process
accepted
all new changes and before I deliver the snapshot?

2. Can I load a new workspace from the stream having the same
workspace state using the snapshot ID I delivered after successful
build.

Please note that we are running periodic builds and it is not
worthwhile to create a new stream for each successful build.


Thanks in advance.
Neeraj

1. Did you mean associate a snapshot that you created with a
stream?
You can do that by promoting the snapshot to the stream. Take a
look
at 'scm snapshot promote' command. Promoting a snapshot does not
deliver anything to the stream, it just associates the snapshot to
the stream.

2. To run another build, instead of creating a new workspace you
could
reuse the existing build workspace and accept the latest changes
from
the stream. If you are looking at recreating a workspace from the
snapshot, take a look at 'scm create workspace --snapshot
snapshot>'

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.