IBM-Cloud: Schedule a Deployment - ibm-cloud

we are trying to schedule a deploy, something like every sunday at 4 am, do deploy, even if nothing has changed, but reading official docs of IBM Cloud: here, the docs does not match with tools in console:
Docs:
Real:
So, the question is: how can we schedule a deployment?
Update:
We only see this options:
after clicking "Config Stage" we see:
There are 2 options available:
Execute on previous stage finished
Manually excecute stage
Update 2:
Update 3:

The docs you refer to are describing a capability provided by the (currently experimental) Composite Pipeline feature. If you want to try this, go to the toolchains page (https://console.bluemix.net/devops) and click on the "Pipelines" item, then click on the "Learn More" link on the "New experimental feature!"
Note that this feature is experimental, and is not available in all regions. In addition we may change how we deliver the capabilities Composite Pipeline current provides over time.

Related

gcloud components list not up-to-date?

Context
I will rely on a component shipped with Gcloud SDK CLI.
For migration purposes and other reasons, I want to know which version of the cloud-sdk starts shipping this component and avoid the "install the latest version".
My issue
In the official changelog: https://cloud.google.com/sdk/docs/release-notes, there are no references to the component I am looking for.
Tries
I have tried to run this command naively
for gcloud_version in 390.0.0-alpine 391.0.0-alpine 392.0.0-alpine 393.0.0-alpine; do
echo "---> ${gcloud_version}"
docker run --rm -ti google/cloud-sdk:${gcloud_version} gcloud components list
done
Unfortunately, every list do not show the component I am waiting for (even the latest version of gcloud, 393 at the time of writting).
Discovery
However, when I run gcloud components install MY_UNLISTED_COMPONENT it works ...
Not a very reliable way to find out which version has the component I want.
Do you know if:
this is an issue?
I can report this somewhere?
It is relevant to do it?
Thanks for your help!
From #DazWilkin
It would be helpful if you included the name of the public albeit unlisted component in your question. The Release Notes includes a "Send Feedback" option and you may want to provide this feedback there.
it's reasonable to expect it to be documented. I encourage you to send feedback via the release page and to consider filing an issue on Google's public Issue Tracker.

No Azure DevOps Pipelines - Builds - Tasks

Following this Microsoft tutorial (Run unit tests with your builds), I was expecting to be able to run my unit-tests automatically when a build is triggered, such as a Pull request.
However, when I look in the Pipeline / Builds tab and try to edit my pipeline, there is nothing that allows me to add a new task (see screenshot below).
However, there doesn't appear to be any way of adding a task. I can't even switch to the YMAL without navigating to the source via the Repo. I was hoping to use the GUI though as my YMAL is non-existent.
I have created a test solution with the following structure, which is held in the repo:
Core Solution
|_ Class Library Project (.NET Core)
|_ MSTest Test Project (.NET Core)
I was hoping to have a build step followed by a Unit Test step using the tests in my MSTest Test Project (.NET Core) project once they were built.
There appears to be a Tasks option in the Releases tab by the way, but I was expecting to be able to add tasks for builds as well, especially Unit Tests.
Being new at this, perhaps I have missed or misunderstood something. I would be grateful for any help and to be pointed in the right direction.
It seems that there is an obscure link that takes you through to the correct process, found it quite by accident, see screenshot below:
It turns out that there is a little link titled Use the visual designer that I'd missed. Seems a little odd that most of the tutorials discuss this process and yet it's partially obscured. I guess that this shows that the platform is a work in process and still being added to and improved.
Another few caveats for those descending this little rabbit hole, after selecting the Use the visual designer link, be sure to select the Empty pipeline template, or whatever is appropriate to your project/solution type, and not the YAML option at the top of the list, otherwise you'll be back where you started.
Finally, it seems that automated Unit Tests don't work on Agents other than Hosted VS2017 Agents (that said, I haven't tried the Hosted option). This is set in the very next screen by selecting the Pipeline and selecting the Agent pool from the drop-down.
One last thing... The pipeline won't run automatically unless you check the Enable continuous integration checkbox on the Triggers tab.
Once this is all done, I simply chose the tasks needed for the build by clicking the plus symbol on the Agent job 1 item.
Good luck
Kaine
You have created a new YAML style of build configuration. Currently Azure DevOps does not support of having YAML & GUI editor at the same time (this is upcoming feature in Q1/2019).
To get a GUI editor, create new build pipeline.
In this selection click "Use the visual designer".
Then at template phase, don't select YAML. Any other template will do. You can easily delete all the build steps after selecting template, so don't be afraid to choose any.

Delete a Test Plan in VSTS / Test Manager

Is there a way to delete a Test Plan in Visual Studio Team Services or through Microsoft Test Manager for a project hosted on Visual Studio Team Services?
Delete buttons seems to be disabled and directly deleting the work item in VSTS is blocked:
The work item 1 cannot be deleted. Test Plan work items cannot be deleted. work items cannot be deleted.
Any other way to achieve this?
As Abhijit mentioned, you need to use witadmin destroywi command to delete the test plan. This command works for VSTS too. But you need to make sure your account has "Team Foundation Administrators" permission. You can use this command directly from "Developer Command Prompt for VS" which is installed with VS.
I was just trying to delete a test plan, and saw that, in the web access of the test plan, if you hover over the name of the plan in the tree view on the left, there's an "x" that appears, and lets you delete the test plan! No command line needed :)
If relevant, though - we have an internally-hosted TFS. But the "x" I found doesn't match what the MS documentation seems to suggest.
Screenshot of TFS Web Page
Deleting test plan in MTM 2010 is straight-forward (check the link below). While in MTM2012/2013 test plan can be deleted through developer command prompt.
In MTM2012/MTM2013, there is no direct way to delete a test plan. We
need delete the corresponding work item using TFS command line options
in command prompt in order to delete a test plan.
You can delete the test plan like this in Developer Command Prompt for
VS2013:
witadmin destroywi /collection:XXXX / id: the test plan’s id
You can find the solution here:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1efe30e3-5a1f-4ca2-abac-52dbeb0d592c/microsoft-test-manager-2013-how-to-delete-a-test-plan?forum=vsmantest
If you followed the steps that are here and you still cannot delete test suites/plans etc., it means that your account subscription is Basic or Professional but not Enterprise which includes Test Manager as default. The thing is that in Basic subscriptions, you can create test suites but can't delete them (Annoying).
What you can do however is that you can get free trial for the Test Manager from here and then you will be able to delete them. I afraid there is no other way yet and you can vote the already existing feature request too if you want from here.
Yes. You can delete it via VSTS.
Just click on the ellipsis button (looks like 3 dots) on top right hand side and select “Permenantly delete”. It will prompt you to enter the test plan ID to confirm the delete. Note. Deleting the test plan will not delete any associated test cases. You will have to run the same process with the test cases. You will need administrative privileges in order to see the permanently delete option in the menu.
See: https://www.visualstudio.com/en-us/docs/work/backlogs/remove-delete-work-items#move-delete-permissions

How to use Jenkins Build Keeper Plugin

I would like to use the Jenkins 'Build Keeper Plugin' but I don't know how. The plugin site doesn't describe how to use it. Plugin Site
On this page I found the extension points which I would like to use, e.g. the org.jenkins_ci.plugins.build_keeper.KeepFirstFailedPolicy
But in the configuration part of my project, I can't find any place to configure it to use that policy. So where do I have to add it?
Jenkins version is 1.544
Have you tried to open Job configuration page and look for settings ?
For example it is another plugin but it is very similar : Build Discard plugin, may be you will use it for your purposes:
Build discard old build settings
You can configure it in the job under the section Build Environment.
For screenshots see also https://issues.jenkins-ci.org/browse/JENKINS-25293
If used from within a pipeline, it is enough to write
'currentBuild.rawBuild.keepLog(true)'
That is unfortunately not an interface to the plugin, just a jobs setting, but can solve it when You want to keep all builds, or decide within the build if to keep it.

rails show the current version of my code on the page

On my website, in the footer, i want to clearly show which version of the code is live.
I am using git as version control. It would be great to get some visual feedback to know which version is actually live.
I want to show some readable number, like a gem version number. I could create a VERSION file, which i manage and increase every time it is needed.
I am curious if there are any existing solutions already out there? It would be preferable if it could e.g. use tag information from git.
I found a gem that actually does exactly what i need: version.
It allows to manage the version dead-easy, with the needed rake-tasks without the coupling to jeweler, and also allows to tag github in the process.
When developing a gem, i keep using jeweler, but for my rails-projects this is just what i need.
For more info see the gem's documentation.
Jeweler has some rake tasks that handle versioning pretty well for you. I have only used it for gems, but you can probably drop in a VERSION file and use the same rake tasks in a rails app. I have actually been thinking about doing the same thing for my app.. I will update this answer with more details if I get to it soon. For my gems I added a few new rake tasks that combine some of the jeweler tasks. Every time I have a new version I run one of the tasks and it increments the version (major,minor or patch), pushes my code to github and tags it all in one operation:
namespace :version do
desc "create a new version, create tag and push to github"
task :github_and_tag do
Rake::Task['github:release'].invoke
Rake::Task['git:release'].invoke
end
desc "bump patch push to github"
task :patch_release do
Rake::Task['version:bump:patch'].invoke
Rake::Task['version:github_and_tag'].invoke
end
desc "bump minor push to github"
task :minor_release do
Rake::Task['version:bump:minor'].invoke
Rake::Task['version:github_and_tag'].invoke
end
desc "bump major push to github"
task :major_release do
Rake::Task['version:bump:major'].invoke
Rake::Task['version:github_and_tag'].invoke
end
end
get jeweler if you dont have it and create a fake gem, put it on github and play around with the tasks until you get a feel for them. I took me a few tries (and peeks at the source) to fully understand what it was doing.
If you run these tasks every time you have a new version, your VERSION file will be in sync with your github project. If it was me, I would just read in the version number from the file and use something like settingslogic to set up a constant.. or you can set it up in an initializer. That way, you know that every time you restart your app, it will read the correct version