Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EBI-Framework
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
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
ebiwd
EBI-Framework
Commits
e63ea812
Commit
e63ea812
authored
7 years ago
by
Peter Walter
Browse files
Options
Downloads
Patches
Plain Diff
add aws deployment
parent
632d6638
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+23
-0
23 additions, 0 deletions
.gitlab-ci.yml
bin/deploy-aws
+25
-0
25 additions, 0 deletions
bin/deploy-aws
with
48 additions
and
0 deletions
.gitlab-ci.yml
+
23
−
0
View file @
e63ea812
...
...
@@ -3,14 +3,18 @@ image: netroby/alpine-rsync
#project specific variables can be defines here, or overridden project settings
variables
:
SERVER_DEV
:
ebi-cli.ebi.ac.uk
S3_BUCKET_DEV
:
dev.ebi.emblstatic.net
SCRIPT_DEV
:
~/bin/update-ebi-framework
DEV_URL
:
http://wwwdev.ebi.ac.uk/web_guidelines/EBI-Framework
SERVER_PROD
:
ebi-cli.ebi.ac.uk
S3_BUCKET_PROD
:
origin.ebi.emblstatic.net
SCRIPT_PROD
:
~/bin/update-ebi-framework-prod
PROD_URL
:
http://www.ebi.ac.uk/web_guidelines/EBI-Framework
# do not define here, put in project variables
SSH_USER
:
username
SSH_KEY
:
secret-key
AWS_KEY
:
key
AWS_SECRET
:
secret-key
#setup ssh keys
.deploy_setup
:
&deploy_setup
...
...
@@ -44,3 +48,22 @@ deploy_live:
name
:
live
url
:
${LIVE_URL}
deploy_aws_dev
:
image
:
ebiwd/alpine-ssh
stage
:
deploy
before_script
:
-
add-aws-key ${AWS_KEY} ${AWS_SECRET}
script
:
-
bin/deploy-aws
only
:
-
branches
deploy_aws_live
:
image
:
ebiwd/alpine-ssh
stage
:
deploy
before_script
:
-
add-aws-key ${AWS_KEY} ${AWS_SECRET}
script
:
-
bin/deploy-aws prod
only
:
-
tags
This diff is collapsed.
Click to expand it.
bin/deploy-aws
0 → 100755
+
25
−
0
View file @
e63ea812
#!/bin/bash
# abort on error
set
-e
;
# abort on undefined variable
set
-u
;
# get current branch from git info
PROJECT
=
${
CI_PROJECT_NAME
}
;
BRANCH
=
${
CI_COMMIT_REF_NAME
}
;
# set project base
DEPLOY_PATH
=
"web_guidelines/
${
PROJECT
}
/
${
BRANCH
}
"
;
if
[
"
${
1
:-
''
}
"
=
"prod"
]
;
then
S3_BUCKET
=
${
S3_BUCKET_PROD
}
;
else
S3_BUCKET
=
${
S3_BUCKET_DEV
}
;
fi
;
# push to AWS (exclude bin and .git)
aws s3
sync
.
s3://
${
S3_BUCKET
}
/
${
DEPLOY_PATH
}
\
--exclude
".git*"
\
--exclude
"bin/*"
\
;
This diff is collapsed.
Click to expand it.
Preview
0%
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