--- name: jfa-go kind: pipeline type: docker steps: - name: fetch image: docker:git commands: - git fetch --tags - name: release image: golang:latest volumes: - name: ssh_key path: /id_rsa environment: BUILDRONE_KEY: from_secret: BUILDRONE_KEY GITHUB_TOKEN: from_secret: github_token commands: - apt-get update -y - apt-get install build-essential python3-pip curl software-properties-common sed upx gcc libgtk-3-dev libappindicator3-dev gcc-mingw-w64-x86-64 -y - (curl -sL https://deb.nodesource.com/setup_14.x | bash -) - apt-get install nodejs - curl -sL https://git.io/goreleaser > ../goreleaser - chmod +x ../goreleaser - ./scripts/version.sh ../goreleaser - wget https://builds.hrfee.pw/upload.py -P ../ - pip3 install requests - bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"' - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"' - bash -c 'python3 ../upload.py https://builds.hrfee.pw hrfee jfa-go --tag internal=true' volumes: - name: ssh_key host: path: /root/.ssh/id_rsa_packaging trigger: event: - tag --- name: docker-buildx kind: pipeline type: docker steps: - name: build-deploy image: appleboy/drone-ssh volumes: - name: ssh_key path: /root/drone_rsa settings: host: from_secret: ssh2_host username: from_secret: ssh2_username port: from_secret: ssh2_port volumes: - /root/.ssh/docker-build:/root/drone_rsa key_path: /root/drone_rsa command_timeout: 50m script: - /mnt/buildx/jfa-go/build.sh stable - wget https://builds.hrfee.pw/upload.py -O /mnt/buildx/jfa-go/jfa-go/upload.py - pip3 install requests - bash -c 'cd /mnt/buildx/jfa-go/jfa-go && BUILDRONE_KEY=$(cat /mnt/buildx/jfa-go/key) python3 upload.py https://builds.hrfee.pw hrfee jfa-go --tag docker-stable=true' - rm -f /mnt/buildx/jfa-go/jfa-go/upload.py trigger: event: - tag volumes: - name: ssh_key host: path: /root/.ssh/docker-build --- name: jfa-go-git kind: pipeline type: docker steps: - name: build image: golang:latest volumes: - name: ssh_key path: /id_rsa commands: - apt-get update -y - apt-get install build-essential python3-pip curl software-properties-common sed upx gcc libgtk-3-dev libappindicator3-dev gcc-mingw-w64-x86-64 -y - (curl -sL https://deb.nodesource.com/setup_14.x | bash -) - apt-get install nodejs - curl -sL https://git.io/goreleaser > goreleaser - chmod +x goreleaser - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist - wget https://builds.hrfee.pw/upload.py - pip3 install requests - bash -c 'sftp -P 2022 -i /id_rsa -o StrictHostKeyChecking=no root@161.97.102.153:/repo/incoming <<< $"put dist/*.deb"' - bash -c 'ssh -i /id_rsa root@161.97.102.153 -p 2022 "repo-process-deb trusty"' - bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip ./dist/*.deb ./dist/*.rpm ./dist/*.apk --tag internal-git=true' environment: BUILDRONE_KEY: from_secret: BUILDRONE_KEY volumes: - name: ssh_key host: path: /root/.ssh/id_rsa_packaging trigger: branch: - main - go1.16 event: exclude: - pull_request --- name: docker-buildx-unstable kind: pipeline type: docker steps: - name: build-deploy image: appleboy/drone-ssh volumes: - name: ssh_key path: /root/drone_rsa settings: host: from_secret: ssh2_host username: from_secret: ssh2_username port: from_secret: ssh2_port volumes: - /root/.ssh/docker-build:/root/drone_rsa key_path: /root/drone_rsa command_timeout: 50m script: - /mnt/buildx/jfa-go/build.sh - wget https://builds.hrfee.pw/upload.py -O /mnt/buildx/jfa-go/jfa-go/upload.py - pip3 install requests - bash -c 'cd /mnt/buildx/jfa-go/jfa-go && BUILDRONE_KEY=$(cat /mnt/buildx/jfa-go/key) python3 upload.py https://builds.hrfee.pw hrfee jfa-go --tag docker-unstable=true' - rm -f /mnt/buildx/jfa-go/jfa-go/upload.py trigger: branch: - main event: exclude: - pull_request volumes: - name: ssh_key host: path: /root/.ssh/docker-build --- name: jfa-go-pr kind: pipeline type: docker steps: - name: build image: golang:latest commands: - apt-get update -y - apt-get install build-essential python3-pip curl software-properties-common sed upx gcc libgtk-3-dev libappindicator3-dev gcc-mingw-w64-x86-64 -y - (curl -sL https://deb.nodesource.com/setup_14.x | bash -) - apt-get install nodejs - curl -sL https://git.io/goreleaser > goreleaser - chmod +x goreleaser - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist trigger: event: include: - pull_request