Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blog.limos.fr
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Vincent MAZENOD
blog.limos.fr
Commits
69997172
Commit
69997172
authored
4 years ago
by
Vincent Mazenod
Browse files
Options
Downloads
Patches
Plain Diff
commented ci
parent
a9110283
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+10
-11
10 additions, 11 deletions
.gitlab-ci.yml
with
10 additions
and
11 deletions
.gitlab-ci.yml
+
10
−
11
View file @
69997172
...
...
@@ -2,18 +2,12 @@ image: ubuntu:xenial
cache
:
paths
:
-
output/
# Node modules and dependencies
before_script
:
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
-
mkdir -p ~/.ssh
-
'
[[
-f
/.dockerenv
]]
&&
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
-
output/
# le répertoire où se trouve le HTML statique généré
build
:
stage
:
build
script
:
# dépendances pelican thèmes
-
apt-get install -y --force-yes build-essential python-dev python-pip git nodejs nodejs-legacy npm
-
pip install --upgrade pip==9.0.3
-
pip install -r requirements.txt
...
...
@@ -24,20 +18,25 @@ build:
-
locale-gen fr_FR.UTF-8
-
update-locale LANG=fr_FR.UTF-8
-
. /etc/default/locale
# génération du HTML statique dans le répertoire output
-
pelican content
#
krb5 auth
#
dépendance pour l'authentification kerberos
-
echo -e "krb5-config krb5-config/default_realm string LOCAL.ISIMA.FR" | debconf-set-selections
-
apt-get install -y --force-yes krb5-user krb5-config
# récupération du KEYTAB en hexa
-
echo "$KEYTAB" > my.keytab.hex
#
- echo 'sed \'s/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI\' my.keytab.hex | xargs printf > my.keytab'
#
conversion du KEYTAB en hexa en binaire
-
sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' my.keytab.hex | xargs printf > my.keytab
# génération du ticket kerberos
-
kinit -k -t my.keytab vimazeno@LOCAL.ISIMA.FR
# préparation du répertoire servi par apache
-
ssh -K vimazeno@perso.local.isima.fr "mkdir -p ~/public_html/"
-
ssh -K vimazeno@perso.local.isima.fr "echo 'Options +FollowSymLinks' > ~/public_html/.htaccess"
-
ssh -K vimazeno@perso.local.isima.fr "echo 'RewriteEngine on' >> ~/public_html/.htaccess"
-
ssh -K vimazeno@perso.local.isima.fr "echo 'RewriteCond %{HTTP_HOST} ^perso.isima.fr$' >> ~/public_html/.htaccess"
-
ssh -K vimazeno@perso.local.isima.fr "echo 'RewriteRule (.*) https://perso.limos.fr%{REQUEST_URI} [R=301,L]' >> ~/public_html/.htaccess"
# rsync
# rsync
du HTML statique généré
-
apt-get install -y --force-yes rsync
-
rsync -az --exclude '_' -e "ssh -K" output/ vimazeno@perso.local.isima.fr:~/public_html/
# le déploiement se fera uniquement lorsque je clique sur le "play" de la CI via l'interface gitlab
when
:
manual
\ No newline at end of file
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