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
fbad1f4a
Commit
fbad1f4a
authored
Dec 31, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revamp deploy process for new deploy method
parent
c4da1249
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
.gitlab-ci.yml
.gitlab-ci.yml
+11
-11
No files found.
.gitlab-ci.yml
View file @
fbad1f4a
...
...
@@ -5,6 +5,12 @@ stages:
-
test
-
deploy
before_script
:
-
>
if [ -z ${CI_COMMIT_TAG+x} ]; then
printf "${CI_COMMIT_TAG}" > version.txt
fi
build_tests
:
stage
:
build
script
:
...
...
@@ -37,23 +43,17 @@ test_application:
deploy_controller_update
:
stage
:
deploy
tags
:
-
elock
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" | base64 -d -w 0)
-
mkdir -p ~/.ssh
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
-
echo "CI_COMMIT_TAG"
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"
-
echo "Deploying ${deploy_name}"
# 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
-
mv "build/door-controller.bin" "${PROJ_DIR}/controller-bins/${deploy_name}"
only
:
-
master
-
tags
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