<commit_before>---
kind: pipeline
type: docker
name: default

environment:
  DEFAULT_VERSION: 1.18.0
  DEFAULT_REVISION: 1

steps:
  - name: preflight
    image: python:3-alpine
    commands:
      - pip3 install semver
      - python3 genenv
      - echo $(uname -s):$(uname -r):$(uname -v):$(uname -m)
      - mkdir -p build/deb
      - mkdir -p build/alpine
      - mkdir -p build/rpm
  - name: focal
    image: charlesportwoodii/ubuntu:20.04-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: focal
      BUILD_OS: Ubuntu
      BUILD_OS_VERSION: "20.04"
    commands:
      - bash -lc "make build fpm_debian OPENSSL_CI_HACK=1"
      - mkdir -p build/deb/$BUILD_IMAGE
      - mv *$BUILD_IMAGE*.deb build/deb/$BUILD_IMAGE/
  - name: bionic
    image: charlesportwoodii/ubuntu:18.04-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: bionic
      BUILD_OS: Ubuntu
      BUILD_OS_VERSION: "18.04"
    commands:
      - bash -lc "make build fpm_debian OPENSSL_CI_HACK=1"
      - mkdir -p build/deb/$BUILD_IMAGE
      - mv *$BUILD_IMAGE*.deb build/deb/$BUILD_IMAGE/
  - name: xenial
    image: charlesportwoodii/ubuntu:16.04-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: xenial
      BUILD_OS: Ubuntu
      BUILD_OS_VERSION: "16.04"
    commands:
      - bash -lc "make build fpm_debian OPENSSL_CI_HACK=1"
      - mkdir -p build/deb/$BUILD_IMAGE
      - mv *$BUILD_IMAGE*.deb build/deb/$BUILD_IMAGE/
  - name: centos7
    image: charlesportwoodii/centos:7-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: centos7
      BUILD_OS: CentOS
      BUILD_OS_VERSION: "7"
    commands:
      - bash -lc "make build fpm_rpm OPENSSL_CI_HACK=1"
      - mkdir -p build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
      - mv *.rpm build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
  - name: rhel7
    image: charlesportwoodii/rhel:7-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: rhel7
      BUILD_OS: CentOS
      BUILD_OS_VERSION: "7"
    commands:
      - bash -lc "make build fpm_rpm OPENSSL_CI_HACK=1"
      - mkdir -p build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
      - mv *.rpm build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
  - name: "alpine3.9"
    image: charlesportwoodii/alpine:3.9-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: "alpine3.9"
      BUILD_OS: Alpine
      BUILD_OS_VERSION: "3.9"
    commands:
      - bash -lc "make clean base openssl pcre nginx fpm_alpine OPENSSL_CI_HACK=1"
      - mkdir -p build/alpine/v$BUILD_OS_VERSION/x86_64
      - mv *.apk build/alpine/v$BUILD_OS_VERSION/x86_64
  - name: "alpine3.10"
    image: charlesportwoodii/alpine:3.10-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: "alpine3.10"
      BUILD_OS: Alpine
      BUILD_OS_VERSION: "3.10"
    commands:
      - bash -lc "make clean base openssl pcre nginx fpm_alpine OPENSSL_CI_HACK=1"
      - mkdir -p build/alpine/v$BUILD_OS_VERSION/x86_64
      - mv *.apk build/alpine/v$BUILD_OS_VERSION/x86_64
  - name: "alpine3.11"
    image: charlesportwoodii/alpine:3.11-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: "alpine3.11"
      BUILD_OS: Alpine
      BUILD_OS_VERSION: "3.11"
    commands:
      - bash -lc "make clean base openssl pcre nginx fpm_alpine OPENSSL_CI_HACK=1"
      - mkdir -p build/alpine/v$BUILD_OS_VERSION/x86_64
      - mv *.apk build/alpine/v$BUILD_OS_VERSION/x86_64
  - name: deploy
    image: plugins/s3-sync
    depends_on:
      - focal
      - bionic
      - xenial
      - centos7
      - rhel7
      - "alpine3.9"
      - "alpine3.10"
      - "alpine3.11"
    settings:
      bucket:
        from_secret: AWS_BUCKET
      endpoint:
        from_secret: AWS_HOST
      access_key:
        from_secret: AWS_ACCESS_KEY_ID
      secret_key:
        from_secret: AWS_SECRET_ACCESS_KEY
      source: build/**/*
      strip_prefix: builds/
      path_style: true
      target: /
      delete: false
      acl:
        "*": public-read
  - name: update-packages
    depends_on:
      - deploy
    when:
      event:
        - tag
    image: appleboy/drone-ssh
    settings:
      host:
        from_secret: SSH_HOST
      username:
        from_secret: SSH_USERNAME
      key:
        from_secret: SSH_KEY
      port: 22
      script:
        - /usr/local/bin/update-apt-packages
        - /usr/local/bin/update-rpm-packages
        - /usr/local/bin/update-alpine-packages
  - name: matrix_notify
    image: plugins/matrix<commit_msg>Still wrong source<commit_after>---
kind: pipeline
type: docker
name: default

environment:
  DEFAULT_VERSION: 1.18.0
  DEFAULT_REVISION: 1

steps:
  - name: preflight
    image: python:3-alpine
    commands:
      - pip3 install semver
      - python3 genenv
      - echo $(uname -s):$(uname -r):$(uname -v):$(uname -m)
      - mkdir -p build/deb
      - mkdir -p build/alpine
      - mkdir -p build/rpm
  - name: focal
    image: charlesportwoodii/ubuntu:20.04-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: focal
      BUILD_OS: Ubuntu
      BUILD_OS_VERSION: "20.04"
    commands:
      - bash -lc "make build fpm_debian OPENSSL_CI_HACK=1"
      - mkdir -p build/deb/$BUILD_IMAGE
      - mv *$BUILD_IMAGE*.deb build/deb/$BUILD_IMAGE/
  - name: bionic
    image: charlesportwoodii/ubuntu:18.04-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: bionic
      BUILD_OS: Ubuntu
      BUILD_OS_VERSION: "18.04"
    commands:
      - bash -lc "make build fpm_debian OPENSSL_CI_HACK=1"
      - mkdir -p build/deb/$BUILD_IMAGE
      - mv *$BUILD_IMAGE*.deb build/deb/$BUILD_IMAGE/
  - name: xenial
    image: charlesportwoodii/ubuntu:16.04-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: xenial
      BUILD_OS: Ubuntu
      BUILD_OS_VERSION: "16.04"
    commands:
      - bash -lc "make build fpm_debian OPENSSL_CI_HACK=1"
      - mkdir -p build/deb/$BUILD_IMAGE
      - mv *$BUILD_IMAGE*.deb build/deb/$BUILD_IMAGE/
  - name: centos7
    image: charlesportwoodii/centos:7-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: centos7
      BUILD_OS: CentOS
      BUILD_OS_VERSION: "7"
    commands:
      - bash -lc "make build fpm_rpm OPENSSL_CI_HACK=1"
      - mkdir -p build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
      - mv *.rpm build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
  - name: rhel7
    image: charlesportwoodii/rhel:7-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: rhel7
      BUILD_OS: CentOS
      BUILD_OS_VERSION: "7"
    commands:
      - bash -lc "make build fpm_rpm OPENSSL_CI_HACK=1"
      - mkdir -p build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
      - mv *.rpm build/rpm/$BUILD_OS/$BUILD_OS_VERSION/x86_64
  - name: "alpine3.9"
    image: charlesportwoodii/alpine:3.9-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: "alpine3.9"
      BUILD_OS: Alpine
      BUILD_OS_VERSION: "3.9"
    commands:
      - bash -lc "make clean base openssl pcre nginx fpm_alpine OPENSSL_CI_HACK=1"
      - mkdir -p build/alpine/v$BUILD_OS_VERSION/x86_64
      - mv *.apk build/alpine/v$BUILD_OS_VERSION/x86_64
  - name: "alpine3.10"
    image: charlesportwoodii/alpine:3.10-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: "alpine3.10"
      BUILD_OS: Alpine
      BUILD_OS_VERSION: "3.10"
    commands:
      - bash -lc "make clean base openssl pcre nginx fpm_alpine OPENSSL_CI_HACK=1"
      - mkdir -p build/alpine/v$BUILD_OS_VERSION/x86_64
      - mv *.apk build/alpine/v$BUILD_OS_VERSION/x86_64
  - name: "alpine3.11"
    image: charlesportwoodii/alpine:3.11-build
    depends_on:
      - preflight
    environment:
      BUILD_IMAGE: "alpine3.11"
      BUILD_OS: Alpine
      BUILD_OS_VERSION: "3.11"
    commands:
      - bash -lc "make clean base openssl pcre nginx fpm_alpine OPENSSL_CI_HACK=1"
      - mkdir -p build/alpine/v$BUILD_OS_VERSION/x86_64
      - mv *.apk build/alpine/v$BUILD_OS_VERSION/x86_64
  - name: deploy
    image: plugins/s3-sync
    depends_on:
      - focal
      - bionic
      - xenial
      - centos7
      - rhel7
      - "alpine3.9"
      - "alpine3.10"
      - "alpine3.11"
    settings:
      bucket:
        from_secret: AWS_BUCKET
      endpoint:
        from_secret: AWS_HOST
      access_key:
        from_secret: AWS_ACCESS_KEY_ID
      secret_key:
        from_secret: AWS_SECRET_ACCESS_KEY
      source: build/
      path_style: true
      target: /
      delete: false
      acl:
        "*": public-read
  - name: update-packages
    depends_on:
      - deploy
    when:
      event:
        - tag
    image: appleboy/drone-ssh
    settings:
      host:
        from_secret: SSH_HOST
      username:
        from_secret: SSH_USERNAME
      key:
        from_secret: SSH_KEY
      port: 22
      script:
        - /usr/local/bin/update-apt-packages
        - /usr/local/bin/update-rpm-packages
        - /usr/local/bin/update-alpine-packages
  - name: matrix_notify
    image: plugins/matrix
{'fraction_non_alphanumeric': 0.0989313649884323, 'fraction_numerical': 0.029304836399691527, 'mean_word_length': 2.1998590059922454, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1289246', 'n_tokens_mistral': 3663, 'n_tokens_neox': 3311, 'n_words': 647}