From ff7d1cbd05f4017b7f0cef966bc2c15c8d46ba2c Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 26 Feb 2024 10:43:44 -0800 Subject: [PATCH] Add new upload-nightlies step --- .drone.yml | 27 +++++++++++++++++++++++---- upload-releases.sh | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7d319511..5fee50a0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -114,8 +114,28 @@ steps: - flutter test --coverage - genhtml coverage/lcov.info -o coverage/html + - name: upload-nightlies + image: openpriv/flutter-desktop:linux-fstable-3.13.4 + environment: + BUILDFILES_KEY: + from_secret: buildfiles_key + volumes: + - name: deps + path: /root/.pub-cache + when: + event: push + status: [ success ] + commands: + - echo $BUILDFILES_KEY > ~/id_rsab64 + - base64 -d ~/id_rsab64 > ~/id_rsa + - chmod 400 ~/id_rsa + # TODO When we update Flutter Container to 3.19 migrate these calls... + - apt update + - apt install -y jq openssh-client ca-certificates curl + - ./uploaded-releases.sh deploy/cwtch-`cat VERSION`.apk application/vnd.android.package-archive + - name: deploy-buildfiles - image: openpriv/drone-gogs + image: kroniak/ssh-client pull: if-not-exists environment: BUILDFILES_KEY: @@ -129,9 +149,6 @@ steps: - base64 -d ~/id_rsab64 > ~/id_rsa - chmod 400 ~/id_rsa - export DIR=flwtch-`cat COMMIT_DATE`-`cat VERSION` - - ./gen-nightly-index.sh $DIR - - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa cwtch-nightly.html buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ - - ./uploaded-releases.sh deploy/cwtch-`cat VERSION`.apk application/vnd.android.package-archive - mv deploy $DIR - cp -r coverage/html $DIR/coverage-tests - cp -r test/failures $DIR/test-failures || true @@ -140,6 +157,8 @@ steps: - mv ./../sha512s.txt . - cd .. - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ + - ./gen-nightly-index.sh $DIR + - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa cwtch-nightly.html buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ - name: notify-gogs image: openpriv/drone-gogs diff --git a/upload-releases.sh b/upload-releases.sh index f9759164..1c19191f 100755 --- a/upload-releases.sh +++ b/upload-releases.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash VERSION=$(cat VERSION) echo "Grabbing Release Data From:" "https://git.openprivacy.ca/api/v1/repos/$DRONE_REPO/releases/tags/$VERSION"