github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/ci/cli-release/tasks/publish-rpm.yml (about)

     1  platform: linux
     2  image: docker:///cloudfoundry/cli-ci
     3  
     4  inputs:
     5  - name: certificates
     6  
     7  params:
     8    AWS_ACCESS_KEY_ID:
     9    AWS_SECRET_ACCESS_KEY:
    10    GPG_KEY_LOCATION:
    11  
    12  run:
    13    path: bash
    14    args:
    15    - -c
    16    - |
    17      set -e
    18      cat<<EOF >sign-repodata
    19  
    20      #!/usr/bin/expect -f
    21      spawn gpg --detach-sign --armor repodata/repomd.xml
    22      expect -exact "Enter pass phrase: "
    23      send -- "\r"
    24      expect eof
    25      EOF
    26      chmod 700 sign-repodata
    27  
    28      mkdir gpg-dir
    29      export GNUPGHOME=$PWD/gpg-dir
    30      chmod 700 $GNUPGHOME
    31      trap "rm -rf $GNUPGHOME" 0
    32  
    33      gpg --import certificates/$GPG_KEY_LOCATION
    34  
    35      aws s3 sync \
    36        --exclude "*" \
    37        --include "releases/*/*installer*.rpm" \
    38        s3://cf-cli-releases \
    39        .
    40  
    41      createrepo -s sha .
    42      # ./sign-repodata
    43  
    44      aws s3 sync \
    45        --delete \
    46        repodata \
    47        s3://cf-cli-rpm-repo/repodata