Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pubsweet
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giorgio Sironi
pubsweet
Commits
19a870de
Commit
19a870de
authored
7 years ago
by
Sam Galson
Browse files
Options
Downloads
Patches
Plain Diff
add cd pipeline
parent
ce2acbce
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+112
-9
112 additions, 9 deletions
.gitlab-ci.yml
with
112 additions
and
9 deletions
.gitlab-ci.yml
+
112
−
9
View file @
19a870de
image
:
pubsweet/pubsweet-test-base
variables
:
IMAGE_ORG
:
pubsweet
IMAGE_NAME
:
pubsweet
BASE_DOMAIN
:
gateway.ps.semioticsquares.com
CONFIGURATION_REPOSITORY
:
https://gitlab.coko.foundation/pubsweet/deployment-config.git
install
:
stages
:
-
build
-
test
-
review
-
staging
-
production
-
demo
build
:
image
:
docker:latest
stage
:
build
stage
:
build
script
:
yarn
script
:
artifacts
:
-
docker version
expire_in
:
1h
-
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
paths
:
-
echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
-
node_modules
-
docker build -t $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA .
-
packages/*/node_modules
-
docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
-
packages/components/packages/*/node_modules
lint:style
:
lint:style
:
image
:
$IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage
:
test
variables
:
GIT_STRATEGY
:
none
script
:
script
:
-
cd ${HOME}
-
npm run lint:style
-
npm run lint:style
lint:js
:
lint:js
:
image
:
$IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage
:
test
variables
:
GIT_STRATEGY
:
none
script
:
script
:
-
cd ${HOME}
-
npm run lint:js
-
npm run lint:js
test
:
test
:
image
:
$IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage
:
test
variables
:
GIT_STRATEGY
:
none
script
:
script
:
-
cd ${HOME}
-
npm run test
-
npm run test
# -----------------------------------------------
# ui --------------------------------------------
# -----------------------------------------------
review:ui
:
image
:
xpub/deployer:latest
stage
:
review
variables
:
PACKAGE_NAME
:
ui
environment
:
name
:
$PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# !! kube-lego will fail if domain > 63 chars
url
:
"
https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
on_stop
:
stop_review:ui
except
:
-
master
script
:
-
source deploy.sh
-
create_deployment
stop_review:ui
:
image
:
xpub/deployer:latest
stage
:
review
variables
:
PACKAGE_NAME
:
ui
GIT_STRATEGY
:
none
environment
:
name
:
$PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
action
:
stop
when
:
manual
except
:
-
master
script
:
-
source deploy.sh
-
delete_deployment
staging:ui
:
image
:
xpub/deployer:latest
stage
:
staging
variables
:
PACKAGE_NAME
:
ui
environment
:
name
:
$PACKAGE_NAME/staging
url
:
"
https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
only
:
-
master
script
:
-
source deploy.sh
-
create_deployment
production:ui
:
image
:
xpub/deployer:latest
stage
:
production
variables
:
PACKAGE_NAME
:
ui
environment
:
name
:
$PACKAGE_NAME/production
url
:
"
https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when
:
manual
only
:
-
master
script
:
-
source deploy.sh
-
create_deployment
demo:ui
:
image
:
xpub/deployer:latest
stage
:
demo
variables
:
PACKAGE_NAME
:
ui
environment
:
name
:
$PACKAGE_NAME/demo
url
:
"
https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when
:
manual
script
:
-
source deploy.sh
-
create_deployment
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