Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wiki-hackmeeting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
logout hacklab
wiki-hackmeeting
Commits
a00dcfa3
Commit
a00dcfa3
authored
10 months ago
by
logout hacklab
Browse files
Options
Downloads
Patches
Plain Diff
Fix run push only when variables are set
parent
f896fc17
No related branches found
No related tags found
1 merge request
!1
Fix CI
Pipeline
#234216
passed
10 months ago
Stage: push
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+18
-16
18 additions, 16 deletions
.gitlab-ci.yml
with
18 additions
and
16 deletions
.gitlab-ci.yml
+
18
−
16
View file @
a00dcfa3
...
...
@@ -10,20 +10,20 @@ variables:
DEST_DIRECTORY
:
latest/hugo
stages
:
-
push
-
test
-
build
-
push
test
:
stage
:
test
before_script
:
-
apk add --no-cache go curl bash nodejs
-
hugo version
-
hugo mod get -u
script
:
-
hugo
rules
:
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
#
test:
#
stage: test
#
before_script:
#
- apk add --no-cache go curl bash nodejs
#
- hugo version
#
- hugo mod get -u
#
script:
#
- hugo
#
rules:
#
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
build
:
before_script
:
...
...
@@ -40,9 +40,11 @@ push:
image
:
name
:
rclone/rclone:latest
entrypoint
:
[
"
"
]
rules
:
-
if
:
$CI_COMMIT_BRANCH == 'no-masters'
-
if
:
$WEBDAV_PASSWORD
script
:
-
"
rclone
sync
-v
--retries
10
--exclude='hm/**'
--webdav-url
${WEBDAV_URL}
--webdav-user
${WEBDAV_USERNAME}
--webdav-pass
$(echo
-n
\"
${WEBDAV_PASSWORD}
\"
|
rclone
obscure
-)
./public
:webdav:${WEBDAV_REMOTE_PATH}/${DEST_DIRECTORY}"
dependencies
:
-
build
only
:
-
no-masters
-
echo "test"
# - "rclone sync -v --retries 10 --exclude='hm/**' --webdav-url ${WEBDAV_URL} --webdav-user ${WEBDAV_USERNAME} --webdav-pass $(echo -n \"${WEBDAV_PASSWORD}\" | rclone obscure -) ./public :webdav:${WEBDAV_REMOTE_PATH}/${DEST_DIRECTORY}"
# dependencies:
# - build
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