Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICBM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
detectors
DSSC
ICBM
Commits
455f2524
Commit
455f2524
authored
1 year ago
by
Cyril Danilevski
Browse files
Options
Downloads
Patches
Plain Diff
CI: Use tag or commit sha for artifact
parent
979a275c
No related branches found
No related tags found
1 merge request
!2
Initial MPOD feature
Pipeline
#131888
passed
1 year ago
Stage: test
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+10
-4
10 additions, 4 deletions
.gitlab-ci.yml
with
10 additions
and
4 deletions
.gitlab-ci.yml
+
10
−
4
View file @
455f2524
...
...
@@ -3,7 +3,7 @@ build:
script
:
# Set up Arduino environment
-
cat /etc/os-release
-
apt-get install -y wget python3-pip
-
apt-get install -y wget python3-pip
rename
-
wget -nv
https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz
-
tar -xf arduino-cli_latest_Linux_64bit.tar.gz
...
...
@@ -29,12 +29,18 @@ build:
-
arduino-cli lib install Ethernet
-
arduino-cli lib install --git-url https://github.com/patricklaf/SNMP.git --config-file arduino-cli.yaml
# Set version, tag if available else commit sha
-
ICBM_GIT_VERSION=$CI_COMMIT_SHORT_SHA
-
if [[ -v CI_COMMIT_TAG ]]; then ICBM_GIT_VERSION=$CI_COMMIT_TAG; fi;
-
echo "Firmware version is $ICBM_GIT_VERSION"
# Compile artifact
-
arduino-cli compile --fqbn esp32:esp32:esp32wroverkit icbm.ino --output-dir firmware --build-property build.extra_flags="-DICBM_GIT_VERSION=\"$CI_COMMIT_SHORT_SHA\" -DICBM_GIT_TIMESTAMP=\"$CI_COMMIT_TIMESTAMP\""
-
zip -r firmware.zip firmware
-
arduino-cli compile --fqbn esp32:esp32:esp32wroverkit icbm.ino --output-dir icbm-$ICBM_GIT_VERSION --build-property build.extra_flags="-DICBM_GIT_VERSION=\"$ICBM_GIT_VERSION\" -DICBM_GIT_TIMESTAMP=\"$CI_COMMIT_TIMESTAMP\""
-
rename "s/ino/$ICBM_GIT_VERSION/" icbm-$ICBM_GIT_VERSION/*
-
zip -r icbm-$ICBM_GIT_VERSION.zip icbm-$ICBM_GIT_VERSION
artifacts
:
when
:
always
paths
:
-
firmware
.zip
-
icbm-*
.zip
expire_in
:
1 week
interruptible
:
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment