From b93b0eb5d7fb9d6cd0a57282b9b0de8f2d2c9dd0 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sat, 6 Oct 2018 15:54:13 +0200 Subject: [PATCH 1/8] add aws deployment --- .gitlab-ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe22ab2..44da3bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,12 @@ image: python:2.7-stretch +variables: + S3_BUCKET_NAME: "wirelos" + stages: - - test - build - - production + - test + - deploy cache: key: ${CI_COMMIT_REF_SLUG} @@ -22,11 +25,14 @@ firmware: - pio run -t buildfs release: - stage: production + stage: deploy + image: python:latest script: + - pip install awscli - mkdir release - mv .pioenvs/build/firmware.bin release - mv .pioenvs/build/spiffs.bin release + - aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin" artifacts: paths: - release From 92bc03ec2157074cc5633d9cdd40fdbc2dd69e25 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sat, 6 Oct 2018 16:14:14 +0200 Subject: [PATCH 2/8] use digital ocean endpoint for s3 deployment --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44da3bb..0e13737 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ release: - mkdir release - mv .pioenvs/build/firmware.bin release - mv .pioenvs/build/spiffs.bin release - - aws s3 cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin" + - aws s3 --endpoint-url=https://$DO_SPACE_ENDPOINT cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin" artifacts: paths: - release From 3f0439a6837409f20e1037cf47a3b4b691e7d9d8 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sat, 6 Oct 2018 16:37:40 +0200 Subject: [PATCH 3/8] only deploy master --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e13737..fa15147 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ firmware: release: stage: deploy + only: master image: python:latest script: - pip install awscli From 226a72261b1600e3d210ea77e513bbe313b55c31 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sat, 6 Oct 2018 16:42:22 +0200 Subject: [PATCH 4/8] only deploy master --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa15147..df01916 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,8 @@ firmware: release: stage: deploy - only: master + only: + - master image: python:latest script: - pip install awscli From 42016b8e53952fe47e6d9409f05767cad6364f3c Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sun, 7 Oct 2018 11:55:13 +0200 Subject: [PATCH 5/8] ci --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df01916..06a1e73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,15 +26,15 @@ firmware: release: stage: deploy - only: - - master + only: + - /^release/.*$/ image: python:latest script: - pip install awscli - - mkdir release - - mv .pioenvs/build/firmware.bin release - - mv .pioenvs/build/spiffs.bin release + - mkdir ${CI_COMMIT_TAG} + - mv .pioenvs/build/firmware.bin ${CI_COMMIT_TAG} + - mv .pioenvs/build/spiffs.bin ${CI_COMMIT_TAG} - aws s3 --endpoint-url=https://$DO_SPACE_ENDPOINT cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin" artifacts: paths: - - release + - ${CI_COMMIT_TAG} From 61ff9f146a48d34e51735973f1e395e6f2becc24 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sun, 7 Oct 2018 12:07:25 +0200 Subject: [PATCH 6/8] ci --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06a1e73..f1b7c88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ variables: stages: - build - test - - deploy + - release cache: key: ${CI_COMMIT_REF_SLUG} @@ -25,9 +25,9 @@ firmware: - pio run -t buildfs release: - stage: deploy + stage: release only: - - /^release/.*$/ + - /^release-.*$/ image: python:latest script: - pip install awscli From 4e12242a1570f93688321da3b4f86788bc66077e Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sun, 7 Oct 2018 12:36:57 +0200 Subject: [PATCH 7/8] reduce pixel length --- data/pixelConfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/pixelConfig.json b/data/pixelConfig.json index 4a0d066..3b6fb38 100644 --- a/data/pixelConfig.json +++ b/data/pixelConfig.json @@ -1,6 +1,6 @@ { "pin": 4, - "length": 300, + "length": 32, "brightness": 64, "updateInterval": 50, "defaultColor": 100 From 7df62eb791250a8d54bb5940add709b144683f90 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sun, 7 Oct 2018 12:40:21 +0200 Subject: [PATCH 8/8] ci --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1b7c88..bbae196 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: python:2.7-stretch variables: S3_BUCKET_NAME: "wirelos" + PROJECT_NAME: "illucat" stages: - build @@ -31,10 +32,10 @@ release: image: python:latest script: - pip install awscli - - mkdir ${CI_COMMIT_TAG} - - mv .pioenvs/build/firmware.bin ${CI_COMMIT_TAG} - - mv .pioenvs/build/spiffs.bin ${CI_COMMIT_TAG} + - mkdir -p ${PROJECT_NAME}/${CI_COMMIT_TAG} + - mv .pioenvs/build/firmware.bin ${PROJECT_NAME}/${CI_COMMIT_TAG} + - mv .pioenvs/build/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: - - ${CI_COMMIT_TAG} + - ${PROJECT_NAME}/${CI_COMMIT_TAG}