kind: pipeline name: testing workspace: base: /home/cirrus/app clone: depth: 50 # Only run on prs or pushes to master trigger: branch: include: - master event: include: - push - pull_request steps: - name: build image: cirrusci/flutter:stable pull: true commands: - sudo chown cirrus . -R # The clone step clones everything as root, this is our "fix" until we find a better solution - flutter packages get - make format-check - make build-debug - name: test image: vikunja/flutter-build pull: true commands: - flutter packages get - make test --- kind: pipeline name: release-latest depends_on: - testing trigger: branch: - master event: - push workspace: base: /home/cirrus/app clone: depth: 50 steps: # Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible. - name: build image: cirrusci/flutter:stable pull: true commands: - sudo chown cirrus . -R # The clone step clones everything as root, this is our "fix" until we find a better solution - flutter packages get - make build-all - mkdir apks - mv build/app/outputs/apk/*/*/*.apk apks # Push the releases to our pseudo-s3-bucket - name: release image: plugins/s3:1 pull: true settings: bucket: vikunja-app access_key: from_secret: aws_access_key_id secret_key: from_secret: aws_secret_access_key endpoint: https://storage.kolaente.de path_style: true strip_prefix: apks/ source: apks/* target: /master --- kind: pipeline name: release-version depends_on: - testing trigger: event: - tag workspace: base: /home/cirrus/app clone: depth: 50 steps: # Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible. - name: build image: cirrusci/flutter:stable pull: true commands: - sudo chown cirrus . -R # The clone step clones everything as root, this is our "fix" until we find a better solution - flutter packages get - make build-all - mkdir apks - mv build/app/outputs/apk/*/*/*.apk apks # Push the releases to our pseudo-s3-bucket - name: release image: plugins/s3:1 pull: true settings: bucket: vikunja-app access_key: from_secret: aws_access_key_id secret_key: from_secret: aws_secret_access_key endpoint: https://storage.kolaente.de path_style: true strip_prefix: apks/ source: apks/* target: /${DRONE_TAG##v}