github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+incompatible/ci/cli-release/tasks/publish-debian.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: cli
    10  - name: certificates
    11  
    12  params:
    13    GPG_KEY_LOCATION:
    14    KEY_ID_LOCATION:
    15    AWS_SECRET_ACCESS_KEY:
    16    AWS_ACCESS_KEY_ID:
    17    AWS_BUCKET_NAME:
    18  
    19  run:
    20    path: bash
    21    args:
    22    - -c
    23    - |
    24      set -ex
    25  
    26      mkdir gpg-dir
    27      export GNUPGHOME=$PWD/gpg-dir
    28      chmod 700 $GNUPGHOME
    29      trap "rm -rf $GNUPGHOME" 0
    30  
    31      gpg --import certificates/$GPG_KEY_LOCATION
    32  
    33      export DEBIAN_FRONTEND=noninteractive
    34  
    35      VERSION=$(cat cli/ci/VERSION)
    36  
    37      mkdir installers
    38      curl -L "https://cli.run.pivotal.io/stable?release=debian32&version=${VERSION}&source=github-rel" > installers/cf-cli-installer_${VERSION}_i686.deb
    39      curl -L "https://cli.run.pivotal.io/stable?release=debian64&version=${VERSION}&source=github-rel" > installers/cf-cli-installer_${VERSION}_x86-64.deb
    40  
    41      cat >> $GNUPGHOME/gpg.conf <<EOF
    42      personal-digest-preferences SHA256
    43      cert-digest-algo SHA256
    44      default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
    45      EOF
    46  
    47      deb-s3 upload installers/*.deb --preserve-versions --sign=$(cat ${KEY_ID_LOCATION}) --bucket=${AWS_BUCKET_NAME}