github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+incompatible/ci/cli-release/tasks/sign-redhat-installers.yml (about)

     1  ---
     2  platform: linux
     3  
     4  image_resource:
     5    type: docker-image
     6    source:
     7      repository: cfcli/cli-package
     8  
     9  params:
    10    GPG_KEY_LOCATION:
    11  
    12  inputs:
    13  - name: certificates
    14  - name: cli
    15  - name: edge-redhat-installer-32
    16  - name: edge-redhat-installer-64
    17  
    18  outputs:
    19  - name: signed-redhat-installer
    20  
    21  run:
    22    path: bash
    23    args:
    24    - -c
    25    - |
    26      set -ex
    27      cat<<EOF >sign-rpm
    28      #!/usr/bin/expect -f
    29      spawn rpmsign --addsign {*}\$argv
    30      expect -exact "Enter pass phrase: "
    31      send -- "\r"
    32      expect eof
    33      EOF
    34      chmod 700 sign-rpm
    35  
    36      VERSION=$(cat cli/ci/VERSION)
    37  
    38      cat<< EOF >~/.rpmmacros
    39      %_gpg_name CF CLI Team <cf-cli-eng@pivotal.io>
    40      EOF
    41  
    42      mkdir gpg-dir
    43      export GNUPGHOME=$PWD/gpg-dir
    44      chmod 700 $GNUPGHOME
    45      trap "rm -rf $GNUPGHOME" 0
    46  
    47      gpg --import certificates/$GPG_KEY_LOCATION
    48  
    49      ./sign-rpm edge-redhat-installer-32/cf-cli-installer_edge_i686.rpm
    50      ./sign-rpm edge-redhat-installer-64/cf-cli-installer_edge_x86-64.rpm
    51  
    52      mv edge-redhat-installer-32/cf-cli-installer_edge_i686.rpm signed-redhat-installer/cf-cli-installer_${VERSION}_i686.rpm
    53      mv edge-redhat-installer-64/cf-cli-installer_edge_x86-64.rpm signed-redhat-installer/cf-cli-installer_${VERSION}_x86-64.rpm