Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LongRoute
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frank Sauerburger
LongRoute
Commits
86eb1e59
Verified
Commit
86eb1e59
authored
6 years ago
by
Frank Sauerburger
Browse files
Options
Downloads
Patches
Plain Diff
Add deployment jobs
parent
cc2a5907
No related branches found
No related tags found
1 merge request
!6
Resolve "Add deployment"
Pipeline
#3179
failed
6 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+73
-0
73 additions, 0 deletions
.gitlab-ci.yml
with
73 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
73
−
0
View file @
86eb1e59
variables
:
LOCAL_DIR
:
public
stages
:
-
build
-
test_deployment
-
production_deployment
.sftp
:
&sftp_template
image
:
${CI_REGISTRY_IMAGE}/ubuntu_sftp
tags
:
-
wasenweiler.sit-servers.net
script
:
-
mkdir -p ~/.ssh
-
echo "${SFTP_KEY}" > ~/.ssh/id_rsa
-
echo "${SFTP_HOSTCERT}" > ~/.ssh/known_hosts
-
chmod 600 ~/.ssh/*
-
mv ${LOCAL_DIR} ${REMOTE_DIR}
-
sftp ${SFTP_USERNAME}@${SFTP_HOST} <<< "put -r ${REMOTE_DIR}"
brunch_build
:
stage
:
build
image
:
node
before_script
:
-
npm i -g brunch
script
:
-
brunch b --production
artifacts
:
paths
:
-
public/*
expire_in
:
3 days
test_deploy
:
stage
:
test_deployment
dependencies
:
-
brunch_build
variables
:
SFTP_USERNAME
:
${TEST_USERNAME}
SFTP_KEY
:
${TEST_KEY}
SFTP_HOST
:
${TEST_HOST}
SFTP_HOSTCERT
:
${TEST_HOSTCERT}
REMOTE_DIR
:
${TEST_DIR}
GIT_STRATEGY
:
none
environment
:
name
:
Preview
url
:
https://longroute.preview.sauerburger.com/
<<
:
*sftp_template
production_deploy
:
stage
:
production_deployment
dependencies
:
-
brunch_build
variables
:
SFTP_USERNAME
:
${PRODUCTION_USERNAME}
SFTP_KEY
:
${PRODUCTION_KEY}
SFTP_HOST
:
${PRODUCTION_HOST}
SFTP_HOSTCERT
:
${PRODUCTION_HOSTCERT}
REMOTE_DIR
:
${PRODUCTION_DIR}
GIT_STRATEGY
:
none
only
:
-
master
when
:
manual
environment
:
name
:
Production
url
:
https://longroute.sauerburger.com/
<<
:
*sftp_template
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