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

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