Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
40 results

CMakeLists.txt

Blame
  • Jan David Mol's avatar
    SW-1009: Deploy LOFAR pipelines through gitlab CI/CD, migrating from Jenkins.
    Jan David Mol authored
    7f833e4e
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    CMakeLists.txt 1.96 KiB
    # $Id$
    
    lofar_package(Docker 1.0 DEPENDS Common)
    
    include(LofarPackageVersion)
    
    # Build version info
    set(docker_LIB_SRCS
      Package__Version.cc
    )
    
    lofar_add_library(docker ${docker_LIB_SRCS})
    
    lofar_add_bin_program(versiondocker versiondocker.cc)
    
    #
    # For given directories, we generate the Dockerfile
    # by parsing their Dockerfile.tmpl through "docker-template".
    #
    # "docker-template" is a script that fills in variables with
    # respect to the build info (branch name, build time, etc)
    #
    
    # Directories with Dockerfile.tmpl to parse
    set(DOCKER_TEMPLATE_DIRS
      lofar-subbandtbbwriter
      lofar-tbbwriter-control)
    
    # Note: "docker-template" only works as long as the sources are still around,
    # since it uses svn to query information from them.
    lofar_add_bin_scripts(docker-template)
    lofar_add_sbin_scripts(docker-build-all.sh)
    
    string(TOLOWER ${PACKAGE_NAME} lower_package_name)
    
    # Convert Dockerfile.tmpl -> Dockerfile in ${DOCKER_TEMPLATE_DIRS}
    foreach(_dir ${DOCKER_TEMPLATE_DIRS})
      # _src -> _dst
      set(_src ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/Dockerfile.tmpl)
      set(_dst ${CMAKE_CURRENT_BINARY_DIR}/${_dir}_Dockerfile)
    
      # add generating command, and (any) target to force the generation
      # when "all" is build.
      add_custom_command(
        OUTPUT ${_dst}
        COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/docker-template -v ${CMAKE_BINARY_DIR}/bin/versiondocker < ${_src} > ${_dst}
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/docker-template ${_src} ${CMAKE_BINARY_DIR}/bin/versiondocker
      )
      add_custom_target(${_dir}_Dockerfile_target ALL DEPENDS ${_dst})
    
      # install resulting Dockerfile
      install(FILES
        ${_dst}
        DESTINATION share/docker/${_dir}
        COMPONENT ${lower_package_name}
        RENAME Dockerfile
      )
    endforeach()
    
    # Install everything else
    install(DIRECTORY
      dynspec
      lofar-base
      lofar-pipeline
      lofar-pulp
      lofar-subbandtbbwriter
      lofar-tbbwriter
      lofar-tbbwriter-control
      DESTINATION share/docker
      COMPONENT ${lower_package_name}
      USE_SOURCE_PERMISSIONS
      PATTERN Dockerfile.tmpl EXCLUDE)