chore(CI): Build firmware images as release artifacts.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8ea89a149c
commit
c97a452bb6
3 changed files with 358 additions and 357 deletions
708
.drone.yml
708
.drone.yml
|
@ -3,380 +3,380 @@ type: docker
|
||||||
name: build
|
name: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restore ASDF cache
|
- name: restore ASDF cache
|
||||||
image: meltwater/drone-cache
|
image: meltwater/drone-cache
|
||||||
pull: "always"
|
pull: "always"
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: ACCESS_KEY_ID
|
from_secret: ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: SECRET_ACCESS_KEY
|
from_secret: SECRET_ACCESS_KEY
|
||||||
AWS_PLUGIN_PATH_STYLE: true
|
AWS_PLUGIN_PATH_STYLE: true
|
||||||
settings:
|
settings:
|
||||||
restore: true
|
restore: true
|
||||||
endpoint:
|
endpoint:
|
||||||
from_secret: S3_ENDPOINT
|
from_secret: S3_ENDPOINT
|
||||||
bucket:
|
bucket:
|
||||||
from_secret: CACHE_BUCKET
|
from_secret: CACHE_BUCKET
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
path-style: true
|
path-style: true
|
||||||
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
||||||
mount:
|
mount:
|
||||||
- .asdf
|
- .asdf
|
||||||
|
|
||||||
- name: restore build cache
|
- name: restore build cache
|
||||||
image: meltwater/drone-cache
|
image: meltwater/drone-cache
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: ACCESS_KEY_ID
|
from_secret: ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: SECRET_ACCESS_KEY
|
from_secret: SECRET_ACCESS_KEY
|
||||||
AWS_PLUGIN_PATH_STYLE: true
|
AWS_PLUGIN_PATH_STYLE: true
|
||||||
settings:
|
settings:
|
||||||
restore: true
|
restore: true
|
||||||
endpoint:
|
endpoint:
|
||||||
from_secret: S3_ENDPOINT
|
from_secret: S3_ENDPOINT
|
||||||
bucket:
|
bucket:
|
||||||
from_secret: CACHE_BUCKET
|
from_secret: CACHE_BUCKET
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
path-style: true
|
path-style: true
|
||||||
cache_key: 'elixir-{{ checksum "mix.lock" }}-{{ checksum ".tool-versions" }}'
|
cache_key: 'elixir-{{ checksum "mix.lock" }}-{{ checksum ".tool-versions" }}'
|
||||||
mount:
|
mount:
|
||||||
- deps
|
- deps
|
||||||
- _build
|
- _build
|
||||||
- .hex
|
- .hex
|
||||||
- .mix
|
- .mix
|
||||||
- .rebar3
|
- .rebar3
|
||||||
- .nerves
|
- .nerves
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
pull: "always"
|
pull: "always"
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
ASDF_DIR: /root/.asdf
|
ASDF_DIR: /root/.asdf
|
||||||
depends_on:
|
depends_on:
|
||||||
- restore ASDF cache
|
- restore ASDF cache
|
||||||
- restore build cache
|
- restore build cache
|
||||||
commands:
|
commands:
|
||||||
- asdf_install
|
- asdf_install
|
||||||
- rm -rf .asdf/downloads
|
- rm -rf .asdf/downloads
|
||||||
- . $ASDF_DIR/asdf.sh
|
- . $ASDF_DIR/asdf.sh
|
||||||
- mix local.hex --if-missing --force
|
- mix local.hex --if-missing --force
|
||||||
- mix local.rebar --if-missing --force
|
- mix local.rebar --if-missing --force
|
||||||
- mix archive.install hex nerves_bootstrap --force
|
- mix archive.install hex nerves_bootstrap --force
|
||||||
- mix deps.get
|
- mix deps.get
|
||||||
- mix deps.compile
|
- mix deps.compile
|
||||||
- mix dialyzer --plt
|
- mix dialyzer --plt
|
||||||
|
|
||||||
- name: store ASDF cache
|
- name: store ASDF cache
|
||||||
image: meltwater/drone-cache
|
image: meltwater/drone-cache
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: ACCESS_KEY_ID
|
from_secret: ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: SECRET_ACCESS_KEY
|
from_secret: SECRET_ACCESS_KEY
|
||||||
AWS_PLUGIN_PATH_STYLE: true
|
AWS_PLUGIN_PATH_STYLE: true
|
||||||
depends_on:
|
depends_on:
|
||||||
- install dependencies
|
- install dependencies
|
||||||
settings:
|
settings:
|
||||||
rebuild: true
|
rebuild: true
|
||||||
override: false
|
override: false
|
||||||
endpoint:
|
endpoint:
|
||||||
from_secret: S3_ENDPOINT
|
from_secret: S3_ENDPOINT
|
||||||
bucket:
|
bucket:
|
||||||
from_secret: CACHE_BUCKET
|
from_secret: CACHE_BUCKET
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
path-style: true
|
path-style: true
|
||||||
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
|
||||||
mount:
|
mount:
|
||||||
- .asdf
|
- .asdf
|
||||||
|
|
||||||
- name: store build cache
|
- name: store build cache
|
||||||
image: meltwater/drone-cache
|
image: meltwater/drone-cache
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: ACCESS_KEY_ID
|
from_secret: ACCESS_KEY_ID
|
||||||
AWS_SECRET_ACCESS_KEY:
|
AWS_SECRET_ACCESS_KEY:
|
||||||
from_secret: SECRET_ACCESS_KEY
|
from_secret: SECRET_ACCESS_KEY
|
||||||
AWS_PLUGIN_PATH_STYLE: true
|
AWS_PLUGIN_PATH_STYLE: true
|
||||||
depends_on:
|
depends_on:
|
||||||
- install dependencies
|
- install dependencies
|
||||||
settings:
|
settings:
|
||||||
rebuild: true
|
rebuild: true
|
||||||
override: false
|
override: false
|
||||||
endpoint:
|
endpoint:
|
||||||
from_secret: S3_ENDPOINT
|
from_secret: S3_ENDPOINT
|
||||||
bucket:
|
bucket:
|
||||||
from_secret: CACHE_BUCKET
|
from_secret: CACHE_BUCKET
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
path-style: true
|
path-style: true
|
||||||
cache_key: 'elixir-{{ checksum "mix.lock" }}-{{ checksum ".tool-versions" }}'
|
cache_key: 'elixir-{{ checksum "mix.lock" }}-{{ checksum ".tool-versions" }}'
|
||||||
mount:
|
mount:
|
||||||
- deps
|
- deps
|
||||||
- _build
|
- _build
|
||||||
- .hex
|
- .hex
|
||||||
- .mix
|
- .mix
|
||||||
- .rebar3
|
- .rebar3
|
||||||
- .nerves
|
- .nerves
|
||||||
|
|
||||||
- name: mix compile
|
- name: mix compile
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- install dependencies
|
- install dependencies
|
||||||
commands:
|
commands:
|
||||||
- asdf mix compile --warnings-as-errors
|
- asdf mix compile --warnings-as-errors
|
||||||
|
|
||||||
- name: mix test
|
- name: mix test
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- asdf mix test
|
- asdf mix test
|
||||||
|
|
||||||
- name: mix credo
|
- name: mix credo
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- asdf mix credo --strict
|
- asdf mix credo --strict
|
||||||
|
|
||||||
- name: mix hex.audit
|
- name: mix hex.audit
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- asdf mix hex.audit
|
- asdf mix hex.audit
|
||||||
|
|
||||||
- name: mix format
|
- name: mix format
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- asdf mix format --check-formatted
|
- asdf mix format --check-formatted
|
||||||
|
|
||||||
- name: mix deps.unlock
|
- name: mix deps.unlock
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- asdf mix deps.unlock --check-unused
|
- asdf mix deps.unlock --check-unused
|
||||||
|
|
||||||
- name: mix doctor
|
- name: mix doctor
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- asdf mix doctor --full
|
- asdf mix doctor --full
|
||||||
|
|
||||||
- name: mix git_ops.check_message
|
- name: mix git_ops.check_message
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix compile
|
- mix compile
|
||||||
commands:
|
commands:
|
||||||
- git log -1 --format=%s > .last_commit_message
|
- git log -1 --format=%s > .last_commit_message
|
||||||
- asdf mix git_ops.check_message .last_commit_message
|
- asdf mix git_ops.check_message .last_commit_message
|
||||||
|
|
||||||
- name: mix git_ops.release
|
- name: mix git_ops.release
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix test
|
- mix test
|
||||||
- mix credo
|
- mix credo
|
||||||
- mix hex.audit
|
- mix hex.audit
|
||||||
- mix format
|
- mix format
|
||||||
- mix deps.unlock
|
- mix deps.unlock
|
||||||
- mix doctor
|
- mix doctor
|
||||||
- mix git_ops.check_message
|
- mix git_ops.check_message
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
ASDF_DIR: /root/.asdf
|
ASDF_DIR: /root/.asdf
|
||||||
DRONE_TOKEN:
|
DRONE_TOKEN:
|
||||||
from_secret: DRONE_TOKEN
|
from_secret: DRONE_TOKEN
|
||||||
commands:
|
commands:
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
- . $ASDF_DIR/asdf.sh
|
- . $ASDF_DIR/asdf.sh
|
||||||
- mix git_ops.project_info --format=shell > before.env
|
- mix git_ops.project_info --format=shell > before.env
|
||||||
- mix git_ops.release --yes --no-major || true
|
- mix git_ops.release --yes --no-major || true
|
||||||
- mix git_ops.project_info --format=shell > after.env
|
- mix git_ops.project_info --format=shell > after.env
|
||||||
- . ./before.env
|
- . ./before.env
|
||||||
- export OLD_APP_VERSION=$${APP_VERSION}
|
- export OLD_APP_VERSION=$${APP_VERSION}
|
||||||
- . ./after.env
|
- . ./after.env
|
||||||
- export NEW_APP_VERSION=$${APP_VERSION}
|
- export NEW_APP_VERSION=$${APP_VERSION}
|
||||||
- if [ "v$${OLD_APP_VERSION}" != "v$${NEW_APP_VERSION}" ]; then
|
- if [ "v$${OLD_APP_VERSION}" != "v$${NEW_APP_VERSION}" ]; then
|
||||||
- export GIT_URL=$(echo $DRONE_GIT_HTTP_URL | sed -e "s/:\\/\\//:\\/\\/$DRONE_REPO_OWNER:$DRONE_TOKEN@/")
|
- export GIT_URL=$(echo $DRONE_GIT_HTTP_URL | sed -e "s/:\\/\\//:\\/\\/$DRONE_REPO_OWNER:$DRONE_TOKEN@/")
|
||||||
- git push $${GIT_URL} "HEAD:${DRONE_COMMIT_REF}" "refs/tags/v$${NEW_APP_VERSION}"
|
- git push $${GIT_URL} "HEAD:${DRONE_COMMIT_REF}" "refs/tags/v$${NEW_APP_VERSION}"
|
||||||
- fi
|
- fi
|
||||||
|
|
||||||
- name: build artifacts
|
- name: build artifacts
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
refs:
|
refs:
|
||||||
include:
|
include:
|
||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
depends_on:
|
depends_on:
|
||||||
- mix test
|
- mix test
|
||||||
- mix credo
|
- mix credo
|
||||||
- mix hex.audit
|
- mix hex.audit
|
||||||
- mix format
|
- mix format
|
||||||
- mix deps.unlock
|
- mix deps.unlock
|
||||||
- mix doctor
|
- mix doctor
|
||||||
- mix git_ops.check_message
|
- mix git_ops.check_message
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
ASDF_DIR: /root/.asdf
|
ASDF_DIR: /root/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
commands:
|
commands:
|
||||||
- . $ASDF_DIR/asdf.sh
|
- . $ASDF_DIR/asdf.sh
|
||||||
- mix git_ops.project_info --format=shell > app.env
|
- mix git_ops.project_info --format=shell > app.env
|
||||||
- . ./app.env
|
- . ./app.env
|
||||||
- mkdir artifacts
|
- mkdir artifacts
|
||||||
- mix hex.build -o "artifacts/$${APP_NAME}-$${APP_VERSION}-pkg.tar"
|
- mix hex.build -o "artifacts/$${APP_NAME}-$${APP_VERSION}-pkg.tar"
|
||||||
- gzip "artifacts/$${APP_NAME}-$${APP_VERSION}-pkg.tar"
|
- gzip "artifacts/$${APP_NAME}-$${APP_VERSION}-pkg.tar"
|
||||||
- mix docs
|
- mix docs
|
||||||
- tar zcvf "artifacts/$${APP_NAME}-$${APP_VERSION}-docs.tar.gz" doc/
|
- tar zcvf "artifacts/$${APP_NAME}-$${APP_VERSION}-docs.tar.gz" doc/
|
||||||
- git tag -l --format='%(contents:subject)' v$${APP_VERSION} > tag_subject
|
- git tag -l --format='%(contents:subject)' v$${APP_VERSION} > tag_subject
|
||||||
- git tag -l --format='%(contents:body)' v$${APP_VERSION} > tag_body
|
- git tag -l --format='%(contents:body)' v$${APP_VERSION} > tag_body
|
||||||
|
- MIX_TARGET=x86_64 mix firmware.image && mv $${APP_NAME}.img artifacts/$${APP_NAME}-$${APP_VERSION}-x86_64.img
|
||||||
|
- MIX_TARGET=rpi4 mix firmware.image && mv $${APP_NAME}.img artifacts/$${APP_NAME}-$${APP_VERSION}-rpi4.img
|
||||||
|
|
||||||
- name: gitea release
|
- name: gitea release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
refs:
|
refs:
|
||||||
include:
|
include:
|
||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
depends_on:
|
depends_on:
|
||||||
- build artifacts
|
- build artifacts
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: DRONE_TOKEN
|
from_secret: DRONE_TOKEN
|
||||||
base_url: https://code.harton.nz
|
base_url: https://code.harton.nz
|
||||||
files: artifacts/*.tar.gz
|
files: artifacts/*.tar.gz
|
||||||
checksum: sha256
|
checksum: sha256
|
||||||
title: tag_subject
|
|
||||||
note: tag_body
|
|
||||||
|
|
||||||
- name: docs release
|
- name: docs release
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
refs:
|
refs:
|
||||||
include:
|
include:
|
||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
image: minio/mc
|
image: minio/mc
|
||||||
environment:
|
environment:
|
||||||
S3_ENDPOINT:
|
S3_ENDPOINT:
|
||||||
from_secret: S3_ENDPOINT
|
from_secret: S3_ENDPOINT
|
||||||
ACCESS_KEY:
|
ACCESS_KEY:
|
||||||
from_secret: ACCESS_KEY_ID
|
from_secret: ACCESS_KEY_ID
|
||||||
SECRET_KEY:
|
SECRET_KEY:
|
||||||
from_secret: SECRET_ACCESS_KEY
|
from_secret: SECRET_ACCESS_KEY
|
||||||
depends_on:
|
depends_on:
|
||||||
- build artifacts
|
- build artifacts
|
||||||
commands:
|
commands:
|
||||||
- mc alias set store $${S3_ENDPOINT} $${ACCESS_KEY} $${SECRET_KEY}
|
- mc alias set store $${S3_ENDPOINT} $${ACCESS_KEY} $${SECRET_KEY}
|
||||||
- mc mb -p store/docs.harton.nz
|
- mc mb -p store/docs.harton.nz
|
||||||
- mc anonymous set download store/docs.harton.nz
|
- mc anonymous set download store/docs.harton.nz
|
||||||
- mc mirror --overwrite doc/ store/docs.harton.nz/$${DRONE_REPO}/$${DRONE_TAG}
|
- mc mirror --overwrite doc/ store/docs.harton.nz/$${DRONE_REPO}/$${DRONE_TAG}
|
||||||
- mc mirror --overwrite doc/ store/docs.harton.nz/$${DRONE_REPO}
|
- mc mirror --overwrite doc/ store/docs.harton.nz/$${DRONE_REPO}
|
||||||
|
|
||||||
- name: hex release
|
- name: hex release
|
||||||
image: code.harton.nz/james/asdf_container:latest
|
image: code.harton.nz/james/asdf_container:latest
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
refs:
|
refs:
|
||||||
include:
|
include:
|
||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
depends_on:
|
depends_on:
|
||||||
- build artifacts
|
- build artifacts
|
||||||
environment:
|
environment:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
HEX_HOME: /drone/src/.hex
|
HEX_HOME: /drone/src/.hex
|
||||||
MIX_HOME: /drone/src/.mix
|
MIX_HOME: /drone/src/.mix
|
||||||
REBAR_BASE_DIR: /drone/src/.rebar3
|
REBAR_BASE_DIR: /drone/src/.rebar3
|
||||||
ASDF_DATA_DIR: /drone/src/.asdf
|
ASDF_DATA_DIR: /drone/src/.asdf
|
||||||
ASDF_DIR: /root/.asdf
|
ASDF_DIR: /root/.asdf
|
||||||
XDG_DATA_HOME: /drone/src/.nerves
|
XDG_DATA_HOME: /drone/src/.nerves
|
||||||
HEX_API_KEY:
|
HEX_API_KEY:
|
||||||
from_secret: HEX_API_KEY
|
from_secret: HEX_API_KEY
|
||||||
commands:
|
commands:
|
||||||
- . $ASDF_DIR/asdf.sh
|
- . $ASDF_DIR/asdf.sh
|
||||||
- mix hex.publish --yes --dry-run
|
- mix hex.publish --yes --dry-run
|
||||||
|
|
3
mix.exs
3
mix.exs
|
@ -51,7 +51,8 @@ defmodule BivouacNerves.MixProject do
|
||||||
{:bivouac_system_x86_64,
|
{:bivouac_system_x86_64,
|
||||||
git: "https://code.harton.nz/bivouac/bivouac_system_x86_64",
|
git: "https://code.harton.nz/bivouac/bivouac_system_x86_64",
|
||||||
runtime: false,
|
runtime: false,
|
||||||
targets: :x86_64},
|
targets: :x86_64,
|
||||||
|
tag: "v0.1.3"},
|
||||||
|
|
||||||
# Dev/test deps
|
# Dev/test deps
|
||||||
|
|
||||||
|
|
4
mix.lock
4
mix.lock
|
@ -1,6 +1,6 @@
|
||||||
%{
|
%{
|
||||||
"beam_notify": {:hex, :beam_notify, "1.1.0", "4ce38e27460a3c03b6f77c10c6f31458b035ebb1035cd52d4b3e771311837dba", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "8547a310702bfcea0e401534398617b940808ff6ad10c43dddc85c169de7b9cc"},
|
"beam_notify": {:hex, :beam_notify, "1.1.0", "4ce38e27460a3c03b6f77c10c6f31458b035ebb1035cd52d4b3e771311837dba", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "8547a310702bfcea0e401534398617b940808ff6ad10c43dddc85c169de7b9cc"},
|
||||||
"bivouac_system_x86_64": {:git, "https://code.harton.nz/bivouac/bivouac_system_x86_64", "e5fb83381d6273500d077e745cf8b9df96d2fcaa", []},
|
"bivouac_system_x86_64": {:git, "https://code.harton.nz/bivouac/bivouac_system_x86_64", "e5fb83381d6273500d077e745cf8b9df96d2fcaa", [tag: "v0.1.3"]},
|
||||||
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
|
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
|
||||||
"castore": {:hex, :castore, "1.0.4", "ff4d0fb2e6411c0479b1d965a814ea6d00e51eb2f58697446e9c41a97d940b28", [:mix], [], "hexpm", "9418c1b8144e11656f0be99943db4caf04612e3eaecefb5dae9a2a87565584f8"},
|
"castore": {:hex, :castore, "1.0.4", "ff4d0fb2e6411c0479b1d965a814ea6d00e51eb2f58697446e9c41a97d940b28", [:mix], [], "hexpm", "9418c1b8144e11656f0be99943db4caf04612e3eaecefb5dae9a2a87565584f8"},
|
||||||
"circular_buffer": {:hex, :circular_buffer, "0.4.1", "477f370fd8cfe1787b0a1bade6208bbd274b34f1610e41f1180ba756a7679839", [:mix], [], "hexpm", "633ef2e059dde0d7b89bbab13b1da9d04c6685e80e68fbdf41282d4fae746b72"},
|
"circular_buffer": {:hex, :circular_buffer, "0.4.1", "477f370fd8cfe1787b0a1bade6208bbd274b34f1610e41f1180ba756a7679839", [:mix], [], "hexpm", "633ef2e059dde0d7b89bbab13b1da9d04c6685e80e68fbdf41282d4fae746b72"},
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"mdns_lite": {:hex, :mdns_lite, "0.8.8", "e455f4d99dc708a9996ae8559f2893429ef39f0ca7d84ee63ce0e4b2f6a00a3f", [:mix], [{:vintage_net, "~> 0.7", [hex: :vintage_net, repo: "hexpm", optional: true]}], "hexpm", "221badb8e7b2a725ef642dc6121a61d8bfb7bad2a70afcc97bce6c9c7ce3c47c"},
|
"mdns_lite": {:hex, :mdns_lite, "0.8.8", "e455f4d99dc708a9996ae8559f2893429ef39f0ca7d84ee63ce0e4b2f6a00a3f", [:mix], [{:vintage_net, "~> 0.7", [hex: :vintage_net, repo: "hexpm", optional: true]}], "hexpm", "221badb8e7b2a725ef642dc6121a61d8bfb7bad2a70afcc97bce6c9c7ce3c47c"},
|
||||||
"mix_audit": {:hex, :mix_audit, "2.1.1", "653aa6d8f291fc4b017aa82bdb79a4017903902ebba57960ef199cbbc8c008a1", [:make, :mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.9", [hex: :yaml_elixir, repo: "hexpm", optional: false]}], "hexpm", "541990c3ab3a7bb8c4aaa2ce2732a4ae160ad6237e5dcd5ad1564f4f85354db1"},
|
"mix_audit": {:hex, :mix_audit, "2.1.1", "653aa6d8f291fc4b017aa82bdb79a4017903902ebba57960ef199cbbc8c008a1", [:make, :mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.9", [hex: :yaml_elixir, repo: "hexpm", optional: false]}], "hexpm", "541990c3ab3a7bb8c4aaa2ce2732a4ae160ad6237e5dcd5ad1564f4f85354db1"},
|
||||||
"muontrap": {:hex, :muontrap, "1.3.2", "8942689f0727160d97d61ff25156fb35b7a10e4e925c88378a69a4041cc04257", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "e29715dafdd8184c68516bad103ba1d58c7b3a7e1f5311fbf75c1d617caefa56"},
|
"muontrap": {:hex, :muontrap, "1.3.2", "8942689f0727160d97d61ff25156fb35b7a10e4e925c88378a69a4041cc04257", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "e29715dafdd8184c68516bad103ba1d58c7b3a7e1f5311fbf75c1d617caefa56"},
|
||||||
"nerves": {:git, "https://github.com/jimsynz/nerves.git", "d3f63925f877be692de7ab30d01012e72c12cc1d", [branch: "add-gitea-artifacts"]},
|
"nerves": {:git, "https://github.com/jimsynz/nerves.git", "cc6982f7493cdc368ea095e59288bc06c6c4cec3", [branch: "add-gitea-artifacts"]},
|
||||||
"nerves_logging": {:hex, :nerves_logging, "0.2.1", "e58d9ec782dc905dcaf65f60deb725c5fa3ad6a6e830f77b956406086e91e3a0", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "6224ba920db021215378d1f428ff55209ea7815410d5f8113a595b8ba33c1495"},
|
"nerves_logging": {:hex, :nerves_logging, "0.2.1", "e58d9ec782dc905dcaf65f60deb725c5fa3ad6a6e830f77b956406086e91e3a0", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "6224ba920db021215378d1f428ff55209ea7815410d5f8113a595b8ba33c1495"},
|
||||||
"nerves_motd": {:hex, :nerves_motd, "0.1.13", "5ab28a458e8ba8cf7f165573dd413f3ed0f9720dc08eda51c2bcb0d7edffa9ee", [:mix], [{:nerves_runtime, "~> 0.8", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:nerves_time, "~> 0.4", [hex: :nerves_time, repo: "hexpm", optional: true]}, {:nerves_time_zones, "~> 0.1", [hex: :nerves_time_zones, repo: "hexpm", optional: true]}], "hexpm", "f3fee43ab52181b0de015eec4a9835b99526170ac83a0f621a155f458e1c9eeb"},
|
"nerves_motd": {:hex, :nerves_motd, "0.1.13", "5ab28a458e8ba8cf7f165573dd413f3ed0f9720dc08eda51c2bcb0d7edffa9ee", [:mix], [{:nerves_runtime, "~> 0.8", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:nerves_time, "~> 0.4", [hex: :nerves_time, repo: "hexpm", optional: true]}, {:nerves_time_zones, "~> 0.1", [hex: :nerves_time_zones, repo: "hexpm", optional: true]}], "hexpm", "f3fee43ab52181b0de015eec4a9835b99526170ac83a0f621a155f458e1c9eeb"},
|
||||||
"nerves_pack": {:hex, :nerves_pack, "0.7.0", "bc93834edbb9321b180dc104440070279eb02159359715f68f770e74ed86a582", [:mix], [{:mdns_lite, "~> 0.8", [hex: :mdns_lite, repo: "hexpm", optional: false]}, {:nerves_motd, "~> 0.1", [hex: :nerves_motd, repo: "hexpm", optional: false]}, {:nerves_runtime, "~> 0.6", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:nerves_ssh, "~> 0.3", [hex: :nerves_ssh, repo: "hexpm", optional: false]}, {:nerves_time, "~> 0.3", [hex: :nerves_time, repo: "hexpm", optional: false]}, {:ring_logger, "~> 0.8", [hex: :ring_logger, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.10", [hex: :vintage_net, repo: "hexpm", optional: false]}, {:vintage_net_direct, "~> 0.10", [hex: :vintage_net_direct, repo: "hexpm", optional: false]}, {:vintage_net_ethernet, "~> 0.10", [hex: :vintage_net_ethernet, repo: "hexpm", optional: false]}, {:vintage_net_wifi, "~> 0.10", [hex: :vintage_net_wifi, repo: "hexpm", optional: false]}], "hexpm", "65a43ea78c10938c87c72d6d42a82c05e831e9a95a0ea26fe8f9d848c009cc57"},
|
"nerves_pack": {:hex, :nerves_pack, "0.7.0", "bc93834edbb9321b180dc104440070279eb02159359715f68f770e74ed86a582", [:mix], [{:mdns_lite, "~> 0.8", [hex: :mdns_lite, repo: "hexpm", optional: false]}, {:nerves_motd, "~> 0.1", [hex: :nerves_motd, repo: "hexpm", optional: false]}, {:nerves_runtime, "~> 0.6", [hex: :nerves_runtime, repo: "hexpm", optional: false]}, {:nerves_ssh, "~> 0.3", [hex: :nerves_ssh, repo: "hexpm", optional: false]}, {:nerves_time, "~> 0.3", [hex: :nerves_time, repo: "hexpm", optional: false]}, {:ring_logger, "~> 0.8", [hex: :ring_logger, repo: "hexpm", optional: false]}, {:vintage_net, "~> 0.10", [hex: :vintage_net, repo: "hexpm", optional: false]}, {:vintage_net_direct, "~> 0.10", [hex: :vintage_net_direct, repo: "hexpm", optional: false]}, {:vintage_net_ethernet, "~> 0.10", [hex: :vintage_net_ethernet, repo: "hexpm", optional: false]}, {:vintage_net_wifi, "~> 0.10", [hex: :vintage_net_wifi, repo: "hexpm", optional: false]}], "hexpm", "65a43ea78c10938c87c72d6d42a82c05e831e9a95a0ea26fe8f9d848c009cc57"},
|
||||||
|
|
Loading…
Reference in a new issue