Bamboo does not want to create Artifacts - bamboo

During build with Bamboo we creating file /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release/dev_patch_release.tar.bz2. This file exist, checked it with command line.
At 'Artifact definitions' I have following pattern: **/release/*.bz2.
But unfortunately after build is done, in Bamboo -> Build -> Artifact No artifacts have been found for this build result..
In the same time, I have unit tests with result at **/extra/build/logs/*.xml that successfully parsed by JUnit.
So, I also created another artifact pattern with **/extra/build/logs/*.xml - still Bamboo does not see it, but JUnit parse it.
How do I create an artifact dev_patch_release.tar.bz2 with Bamboo?
Bamboo build Log:
simple 08-May-2014 23:11:33 Build Dev Patch - Release and Deploy #17 (T4-TGDP-RD-17) started building on agent Agent2
simple 08-May-2014 23:11:33 Build working directory is /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD
simple 08-May-2014 23:11:33 Executing build Dev Patch - Release and Deploy #17 (T4-TGDP-RD-17)
simple 08-May-2014 23:11:33 Starting task 'Source Code Checkout' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout' simple 08-May-2014 23:11:33 Updating source code to revision: c100a20080b08f79b6d1f566dc55a1f5154ff069
simple 08-May-2014 23:11:37 Updated source code to revision: c100a20080b08f79b6d1f566dc55a1f5154ff069
simple 08-May-2014 23:11:37 Finished task 'Source Code Checkout'
simple 08-May-2014 23:11:37 Running pre-build action: Clover Grails PreBuild Action
simple 08-May-2014 23:11:37 Running pre-build action: VCS Version Collector
command 08-May-2014 23:11:37 Substituting variable: ${bamboo.build.working.directory} with /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD command 08-May-2014 23:11:37 Substituting variable: ${bamboo.buildResultKey} with T4-TGDP-RD-17
command 08-May-2014 23:11:37 Substituting variable: ${bamboo.repository.revision.number} with c100a20080b08f79b6d1f566dc55a1f5154ff069
simple 08-May-2014 23:11:37 Starting task 'Run Phing' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.command'
command 08-May-2014 23:11:37 Beginning to execute external process for build 'Dev Patch - Release and Deploy #17 (T4-TGDP-RD-17)'\n ... running command line: \n/usr/bin/phing -buildfile /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/bamboo-dev-patch.xml test\n ... in: /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD\n ... using extra environment variables: \nrevision=c100a20080b08f79b6d1f566dc55a1f5154ff069\nbuild_result_key=T4-TGDP-RD-17\n
build 08-May-2014 23:11:39 [00;36mBuildfile: /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/bamboo-dev-patch.xml[0m
build 08-May-2014 23:11:39 [00;32m
build 08-May-2014 23:11:39 Dev Patch Build Plan > prepare:
build 08-May-2014 23:11:39 [0m
build 08-May-2014 23:11:39 [00;36m [mkdir] Created dir: /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release[0m
build 08-May-2014 23:12:05 Dev Patch Build Plan > test:
build 08-May-2014 23:12:05 [0m
build 08-May-2014 23:12:05 [00;36m [echo] tar cfj /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release/dev_patch_release.tar.bz2 ./[0m
build 08-May-2014 23:12:48 [00;32m
build 08-May-2014 23:12:48 BUILD FINISHED
build 08-May-2014 23:12:48
build 08-May-2014 23:12:48 Total time: 1 minutes 9.67 seconds
build 08-May-2014 23:12:48 [0m
simple 08-May-2014 23:12:48 Finished task 'Run Phing'
simple 08-May-2014 23:12:48 Running post build plugin 'NCover Results Collector'
simple 08-May-2014 23:12:48 Running post build plugin 'Clover Results Collector'
simple 08-May-2014 23:12:48 Finalising the build...
simple 08-May-2014 23:12:48 Stopping timer.
simple 08-May-2014 23:12:48 Build T4-TGDP-RD-17 completed.
simple 08-May-2014 23:12:48 Running on server: post build plugin 'NCover Results Collector'
simple 08-May-2014 23:12:48 Running on server: post build plugin 'Clover Delta Calculator'
simple 08-May-2014 23:12:48 All post build plugins have finished
simple 08-May-2014 23:12:48 Generating build results summary...
simple 08-May-2014 23:12:48 Saving build results to disk...
simple 08-May-2014 23:12:48 Indexing build results...
simple 08-May-2014 23:12:48 Finished building T4-TGDP-RD-17.

In artifact definition screen:
For Location specify a relative path to the files you want to create artifact
For Copy pattern, specify the pattern to be copied.
For you case, put ./release into the Location box, then specify *.bz2 as a copy pattern.
For more info, see this issue https://jira.atlassian.com/browse/BAM-2149

CW answer migrated from the question:
Due to the bug Shutting down Bamboo while builds are still running
causes plugins (i.e. Artifact copier plugin) disabling
(https://jira.atlassian.com/browse/BAM-14585) Bamboo's system plugin
"System Builders" could be disabled, so it stop publishing artifacts.
In comments to the bug you can find solution:
Go to Administration -> Manage add-ons
Select "System" from the filter drop down
Find the plugin "System Builders"
Enable it!
My version of Bamboo where bug is still appears: 5.4.1 build 4207 -
12 Feb 14.
Related question at Atlassian answers website:
https://answers.atlassian.com/questions/292548/bamboo-does-not-want-to-create-artifacts
Atlassian will soon release patch to fix this problem.

Related

Dotnet Sonarcloud end failed

I trying to integrate my Solution based on .net6 with SonarCloud and Github actions.The problem is that the action build failed on the sonar scanner end.I tried to change working dirs but with the same effect.The project is public HERE
The SonarScanner for MSBuild integration failed: SonarCloud was unable to collect the required information about your projects.
Possible causes:
The project has not been built - the project must be built in between the begin and end steps
An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
The begin, build and end steps have not all been launched from the same folder
None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln) SonarScanner for MSBuild 5.7.2 Using
the .NET Core version of the Scanner for MSBuild Post-processing
started. 10:38:06.016 Generation of the sonar-properties file failed.
Unable to complete the analysis. 10:38:06.024 Post-processing failed.
Exit code: 1 Error: Process completed with exit code 1.
name: build-all
# Controls when the action will run.
on:
push:
branches:
- main
env:
DOTNET_VERSION: 6.0.x
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-windows:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout#v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- uses: actions/setup-dotnet#v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- uses: microsoft/setup-msbuild#v1
- uses: actions/setup-java#v2
with:
distribution: 'adopt'
java-version: '11'
- name: Restore NuGet packages
run: |
cd App
nuget restore App.sln
- name: Begin Sonar scan
run: |
cd App
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /o:vladimirpetukhov /k:vladimirpetukhov_Musement_CLI /d:sonar.login=${{ secrets.SONAR_TOKEN }} /d:sonar.host.url=https://sonarcloud.io
- name: Build Api
run: |
cd ./App/App.API
dotnet build App.API.csproj --no-restore
# dotnet test App.API.csproj --no-build --no-restore --verbosity normal -p:CollectCoverage=true -p:CoverletOutputFormat=opencover
- name: Build Main
run: |
cd ./App/App.Main
dotnet build App.Main.csproj --no-restore
# dotnet test App.Main.csproj --no-build --no-restore --verbosity normal -p:CollectCoverage=true -p:CoverletOutputFormat=opencover
- name: End Sonar scan
run: |
cd App
dotnet sonarscanner end /d:sonar.login=${{ secrets.SONAR_TOKEN }}

Issue building with CMake in TeamCity

I have installed the Cmake Plugin to be able to build my C/C++ project with TeamCity. However, so far I had no luck building the project successfully. The build server and the agent are running on separate docker containers. The build fails with the following error:
[14:09:29] Step 1/1: DebugBuild (CMake build)
[14:09:29] [Step 1/1] Starting: /bin/bash -c "cmake "$#" 2>&1" -- --build . --target suite_1_app --config Debug --
[14:09:29] [Step 1/1] in directory: /opt/buildagent/work/3249fc82f6dadd5
[14:09:29] [Step 1/1] --: cmake: command not found
[14:09:29] [Step 1/1] Process exited with code 127
[14:09:30] [Step 1/1] Process exited with code 127 (Step: DebugBuild (CMake build))
[14:09:30] [Step 1/1] Step DebugBuild (CMake build) failed
[14:09:30] Publishing internal artifacts
[14:09:30] Build finished
And here is the configuration I used in the build step:
Runner type: Cmake build
Step name: DebugBuild
Build target: suite_1_app
Configuration: Debug
Any help would be appreciated!

gitlab-ci Auto Devops: mvn: command not found on test step

I tried to enable an "Auto Devops" pipeline for my private project on Gitlab.com. The "Build" step runs fine, but then the "Test" step fails. What's strange is that the beginning of the step goes well (the mvn test-compile part), but then it seems to lose the path to mvn:
$ # Auto DevOps variables and functions # collapsed multi-line command
$ setup_test_db
$ cp -R . /tmp/app
$ /bin/herokuish buildpack test
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Installing Maven 3.3.9... done
-----> Executing: mvn clean dependency:resolve-plugins test-compile
[INFO] Scanning for projects...
<SNIP>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.953 s
[INFO] Finished at: 2018-04-01T17:22:11+00:00
[INFO] Final Memory: 23M/169M
[INFO] ------------------------------------------------------------------------
/tmp/buildpacks/05_buildpack-java/bin/test: line 24: mvn: command not found
There is a bug in heroku java buildpack < v60 that will mess with maven installation during tests execution.
It has been fixed and bundled in herokuish 0.4.1
If you re-run your autodevops now it will work.
source: https://gitlab.com/gitlab-org/gitlab-ce/issues/44980

Getting BlazeInfoException in IntelliJ from the Bazel plugin

I just installed the Bazel plugin for IntelliJ, and I keep getting this exception:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
java.util.concurrent.ExecutionException:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:502)
[...]
at com.google.idea.blaze.base.async.FutureUtil$Builder.lambda$run$0(FutureUtil.java:93)
[...]
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:108)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:105)
[...]
Caused by: com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.runBlazeInfo(BlazeInfoRunnerImpl.java:105)
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.lambda$runBlazeInfo$2(BlazeInfoRunnerImpl.java:75)
... 6 more
Edit: I am using IntelliJ 2017.3 on MacOS El Capitan 10.11.6, Java JRE 1.8.0, and the Bazel version is 0.8.1-homebrew (the plugin version is 2017.11.20.0.4). I get this error when I try to setup a new Java project (an Hello World with only one class and one BUILD file containing a java_binary similar to this tutorial), and it appears when I click on the Bazel sync button.
The output in the Bazel console is:
Syncing project: Sync (incremental)...
Updating VCS...
Running Bazel info...
Command: info --tool_tag=ijwb:IDEA:community --curses=no --color=no --experimental_ui=no --progress_in_terminal_title=no --
==== TIMING REPORT ====
Sync: 47ms
BazelInfo: 4ms
Timing summary:
BlazeInvocation: 4ms
Sync failed
Command: git diff --name-status --no-renames abc8913346474d12ad45226503438848011929ae
Does anybody have an idea about what is it and/or how to fix it? Thanks!
I found my answer, thanks to this post.
In IntelliJ > Settings > Other Settings > Bazel Settings, the field "Bazel binary location" was empty. For my case, I entered /usr/local/bin/bazel and now it works!

Have hudson compile a repo with maven

I'm trying to have Hudson compile a Java project of mine, but it keeps failing.
I've started a new job, with "build a free-style software project"
I've set the SCM to Mercurial, added a build step "mvn compile" and had it publish Junit and JDepend results. JUnit test report simple named "*.xml"
The cloning of the repo works, but the repo refuses to compile. I get this error message:
[workspace] $ /usr/local/bin/hg log --rev . --template {node}
[workspace] $ /bin/bash -xe /tmp/hudson1162267116265588070.sh
+ mvn compile
/tmp/hudson1162267116265588070.sh: line 2: mvn: command not found
Recording test results
[JDepend] JDepend plugin is ready
[JDepend] Starting JDepend file, outputting to /tmp/jdepend6348540211061861772.xml
[JDepend] Found 2 classes in 1 packages
Finished: FAILURE
EDIT: result of mvn -ver
Java version: 1.6.0_21
Java home: /usr/java/jdk1.6.0_21/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-25-generic" arch: "i386" Family: "unix"
Also, what I added to my /etc/bash.bashrc file.
export JAVA_HOME=/usr/java/jdk1.6.0_21
export M2_HOME=/usr/local/apache-maven/apache-maven-2.2.1
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH
export MAVEN_HOME=/usr/local/apache-maven/apache-maven-2.2.1
export MAVEN=$MAVEN_HOME/bin
And the $PATH echo.
/usr/local/apache-maven/apache-maven-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/java/jdk1.6.0_21/bin
The essential part of John V's answer and its comments.
It can't find maven, because it is not in the path. If you set the path in Hudson's .profile you are out of luck. The profile will only be executed for login shells. AFAIK, Hudson opens a non-interactive shell to execute the build steps and therefore, the .profile will not be executed.
When you login using the Hudson user account and run the maven command you will not have any problems, since the profile is correctly executed.