Adcm bundles packer

Adcm_sdk_pack – part of adcm_client package. Purposes that are resolved:

  • Build .tgz files from dirs with sources;
  • Set version of bundle and name of built artifact in ci circle;
  • Support spec files.
usage: adcm_sdk_pack [-h] -n NAME -p PATH [-t TARPATH] [-w WORKSPACE] [-c]

Builds bundles from sources.

optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  bundle name
  -p PATH, --path PATH  path where to seek configs
  -t TARPATH, --tarpath TARPATH
            path where to save
  -w WORKSPACE, --workspace WORKSPACE
            workspace where to build
  -c, --dont-clean-ws   remove temporary files from ws
            non default master branches

Naming rules

Master branch Other branches No .git catalog PR to master branch

Spec files

version: "1.0"
 - name: None
   - tests/
   - build/
   - _config.yaml
   - pylintrc
   - (.*/)?(\..+)
   - .*README\.md
   - spec.yaml
   - tests_token
   - requirements.yml
   - yandexcloud_module/
   - tests\.sh

   - type: script
     script: build/
     - _config.yaml

   - type: python_mod_req
     requirements: requirements.yml
     prepared_image:  # for local debug purposes
     image: arenadata/adcm:2020013015

   - type: script
     script: ./

   - type: splitter
      - EULA.txt.j2

Version 1.0 functionality:

  • Exclude files and dir from being packed by regular expression.

  • Process prepack actions. Types:

    • script – execute script from repository. Params:

      • script: path to script;
      • args: list of arguments that are passed to script.
    • python_mod_req – install python-package to bundle. Params:

      • requirements: file with required packages. Format:
      # List of utils that are not present in image to proceed 
      # packages build and must be installed before python packages.
      # Not required.
        - gcc
        - g++
        - linux-headers
      # List of python packages.
      # Required.
        - yandexcloud==0.20.0
      • image: image that will be used as base to install packages;
      • prepared_image: for local debug purposes. An image prepared from image specified in image parameter by installation of required python-packages. Used to optimize build time in case of local tests running.
    • splitter – generate file from jinja2 templates. Variable “edition” is set to current edition name parameter. New file name is obtained by removing “.j2” file extension from template name.