Schdeuler Trigger Daily and lastest Artifact Deployment
Asked by RajVerma7099:

Hi Team,

I set up daily Triggered to run a scan job but its not taking latest Artifacts present and when deploy job is running taking

```
'${bamboo.inject.FixVersion}.${bamboo.inject.BuildDay}.${bamboo.inject.BuildTime}_(19)
```

How can i set in Scheduled trigger last release created ?

I am using Bamboo Specs to create Pipelines. So observed if the last plan run is spec Update in that case scheduled job fails as it's not able to find the artifacts. But if last build before scheduled job ran is actual plan build it works fine.

So if i create bamboo pipeline without spec scheduled job works fine but if create through specs and there is update in specs it fails.

How can i handle this scenario ?


Answers:
author: Daniel Santos
body: Hi [@RajVerma7099](/t5/user/viewprofilepage/user-id/1656873)

I'm not really sure if I understand your request. Could you give us more details on what configuration you have (plan/deployment) and what is the issue?  

Is your trigger in the build plan or in the deployment one?

What is this variable standing for?

```
${bamboo.inject.FixVersion}.${bamboo.inject.BuildDay}.${bamboo.inject.BuildTime}_(19)
```

comments: author: RajVerma7099
body: Okay some more details - I am using Bamboo Specs to create Pipelines. So observed if the last plan run is spec Update in that case scheduled job fails as it's not able to find the artifacts. But if last build before scheduled job ran is actual plan build it works fine.

So if i create bamboo pipeline without spec scheduled job works fine but if create through specs and there is update in specs it fails.

How can i handle this scenario ?


author: Daniel Santos
body: Hi [@RajVerma7099](/t5/user/viewprofilepage/user-id/1656873)   
Can you share the Bamboo version so I can run a test to check if this is a bug?


author: RajVerma7099
body: Using 6.8.0 Version


author: RajVerma7099
body: [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125) - Please let me know your observation?


author: Daniel Santos
body: Hi [@RajVerma7099](/t5/user/viewprofilepage/user-id/1656873)

Sorry for the delay. I still have to run some tests, but I think you are affected by this bug: <https://jira.atlassian.com/browse/BAM-19770>. As soon as I have them run I'll share my findings here.


author: Daniel Santos
body: Hi [@RajVerma7099](/t5/user/viewprofilepage/user-id/1656873)

I was able to reproduce the issue both in Bamboo 6.8.0 and 6.8.1. I've opened a new bug to report this thanks to you:

* [\[BAM-20390\] Scheduled triggered deployment is not able to download artifact after specs update](https://jira.atlassian.com/browse/BAM-20390)

Unfortunately, the only workaround I can possibly think is to set a scheduled trigger for your build to run a few munites before the deployment is triggered. This should drastically reduce the chances of a specs update to happen as the latest result.

We will now need to wait for our development team to fix that bug so this issue can be avoided. In case you want to know, this is our [Server Bug Fix Policy](https://confluence.atlassian.com/support/atlassian-server-bug-fix-policy-201294573.html) and thank you for bringing it to our attention.


author: RajVerma7099
body: thanks Daniel !


author: Daniel Santos
body: Hi [@RajVerma7099](/t5/user/viewprofilepage/user-id/1656873)

If you think this answer can help others, please click **this helped me** at the top of it.  

See you in the next thread!


author: Edward_Burns
body: Other wise go stuck our thumb!