github.com/cptmikhailov/conmon@v2.0.20+incompatible/contrib/cirrus/packer/conmon_images.yml (about)

     1  ---
     2  
     3  # All of these are required
     4  variables:
     5      # These are required
     6      SRC:
     7      SCRIPT_BASE:
     8      PACKER_BASE:
     9      BUILT_IMAGE_SUFFIX:
    10      CRIO_REPO:
    11      CRIO_SLUG:
    12      FEDORA_BASE_IMAGE:
    13      # Protected credentials, decrypted by Cirrus at runtime
    14      GCE_SSH_USERNAME: '{{env `GCE_SSH_USERNAME`}}'
    15      GCP_PROJECT_ID: '{{env `GCP_PROJECT_ID`}}'
    16      SERVICE_ACCOUNT: '{{env `SERVICE_ACCOUNT`}}'
    17      # Used to separate images produced during PR testing from those
    18      # produced from post-merge testing.  Must be empty for PR testing.
    19      POST_MERGE_BUCKET_SUFFIX: ''
    20  
    21  # Don't leak sensitive values in error messages / output
    22  sensitive-variables:
    23      - 'GCE_SSH_USERNAME'
    24      - 'GCP_PROJECT_ID'
    25      - 'SERVICE_ACCOUNT'
    26  
    27  # What images to produce in which cloud
    28  builders:
    29      - name: 'fedora-29'
    30        type: 'googlecompute'
    31        image_name: '{{build_name}}{{user `BUILT_IMAGE_SUFFIX`}}'
    32        image_family: '{{build_name}}-conmon'
    33        source_image: '{{user `FEDORA_BASE_IMAGE`}}'
    34        disk_size: 20
    35        project_id: '{{user `GCP_PROJECT_ID`}}'
    36        service_account_email: '{{user `SERVICE_ACCOUNT`}}'
    37        communicator: 'ssh'
    38        ssh_username: '{{user `GCE_SSH_USERNAME`}}'
    39        ssh_pty: 'true'
    40        # The only supported zone in Cirrus-CI, as of addition of this comment
    41        zone: 'us-central1-f'
    42  
    43  # The brains of the operation, making actual modifications to the base-image.
    44  provisioners:
    45      - type: 'file'
    46        source: '{{user `SRC`}}'
    47        destination: '/tmp/conmon'
    48  
    49      - type: 'shell'
    50        script: '{{user `SRC`}}/{{user `PACKER_BASE`}}/{{split build_name "-" 0}}_setup.sh'
    51        environment_vars:
    52          - 'SRC=/tmp/conmon'
    53          - 'SCRIPT_BASE={{user `SCRIPT_BASE`}}'
    54          - 'PACKER_BASE={{user `PACKER_BASE`}}'
    55          - 'BUILT_IMAGE_SUFFIX={{user `BUILT_IMAGE_SUFFIX`}}'
    56          - 'CRIO_REPO={{user `CRIO_REPO`}}'
    57          - 'CRIO_SLUG={{user `CRIO_SLUG`}}'
    58  
    59  post-processors:
    60      # Store VM disk in GCP storage, where it will expire based on a defined
    61      # lifecycle. This prevents GCE from filling with disused images.
    62      - - type: 'googlecompute-export'
    63          paths: ['gs://packer-import{{user `POST_MERGE_BUCKET_SUFFIX`}}-temp/{{build_name}}{{user `BUILT_IMAGE_SUFFIX`}}.tar.gz']
    64        - type: 'manifest'  # writes packer-manifest.json