Snapshot dependency builds in the chain are not getting trigerred - build

I have defined snapshot dependencies in my build chain. For example:
01 - Build Libraries
Trigerred by VCS
02 - Build Windows
Snapshot dependency on "01 - Build Libraries"
03 - Build Service_1
Snapshot dependency on "02 - Build Windows"
03 - Build Service_2
Snapshot dependency on "02 - Build Windows"
04 - Deploy
Snapshot dependency on "03 - Build Service_1" & "03 - Build Service_2"
Now, the last build in the chain is never trigerred automatically. I have to manually go and run the build.
Also, in the Build Chain view, it says the build "04" is part of the chain, but not trigerred. I am not able to figure out why. Any ideas?

It actually works the other way around. The trigger should be on "04 - Deploy". The other dependencies will get automatically built to satisfy the input requirements of "04 - Deploy".

Related

Github actions job cancelled for no obvious reason

I'm trying to set up a github actions script for a project of mine. The project is private at the moment since I want it in an RC state before the first release. As it is close to ready, I intended to set up an automated build now, but I'm seeing some strange behavior. The project is a simple c# library, and so the .yml file is quite simple:
name: .NET Core Desktop
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
env:
Solution_Name: Replacement.sln # Replace with your solution name, i.e. MyWpfApp.sln.
Test_Project_Path: UnitTest.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
steps:
- name: Checkout
uses: actions/checkout#v3
with:
fetch-depth: 0
# Run build
- name: Run build
run: ./build.cmd --target pack --configuration ${{ matrix.configuration }}
Sometimes, one of the builds (Debug or Release, or both) fail with an entry such as
Terminate batch job (Y/N)?
Error: The operation was canceled.
in the log. I certainly did not cancel the build in any way. This may happen after like 3 minutes.
Am I running into the github build time limit (how would I know)? Or is there something else wrong I'm missing?

Appveyor runs tests but OpenCover doesn't show coverage

I am building the project and running test cases in appveyor. After successfully executing test cases the coverage data must be uploaded to coveralls.
But in my case no error is thrown but coverage is being recorded.
The details of my project are
.Net Core 1.1.0
Visual Studio 2017
xunit - 2.2.0
OpenCover - 4.6.519
coveralls.net - 0.7.0
My appveyor.yml is as below :
version: 1.0.{build}
os: Visual Studio 2017
skip_tags: true
configuration: Release
environment:
nodejs_version: "0.12"
COVERALLS_REPO_TOKEN:
secure: rstgrtert
cache:
- "%LOCALAPPDATA%\\Yarn"
install:
- npm i -g yarn#0.16.1
- npm i -g typescript typings
- yarn global add typescript typings
- cd ".\Promact.Oauth.Server\src\Promact.Oauth.Server\"
- yarn
- cd..
- cd..
build_script:
- ps: dotnet restore
build:
project: .\Promact.Oauth.Server\Promact.Oauth.Server.sln
verbosity: minimal
test_script:
- cd ".\src\"
- ps: >-
C:\Users\appveyor\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe-target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test -f netcoreapp1.1 -c Release .\Promact.Oauth.Server.Tests\Promact.Oauth.Server.Tests.csproj" -mergeoutput -hideskipped:File -output:opencover.xml -oldStyle -filter:"+[Promact.Oauth.Server]*Repository -[Promact.Oauth.Server.Tests*]*" -register:user
if(![string]::IsNullOrEmpty($env:COVERALLS_REPO_TOKEN)){
$coveralls = (Resolve-Path "C:\Users\appveyor\.nuget\packages\coveralls.net\0.7.0\tools\csmacnz.coveralls. exe").ToString()
& $coveralls --opencover -i opencover.xml --repoToken
$env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID
}
In appveyor it runs the test and simply shows
Committing...
No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.
Coverage data uploaded to coveralls.
link to the appveyor build

What are the steps needed to build WSO2 Carbon Platform Patch Release 4.0.x?

I'm trying to build the Carbon Platform from source.
I've tried this:
svn co https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0
cd patch-releases\4.0.9
set MAVEN_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
mvn clean install -Dmaven.test.skip=true
However, I had hit this problem: link
After fixing that problem, I have now run into this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0:compile (default-compile) on project org.wso2.carbon.message.store: Compilation failure: Compilation failure:
[ERROR] C:\wso2\src\wso2_platform_branch_400\components\mediation\message-store\org.wso2.carbon.message.store\4.0.9\src\main\java\org\wso2\c
arbon\message\store\persistence\jms\JMSMessageStore.java:[29,39] cannot find symbol
[ERROR] symbol : class MessageStores
[ERROR] location: package org.apache.synapse.message.store
I must be doing something wrong - I keep hitting errors at each turn?
Question: What are the steps needed to build WSO2 Carbon Platform Patch Release 4.0.x?
The necessary steps are, (if you want to build patch-release 4.0.x)
1) build orbit 4.0.0/
Then build orbit/patch-release/4.0.x
2) build kernel 4.0.0/
Then build kernel/patch-release/4.0.x
3) build platform 4.0.0/
Then build platform/patch-release/4.0.x
This should work.

Teamcity - Revisions are not found for build configurations

I have two build configurations: A and B. A is fetching the sources from a Git repository, building the source code and running unit and integration tests, B should deploy the application to a test environment. B has a "Finish Build Trigger" and a "Snapshot Dependency" on A. A is successfully running and I'm expecting that B will start after A, but I get the following error:
Revisions are not found for build configurations: A {id=bt7}, B
{id=bt9} Hide stacktrace
jetbrains.buildServer.buildTriggers.BuildTriggerException: Revisions
are not found for build configurations: A {id=bt7}, B {id=bt9} at
jetbrains.buildServer.serverSide.impl.BuildTriggersChecker.callTrigger(BuildTriggersChecker.java:37)
at
jetbrains.buildServer.serverSide.impl.BuildTriggersChecker.access$800(BuildTriggersChecker.java:109)
at
jetbrains.buildServer.serverSide.impl.BuildTriggersChecker$BuildTriggersGroup.processTriggers(BuildTriggersChecker.java:27)
at
jetbrains.buildServer.serverSide.impl.BuildTriggersChecker.triggerBuilds(BuildTriggersChecker.java:94)
at
jetbrains.buildServer.serverSide.impl.BuildServerRunner$4.doSomething(BuildServerRunner.java:1)
at
jetbrains.buildServer.serverSide.impl.BuildServerRunner$BuildServerWorker.runAction(BuildServerRunner.java:12)
at
jetbrains.buildServer.serverSide.impl.BuildServerRunner$BuildServerWorker.run(BuildServerRunner.java:32)
at java.lang.Thread.run(Unknown Source) Caused by:
jetbrains.buildServer.vcs.impl.RevisionsNotFoundException: Revisions
are not found for build configurations: A {id=bt7}, B {id=bt9} at
jetbrains.buildServer.vcs.impl.HistoryChangesCollector$HistoryChangesResult.checkRevisionsAreSet(HistoryChangesCollector.java:30)
at
jetbrains.buildServer.vcs.impl.HistoryChangesCollector$HistoryChangesResult.computeRevisions(HistoryChangesCollector.java:27)
at
jetbrains.buildServer.vcs.impl.HistoryChangesCollector$HistoryChangesResult.access$100(HistoryChangesCollector.java:74)
at
jetbrains.buildServer.vcs.impl.HistoryChangesCollector$1.get(HistoryChangesCollector.java:11)
at
jetbrains.buildServer.vcs.impl.HistoryChangesCollector$1.get(HistoryChangesCollector.java:3)
at
jetbrains.buildServer.serverSide.impl.CancelableTaskHolder.waitForTaskToComplete(CancelableTaskHolder.java:9)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.doCollectChanges(TopBuildDependencyGraphImpl.java:138)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.access$000(TopBuildDependencyGraphImpl.java:88)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:1)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java)
at
jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:24)
at
jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:19)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:122)
at
jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:8)
at
jetbrains.buildServer.serverSide.impl.BuildCustomizerImpl.createPromotion(BuildCustomizerImpl.java:53)
at
jetbrains.buildServer.serverSide.impl.BuildCustomizerImpl.createPromotion(BuildCustomizerImpl.java:25)
at
jetbrains.buildServer.buildTriggers.dependency.FinishBuildTriggerService$3.triggerBuild(FinishBuildTriggerService.java:48)
at
jetbrains.buildServer.serverSide.impl.BuildTriggersChecker.callTrigger(BuildTriggersChecker.java:50)
How this B is configured? How this B should have this artifact? Is it passed from A or B will build a it by itself and then deploy?
It seems that it does not have any VCS attached, does it? YOu can only have a snapshot dependency between two build configurations with the same VCS attached. TC will look after to make sure both builds are run against same revision. But in case one of the builds does not have VCS attached at all I will probably fail.

Not able to build .net solution in Team city by using Nant.exe

I have using team city to build my project by using of Nant as build. So I have created one batch file in to build my project by where I using Nant.exe which is responsible for build my solution.
When I am ruing this batch file from command prompt I am successfully able to build my solution. But When I run the same file from TeamCity its giving me Build fail error.
So That I have verified path and that also correct. Below are the path I have stored in team city.
Path to a build file: Build.bat (bat file for build)
Working directly : D:\CMS (path where my bat file is located.
NAnt home: Path were Nant exe located.
Targeted framwork : Net 4.0
When I am ruing this build by team city every time build fails with below log generated.
[21:27:54]: Checking for changes
[21:27:55]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[21:27:55]: Checkout directory: D:\Projects\JoyaCMS\src
[21:27:56]: Repository sources transferred
[21:27:55]: Updating sources: server side checkout... (1s)
[21:27:57]: Publishing internal artifacts (2s)
[21:27:57]: Starting: D:\Projects\JoyaCMS\src\UppercuT\lib\NAnt\NAnt.exe - buildfile:D:\Projects\JoyaCMS\src\build.bat -targetframework:net-4.0 - extension:C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NAntLoggers .dll -listener:JetBrains.BuildServer.NAntLoggers.NAntListener
[21:27:57]: in directory: D:\Projects\JoyaCMS\src
[21:27:57]: Process exited with code 1
[21:27:57]: NAnt output:
[21:27:57]: NAnt 0.91 (Build 0.91.3881.0; alpha2; 8/17/2010)
[21:27:57]: Copyright (C) 2001-2010 Gerry Shaw
[21:27:57]: http://nant.sourceforge.net
[21:27:57]: BUILD FAILED
[21:27:57]: For more information regarding the cause of the build failure, run the build again in debug mode.
[21:27:57]: Try 'nant -help' for more information
[21:27:57]: D:\Projects\JoyaCMS\src\build.bat(1,1):
[21:27:57]: Error loading buildfile.
[21:27:57]: Data at the root level is invalid. Line 1, position 1.
[21:28:02]: Publishing internal artifacts (1s)
[21:28:05]: Build finished
So let me know how can I resolve this issue in team city. and what setting I need to perform more to resolve this issue.
Thanks,
Amit
First of all I noticed a few occurrences of additional whitespace characters in your NAnt call e.g.- extension:C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NAntLoggers .dll. Might be an SO formatting issue, but in case they're part of your batch, remove them first.
If this doesn't help, activate verbose build output via NAnt switch -v+. That should give more information.