1

I have read these 4 posts already:

Our issue seems to have the most in commong with the first issue in that list.

We are transitioning from building our software (and the packages we need) from Windows to Linux. Setting up the linux build did work, however, the resulting archive is not transfered to our package server. Relevant console output:

SSH: Connecting from host [intern2]
SSH: Connecting with configuration [intern2] ...
SSH: EXEC: STDOUT/STDERR from command [conda index /srv/pkgsrv/conda-repo/linux-64/] ...

updating index in: /srv/pkgsrv/conda-repo/linux-64
SSH: EXEC: completed after 1,001 ms
SSH: Disconnecting configuration [intern2] ...
SSH: Transferred 0 file(s)
Finished: SUCCESS

The build config is:

Source files: conda-bld/linux-64/*.tar.bz2
Remove prefix: conda-bld/linux-64
Remote directory: conda-repo/linux-64/
Execute command: conda index /srv/pkgsrv/conda-repo/linux-64/

The remote directory already exists and jenkins has rights to write there. The same server configuration (apart from subdirs) is used for the windows builds and they are transfered correctly. The Jenkins configuration says:

HOME    /var/lib/jenkins
JENKINS_HOME    /var/lib/jenkins
PWD /var/lib/jenkins

The directory we are building into is $HOME/conda-bld/linux-64. In there I can see the built .tar.bz2 files (a few successful builds already accumulated).

jenkins@intern2:~/conda-bld/linux-64$ ls
fonts-1-1.tar.bz2                    qjsonrpc-dev-1.0-12.tar.bz2  qjsonrpc-dev-1.0-6.tar.bz2  qjsonrpc-dev-1.0-9.tar.bz2
<otherproject>-0.1-19_g6fe33e2.tar.bz2  qjsonrpc-dev-1.0-13.tar.bz2  qjsonrpc-dev-1.0-7.tar.bz2  repodata.json
qjsonrpc-dev-1.0-10.tar.bz2          qjsonrpc-dev-1.0-14.tar.bz2  qjsonrpc-dev-1.0-8.tar.bz2  repodata.json.bz2

Why isn't jenkins giving some kind of error if it doesn't copy? Is something wrong with how I specified the folders, because I can't figure out what? Where can I look for errors?

/edit: I looked at the Jenkins log and found

Dec 22, 2016 8:39:41 AM org.kohsuke.stapler.RequestImpl$TypePair convertJSON
WARNING: 'stapler-class' is deprecated: hudson.plugins.git.extensions.impl.RelativeTargetDirectory
Dec 22, 2016 8:39:41 AM org.kohsuke.stapler.RequestImpl$TypePair convertJSON
WARNING: 'stapler-class' is deprecated: hudson.tasks.Shell
Dec 22, 2016 8:39:41 AM org.kohsuke.stapler.RequestImpl$TypePair convertJSON
WARNING: 'stapler-class' is deprecated: jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin
Dec 22, 2016 8:40:15 AM hudson.model.Run execute
INFO: qjsonrpc-linux #15 main build action completed: SUCCESS

I'll try updating the SSH Publish plugins and look if that helps.

Community
  • 1
  • 1
steW
  • 87
  • 10

1 Answers1

0

The issue was that the files were built to different folders than the jenkins working directory because I forgot to set CONDA_BLD_PATH. However, when setting CONDA_BLD_PATH we ran into strange errors during building of the package.

Making absolute symlink root/lib64/libqjsonrpc.so.1.0 -> libqjsonrpc.so.1.0.99 relative
Traceback (most recent call last):
  File "/usr/local/lib/miniconda/bin/conda-build", line 6, in <module>
    sys.exit(conda_build.cli.main_build.main())
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 242, in main
    execute(sys.argv[1:])
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 234, in execute
    already_built=None, config=config)
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/api.py", line 77, in build
    need_source_download=need_source_download, config=config)
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 1099, in build_tree
    config=recipe_config)
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 799, in build
    create_info_files(m, pkg_files, config=config, prefix=config.build_prefix)
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 399, in create_info_files
    write_about_json(m, config)
  File "/usr/local/lib/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 305, in write_about_json
    conda_info = subprocess.check_output([bin_path, 'info', '--json', '-s'])
  File "/usr/local/lib/miniconda/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/local/lib/miniconda/bin/conda', 'info', '--json', '-s']' returned non-zero exit status 1
Build step 'Execute shell' marked build as failure

We ultimately went with building to the wrong directories and then moving the files before they were published in the post build step.

mkdir -p conda-bld/linux-64
conda build src

then

mv /var/lib/jenkins/conda-bld/linux-64/qjsonrpc*.tar.bz2 conda-bld/linux-64

Not sure what is wrong with the build when setting the conda path, but it works now.

steW
  • 87
  • 10