Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
puppet-modules
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
Nbits
Puppet
puppet-modules
Commits
42d6dd61
Commit
42d6dd61
authored
4 years ago
by
alcalina
Browse files
Options
Downloads
Patches
Plain Diff
Deploy role::onlyoffice using Libvirt
parent
03d50f8d
No related branches found
No related tags found
No related merge requests found
Pipeline
#51820
failed
4 years ago
Stage: check-code
Stage: compile
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+10
-0
10 additions, 0 deletions
.gitlab-ci.yml
.scripts/deploy-role.sh
+30
-0
30 additions, 0 deletions
.scripts/deploy-role.sh
with
40 additions
and
0 deletions
.gitlab-ci.yml
+
10
−
0
View file @
42d6dd61
stages
:
-
check-code
-
compile
-
deploy
check-code
:
image
:
ninfra/puppet-checker:0.0.1
...
...
@@ -29,3 +30,12 @@ compile-profiles:
done
<
<(
find
./profile/manifests/
-name
"*.pp"
-a
-exec
grep
^class
"{}"
\;
|
awk
"{
print
\$2
}"
);'
tags
:
-
docker
deploy-role-onlyoffice
:
stage
:
deploy
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
script
:
-
sudo ./.scripts/deploy-puppet-master.sh role::onlyoffice
tags
:
-
libvirt
This diff is collapsed.
Click to expand it.
.scripts/deploy-role.sh
0 → 100755
+
30
−
0
View file @
42d6dd61
#!/bin/bash
#
# Deploy a role using Puppet Apply.
set
-x
CLASS
=
${
1
}
if
[
-z
"
${
CLASS
}
"
]
;
then
echo
"Usage:
${
0
}
class"
exit
1
fi
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
REPO_DIR
=
"
$(
dirname
${
SCRIPT_DIR
}
)
"
apt update
apt
install
-qy
puppet
git
-C
${
REPO_DIR
}
submodule update
--init
# deploy a role
puppet apply
\
--detailed-exitcodes
\
--modulepath
${
REPO_DIR
}
/modules
\
--hiera-config
${
REPO_DIR
}
/hiera.yaml
\
--codedir
${
REPO_DIR
}
\
-e
"include
${
CLASS
}
"
test
"
${
?
}
"
=
2
||
exit
1
# Puppet exit code 2: The run succeeded, and some resources were changed.
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