Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
Controller
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guardians of the Kretschmar Elock System
Controller
Commits
61328ad3
Commit
61328ad3
authored
May 24, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try this for deployment
parent
abde78aa
Pipeline
#9846
failed with stages
in 1 minute and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
.gitlab-ci.yml
.gitlab-ci.yml
+23
-2
No files found.
.gitlab-ci.yml
View file @
61328ad3
...
...
@@ -3,6 +3,7 @@ image: gitlab.cs.wallawalla.edu:5050/elock/controller:latest
stages
:
-
build
-
test
-
deploy
build_tests
:
stage
:
build
...
...
@@ -23,8 +24,6 @@ build_esp32_application:
-
cp main/include/config.h.example main/include/config.h
-
/opt/esp/entrypoint.sh bash
-
idf.py build
-
echo "$SIGNING_KEY" | base64 -d -w 0 > decoded.pem
-
espsecure.py sign_data --keyfile decoded.pem --version 1 build/door-controller.bin
artifacts
:
paths
:
-
build/door-controller.bin
...
...
@@ -34,3 +33,25 @@ test_application:
stage
:
test
script
:
-
build/door-controller-universal-tests
deploy_controller_update
:
stage
:
deploy
before_script
:
-
apt-get update -qq
-
apt-get install -qq rsync
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
-
mkdir -p ~/.ssh
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
script
:
-
echo "$SIGNING_KEY" | base64 -d -w 0 > decoded.pem
-
espsecure.py sign_data --keyfile decoded.pem --version 1 build/door-controller.bin
-
version=$(<version.txt)
-
deploy_name="v${version}.bin"
# Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
-
"
rsync
build/door-controller.bin
$SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/backend/storage/app/controller/binaries/$deploy_name"
when
:
manual
only
:
-
deploy
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment