Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chebi Frontend
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChEMBL
ChEBI
ChEBI-2.0
Chebi Frontend
Commits
eb03ab14
Commit
eb03ab14
authored
1 year ago
by
Muhammad Arsalan
Browse files
Options
Downloads
Patches
Plain Diff
more changes
parent
834a78e4
No related branches found
Branches containing commit
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
+53
-16
53 additions, 16 deletions
.gitlab-ci.yml
with
53 additions
and
16 deletions
.gitlab-ci.yml
+
53
−
16
View file @
eb03ab14
stages
:
-
build
-
deploy
variables
:
# Define environment-specific variables
DOCKER_REGISTRY
:
dockerhub.ebi.ac.uk/chembl/chebi/chebi-2.0/chebi-frontend
...
...
@@ -21,28 +17,69 @@ image: docker:latest
services
:
-
docker:dind
# Define the Docker image building job
build
:
stages
:
-
build
-
deploy
build-image-dev
:
image
:
name
:
docker/compose:1.24.1
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
stage
:
build
before_script
:
script
:
# - echo $DOCKERHUB_REGISTRY_PASSWORD | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin $DOCKERHUB_REGISTRY
# - docker run chemblsingularity/hello-chembl
-
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
-
echo Building ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
-
docker build -t $DOCKER_REGISTRY .
-
echo Deploying ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
-
docker push ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
-
echo "Image pushed"
only
:
-
main
script
:
-
docker build --platform linux/amd64 -t $DOCKER_REGISTRY .
-
docker push $DOCKER_REGISTRY
# Define the Docker image building job
#build:
# stage: build
# before_script:
# - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
#
# script:
# - docker build --platform linux/amd64 -t $DOCKER_REGISTRY .
# - docker push $DOCKER_REGISTRY
# Define the deployment job
deploy
:
deploy-dev
:
image
:
name
:
lachlanevenson/k8s-kubectl:latest
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
stage
:
deploy
before_script
:
-
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
script
:
-
echo "Now into deploy part"
# - kubectl config use-context ${KUBE_NAMESPACE_DEV}
# - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HH} ${KUBE_USER_HH}
# - kubectl get pods -n ${KUBE_NAMESPACE_DEV}
# - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml
# - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml
# - kubectl apply -n ${KUBE_NAMESPACE_DEV} -f k8s-deployment.yml
-
kubectl config use-context chebi-staging
-
kubectl delete deployment -n $K8_NAMESPACE muhammad-chebi-frontend --ignore-not-found
-
kubectl apply -f $K8_DEPLOYMENT_FILE -n $K8_NAMESPACE
only
:
-
main
# Define the deployment job
#deploy:
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: [ "/bin/sh", "-c" ]
# stage: deploy
# before_script:
# - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
#
# script:
# - kubectl config use-context chebi-staging
# - kubectl delete deployment -n $K8_NAMESPACE muhammad-chebi-frontend --ignore-not-found
# - kubectl apply -f $K8_DEPLOYMENT_FILE -n $K8_NAMESPACE
# only:
# - main
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