kind: pipeline type: kubernetes name: pepebot_build_amd64 platform: os: linux arch: amd64 steps: - name: build-pepebot image: golang:1.16.4 volumes: - name: build path: /drone/src/build environment: CGO_ENABLED: 0 GOOS: linux commands: - go build -a -installsuffix cgo -o ./build/app ./discord - name: build-publish-image image: plugins/docker privileged: true volumes: - name: build path: /drone/src/build settings: cache_from: - "dutchellie/pepebot:latest" username: from_secret: docker_username password: from_secret: docker_password dockerfile: Dockerfile repo: dutchellie/pepebot tags: - latest-amd64 volumes: - name: build temp: {} --- kind: pipeline type: kubernetes name: pepebot_service_build_amd64 platform: os: linux arch: amd64 steps: - name: build-pepebot_service image: golang:1.17 volumes: - name: build path: /drone/src/build environment: CGO_ENABLED: 0 GOOS: linux commands: - cd ./pepeservice - go build -a -installsuffix cgo -o ../build/app . - name: build-service image: plugins/docker privileged: true volumes: - name: build path: /drone/src/build settings: cache_from: - "dutchellie/pepebot_service:latest" username: from_secret: docker_username password: from_secret: docker_password dockerfile: pepeservice/Dockerfile repo: dutchellie/pepebot_service tags: - latest-amd64 volumes: - name: build temp: {} --- kind: pipeline type: docker name: pepebot_build_arm64 platform: os: linux arch: arm64 steps: - name: build-pepebot image: golang:1.16.4 volumes: - name: build path: /drone/src/build environment: CGO_ENABLED: 0 GOOS: linux commands: - go build -a -installsuffix cgo -o ./build/app ./discord - name: build-publish-image image: plugins/docker privileged: true volumes: - name: build path: /drone/src/build settings: cache_from: - "dutchellie/pepebot:latest" username: from_secret: docker_username password: from_secret: docker_password dockerfile: Dockerfile repo: dutchellie/pepebot tags: - latest-arm64 volumes: - name: build temp: {} --- kind: pipeline type: docker name: pepebot_service_build_arm64 platform: os: linux arch: arm64 steps: - name: build-pepebot_service image: golang:1.17 volumes: - name: build path: /drone/src/build environment: CGO_ENABLED: 0 GOOS: linux commands: - cd ./pepeservice - go build -a -installsuffix cgo -o ../build/app . - name: build-service image: plugins/docker privileged: true volumes: - name: build path: /drone/src/build settings: cache_from: - "dutchellie/pepebot_service:latest" username: from_secret: docker_username password: from_secret: docker_password dockerfile: pepeservice/Dockerfile repo: dutchellie/pepebot_service tags: - latest-arm64 volumes: - name: build temp: {} --- kind: pipeline type: kubernetes name: manifest steps: - name: manifest-main image: plugins/manifest settings: platforms: - linux/amd64 - linux/arm64 target: dutchellie/pepebot:latest template: dutchellie/pepebot:latest-ARCH username: from_secret: docker_username password: from_secret: docker_password - name: manifest-pepebotservice image: plugins/manifest settings: platforms: - linux/amd64 - linux/arm64 target: dutchellie/pepebot_service:latest template: dutchellie/pepebot_service:latest-ARCH username: from_secret: docker_username password: from_secret: docker_password depends_on: - pepebot_build_arm64 - pepebot_build_amd64 - pepebot_service_build_arm64 - pepebot_service_build_amd64 --- kind: pipeline type: kubernetes name: deploy_on_pi trigger: branch: - main steps: - name: deploy image: appleboy/drone-ssh settings: host: home.dutchellie.nl port: 223 username: ellie key: from_secret: ssh_key script: - cd /home/ellie/pepebot - docker-compose pull app - docker-compose pull pepe_service - docker-compose up -d depends_on: - manifest