Files
sprocket-device-illucat/.gitlab-ci.yml
Patrick Balsiger 7c1db449b6 Update CI pipeline
2019-06-30 22:21:45 +02:00

41 lines
868 B
YAML

image: python:2.7-stretch
variables:
S3_BUCKET_NAME: "wirelos"
PROJECT_NAME: "illucat"
stages:
- build
- test
- release
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .pioenvs/
firmware:
stage: build
image: python:2.7-stretch
before_script:
- pip install -U platformio
script:
- pio run -t clean
- pio run
- pio run -t buildfs
release:
stage: release
only:
- /^release-.*$/
image: python:latest
script:
- pip install awscli
- mkdir -p ${PROJECT_NAME}/${CI_COMMIT_TAG}
- mv .pioenvs/release/firmware.bin ${PROJECT_NAME}/${CI_COMMIT_TAG}
- mv .pioenvs/release/spiffs.bin ${PROJECT_NAME}/${CI_COMMIT_TAG}
- aws s3 --endpoint-url=https://$DO_SPACE_ENDPOINT cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin"
artifacts:
paths:
- ${PROJECT_NAME}/${CI_COMMIT_TAG}