Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-faraday
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-faraday
Commits
7a2ff77a
Commit
7a2ff77a
authored
7 years ago
by
Sebastian
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.coko.foundation:xpub/xpub-faraday
parents
066e2425
be73f5c6
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
+59
-207
59 additions, 207 deletions
.gitlab-ci.yml
with
59 additions
and
207 deletions
.gitlab-ci.yml
+
59
−
207
View file @
7a2ff77a
# variables:
variables
:
# IMAGE_ORG: xpub
IMAGE_ORG
:
bogdandev
# IMAGE_NAME: xpub
IMAGE_NAME
:
xpub-faraday
# BASE_DOMAIN: gateway.xpub.semioticsquares.com
# CONFIGURATION_REPOSITORY: https://gitlab.coko.foundation/xpub/deployment-config.git
# stages:
stages
:
# - build
-
build
# - test
-
test
# - review
-
review
# - staging
-
staging
# - production
-
demo
# - demo
#
build:
build
:
#
image: docker:latest
image
:
docker:latest
#
stage: build
stage
:
build
#
script:
script
:
#
- docker version
-
docker version
#
- docker build -t $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA .
-
docker build -t $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA .
#
- if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
-
if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
#
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
-
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
#
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
-
echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
#
- docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
-
docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
#
lint:
lint
:
#
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
image
:
$IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
#
stage: test
stage
:
test
#
variables:
variables
:
#
GIT_STRATEGY: none
GIT_STRATEGY
:
none
#
script:
script
:
#
- cd ${HOME}
-
cd ${HOME}
#
- npm run lint
-
npm run lint
#
test:
test
:
#
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
image
:
$IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
#
stage: test
stage
:
test
#
variables:
variables
:
#
GIT_STRATEGY: none
GIT_STRATEGY
:
none
#
script:
script
:
#
- cd ${HOME}
-
cd ${HOME}
#
- npm run test
-
npm run test
#
push:latest:
push:latest
:
#
image: docker:latest
image
:
docker:latest
#
stage: staging
stage
:
staging
#
script:
script
:
#
- if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
-
if [ -z "$DOCKERHUB_USERNAME" ] || [ -z "$DOCKERHUB_PASSWORD" ]; then echo "Not pushing" && exit 0; fi
#
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
-
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
#
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
-
echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
#
- docker build -t $IMAGE_ORG/$IMAGE_NAME:latest --label COMMIT_SHA=$CI_COMMIT_SHA .
-
docker build -t $IMAGE_ORG/$IMAGE_NAME:latest --label COMMIT_SHA=$CI_COMMIT_SHA .
#
- docker push $IMAGE_ORG/$IMAGE_NAME:latest
-
docker push $IMAGE_ORG/$IMAGE_NAME:latest
#
only:
only
:
#
- master
-
master
# # -----------------------------------------------
demo:xpub-faraday
:
# # xpub-collabra ---------------------------------
image
:
$IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
# # -----------------------------------------------
stage
:
demo
when
:
manual
# review:xpub-collabra:
variables
:
# image: pubsweet/deployer:latest
PACKAGE_NAME
:
xpub-faraday
# stage: review
only
:
# variables:
-
master
# PACKAGE_NAME: xpub-collabra
environment
:
# FORCE_FRESH_DB: "yes"
name
:
$PACKAGE_NAME/demo
# REQUIRES_PROVISIONING: "yes"
url
:
$NOW_URL
# environment:
script
:
# name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
-
echo $NOW_URL
# # !! kube-lego will fail if domain > 64 chars
\ No newline at end of file
# url: "http://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# on_stop: stop_review:xpub-collabra
# except:
# - master
# script:
# - source deploy.sh
# - create_deployment
# stop_review:xpub-collabra:
# image: pubsweet/deployer:latest
# stage: review
# variables:
# PACKAGE_NAME: xpub-collabra
# REQUIRES_PROVISIONING: "yes"
# GIT_STRATEGY: none
# environment:
# name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# action: stop
# when: manual
# except:
# - master
# script:
# - source deploy.sh
# - delete_deployment
# - delete_objects_in_environment pvc
# staging:xpub-collabra:
# image: pubsweet/deployer:latest
# stage: staging
# variables:
# PACKAGE_NAME: xpub-collabra
# environment:
# name: $PACKAGE_NAME/staging
# url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# only:
# - master
# script:
# - source deploy.sh
# - create_deployment
# production:xpub-collabra:
# image: pubsweet/deployer:latest
# stage: production
# variables:
# PACKAGE_NAME: xpub-collabra
# environment:
# name: $PACKAGE_NAME/production
# url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# when: manual
# only:
# - master
# script:
# - source deploy.sh
# - create_deployment
# demo:xpub-collabra:
# image: pubsweet/deployer:latest
# stage: demo
# variables:
# PACKAGE_NAME: xpub-collabra
# environment:
# name: $PACKAGE_NAME/demo
# url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# when: manual
# script:
# - source deploy.sh
# - create_deployment
# # -----------------------------------------------
# # xpub-ui ---------------------------------------
# # -----------------------------------------------
# #review:xpub-ui:
# # image: pubsweet/deployer:latest
# # stage: review
# # variables:
# # PACKAGE_NAME: xpub-ui
# # environment:
# # name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# # # !! kube-lego will fail if domain > 63 chars
# # url: "http://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# # on_stop: stop_review:xpub-ui
# # except:
# # - master
# # script:
# # - source deploy.sh
# # - create_deployment
# #
# #stop_review:xpub-ui:
# # image: pubsweet/deployer:latest
# # stage: review
# # variables:
# # PACKAGE_NAME: xpub-ui
# # GIT_STRATEGY: none
# # when: manual
# # environment:
# # name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# # action: stop
# # script:
# # - source deploy.sh
# # - delete_deployment
# #
# #staging:xpub-ui:
# # image: pubsweet/deployer:latest
# # stage: staging
# # variables:
# # PACKAGE_NAME: xpub-ui
# # environment:
# # name: $PACKAGE_NAME/staging
# # url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# # only:
# # - master
# # script:
# # - source deploy.sh
# # - create_deployment
# #
# #production:xpub-ui:
# # image: pubsweet/deployer:latest
# # stage: production
# # variables:
# # PACKAGE_NAME: xpub-ui
# # environment:
# # name: $PACKAGE_NAME/production
# # url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
# # when: manual
# # only:
# # - master
# # script:
# # - source deploy.sh
# # - create_deployment
# #
# #demo:xpub-ui:
# # image: pubsweet/deployer:latest
# # stage: demo
# # variables:
# # PACKAGE_NAME: xpub-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