kind: pipeline name: Build and Test environment: CARGO_TARGET_DIR: /drone/src/target CARGO_BUILD_TARGET_DIR: /drone/src/target steps: - name: restore-cache image: plugins/s3-cache settings: path: /tdbcache filename: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar pull: true endpoint: from_secret: MIO_WWW access_key: from_secret: MIO_ACCESS secret_key: from_secret: MIO_KEY restore: true - name: run-tests image: rust commands: - cargo test --verbose -j 10 - name: build-docker-binary image: rust commands: - cargo build --release -j 10 when: ref: - refs/heads/next - refs/tags/* event: - tag - push - name: push-docker-image image: plugins/docker settings: repo: Skytable/sdb username: from_secret: docker_username password: from_secret: docker_password auto_tag: true filename: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar when: ref: - refs/heads/next - refs/tags/* event: - tag - push - name: rebuild-cache image: plugins/s3-cache settings: path: /tdbcache pull: true endpoint: from_secret: MIO_WWW access_key: from_secret: MIO_ACCESS secret_key: from_secret: MIO_KEY rebuild: true filename: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar mount: - target - name: flush-cache image: plugins/s3-cache settings: path: /tdbcache flush_path: /tdbcache/flush/${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} pull: true endpoint: from_secret: MIO_WWW access_key: from_secret: MIO_ACCESS secret_key: from_secret: MIO_KEY flush: true flush_age: 30 filename: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar