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
cedadce3
Verified
Commit
cedadce3
authored
6 years ago
by
Frank Sauerburger
Browse files
Options
Downloads
Patches
Plain Diff
Add preview badge
parent
1896d91a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!8
Resolve "Add preview badge"
Pipeline
#3193
passed
6 years ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+7
-0
7 additions, 0 deletions
.gitlab-ci.yml
with
7 additions
and
0 deletions
.gitlab-ci.yml
+
7
−
0
View file @
cedadce3
...
@@ -16,6 +16,12 @@ stages:
...
@@ -16,6 +16,12 @@ stages:
-
echo "${SFTP_HOSTCERT}" > ~/.ssh/known_hosts
-
echo "${SFTP_HOSTCERT}" > ~/.ssh/known_hosts
-
chmod 600 ~/.ssh/*
-
chmod 600 ~/.ssh/*
-
mv ${LOCAL_DIR} ${REMOTE_DIR}
-
mv ${LOCAL_DIR} ${REMOTE_DIR}
-
>
if [ ! -z "${PREVIEW}" ]; then
find ${REMOTE_DIR} -type f -print0 | xargs -0 sed -i 's;</body>;<script src="/.version.js"></script></body>;g';
echo "document.body.innerHTML += '<div style=\"position:fixed; bottom:60px; right:-60px; background-color:#d34; padding: 6px 100px; transform: rotate(-45deg); border-top: 1px solid #400; border-bottom: 1px solid #400;\"><a href=\"${CI_PROJECT_URL}/commit/${CI_COMMIT_SHA}\" style=\"color:#fff;\">Preview: ${CI_COMMIT_SHA:0:8}</a></div>';" > ${REMOTE_DIR}/.version.js;
fi;
-
sftp ${SFTP_USERNAME}@${SFTP_HOST} <<< "put -r ${REMOTE_DIR}"
-
sftp ${SFTP_USERNAME}@${SFTP_HOST} <<< "put -r ${REMOTE_DIR}"
...
@@ -43,6 +49,7 @@ test_deploy:
...
@@ -43,6 +49,7 @@ test_deploy:
SFTP_HOSTCERT
:
${TEST_HOSTCERT}
SFTP_HOSTCERT
:
${TEST_HOSTCERT}
REMOTE_DIR
:
${TEST_DIR}
REMOTE_DIR
:
${TEST_DIR}
GIT_STRATEGY
:
none
GIT_STRATEGY
:
none
PREVIEW
:
"
true"
environment
:
environment
:
name
:
Preview
name
:
Preview
...
...
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