Skip to content

bash plugin

  • You can remove the optional fields, the default values will be applied
steps:
  - name: "Build static version of microCI"
    description: "Description of this step"
    docker: "gcc:13"     # Required; Docker image that will be executed
    network: bridge      # Optional; Default: none; Options: bridge | host | none
    devices:             # Optional; Default: empty
      - "/dev/dri/"
    run_as: root         # Optional; Default: user; Options: root | user
    # In this example I choosed root because I need to install package inside the temporary image
    envs:                # Optional;
      ENV1: "value of the environment variable ENV1"
      ENV2: "value of the environment variable ENV2"
      # Tip: environment variables defined at .env or ~/.microCI.env are injected here during the execution
    plugin:
      name: bash         # Required
      bash: |            # Required
        # Commands using /bin/bash shell
        # Comments are allowed between commands
        apt update
        apt upgrade -y
        # These packages are installed in the image
        apt install -y xxd libspdlog-dev libyaml-cpp-dev
        make -C src clean all
        make -C test
        # Makes the current user the owner of the generated file
        chown $(id -u):$(id -g) -Rv src/microCI
      # For docker images minimalist or not supporting /bin/bash you can use /bin/sh instead
      # sh: |
      #  # Commands using /bin/sh shell