language: java
jdk: oraclejdk8
before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/
deploy:
  - provider: s3
    access_key_id: $AWS_ACCESS_KEY
    secret_access_key: $AWS_SECRET_KEY
    local_dir: deployment
    skip_cleanup: true
    bundle_type: jar
    on: &2
      branch: master
    bucket: telegram-bots-delivery-bucket
    region: eu-central-1
  - provider: codedeploy
    access_key_id: $AWS_ACCESS_KEY
    secret_access_key: $AWS_SECRET_KEY
    bucket: telegram-bots-delivery-bucket
    key: telegram-bots.jar
    bundle_type: jar
    application: telegram-bots-deploy
    deployment_group: bots
    region: eu-central-1
    on: *2
script:
  - ./gradlew shadowJar
  - mkdir -p deployment
  - mv build/libs/telegram-bots.jar deployment/.

language: java
jdk: oraclejdk8
before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/
deploy:
  - provider: s3
    access_key_id: $AWS_ACCESS_KEY
    secret_access_key: $AWS_SECRET_KEY
    local_dir: deployment
    skip_cleanup: true
    bundle_type: zip
    on: &2
      branch: master
    bucket: telegram-bots-delivery-bucket
    region: eu-central-1
  - provider: codedeploy
    access_key_id: $AWS_ACCESS_KEY
    secret_access_key: $AWS_SECRET_KEY
    bucket: telegram-bots-delivery-bucket
    key: telegram-bots.zip
    bundle_type: zip
    application: telegram-bots-deploy
    deployment_group: bots
    region: eu-central-1
    on: *2
script:
  - ./gradlew shadowJar
  - zip build/libs/telegram-bots.zip build/libs/telegram-bots.jar
  - mkdir -p deployment
  - mv build/libs/telegram-bots.zip deployment/.

Change deployed bundle to zip instead of jar
Change deployed bundle to zip instead of jar
