Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ett-cicd-test
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
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kamal Dodiya
ett-cicd-test
Commits
7bf91858
Commit
7bf91858
authored
5 years ago
by
Kamal Dodiya
Browse files
Options
Downloads
Patches
Plain Diff
test git clone from ci-job
parent
e9c93625
No related branches found
No related tags found
No related merge requests found
Pipeline
#18883
failed with stage
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+8
-59
8 additions, 59 deletions
.gitlab-ci.yml
with
8 additions
and
59 deletions
.gitlab-ci.yml
+
8
−
59
View file @
7bf91858
...
...
@@ -3,66 +3,15 @@ image: docker:stable
services
:
-
docker:dind
#before_script:
# - docker info
stages
:
-
Build image
-
Push to DTR
-
deploy_to_prod
variables
:
CONTAINER_IMAGE
:
$REGISTRY_URL/$REGISTRY_NAMESPACE/ett-cicd-test:${CI_COMMIT_SHORT_SHA}
KUBECONFIG
:
/etc/deploy/config
docker_build_job
:
stage
:
Build image
script
:
-
docker info
-
Clone Repo
docker push
:
stage
:
Push to DTR
only
:
-
master
script
:
-
docker build -t ${CONTAINER_IMAGE} --no-cache .
-
echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin https://hh-dee-dtr01.caas.ebi.ac.uk
-
docker push ${CONTAINER_IMAGE}
-
docker rmi ${CONTAINER_IMAGE}
-
docker logout hh-dee-dtr01.caas.ebi.ac.uk
# - echo "$KUBE_URL"
# - echo "$KUBE_USER"
# - echo "$KUBE_PASSWORD\n"
deploy
:
stage
:
deploy_to_prod
clone_client
:
stage
:
Clone Repo
image
:
alpine
only
:
-
master
before_script
:
-
mkdir -p /etc/deploy
-
echo ${KUBE_CONFIG} | base64 -d > ${KUBECONFIG}
script
:
-
apk add --no-cache curl
-
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
-
chmod +x ./kubectl
-
mv ./kubectl /usr/local/bin/kubectl
-
sed -i "s/<VERSION>/${CI_COMMIT_SHORT_SHA}/g" ett_cicd_test_deployment.yaml
-
cat ett_cicd_test_deployment.yaml
-
kubectl config view
-
kubectl config use-context ucp_hh-ucp.caas.ebi.ac.uk:6443_kamal
-
kubectl apply -f ett_cicd_test_service.yaml
-
kubectl apply -f ett_cicd_test_deployment.yaml
#- kubectl get deploy
#- echo "$KUBE_URL"
# - echo "$KUBE_USER"
# - echo "$KUBE_PASSWORD"
#- kubectl config set-cluster k8s --server="${SERVER}"
#- kubectl config set clusters.k8s.certificate-authority-data ${CERTIFICATE_AUTHORITY_DATA}
#- kubectl config set-credentials gitlab --token="${USER_TOKEN}"
#- kubectl config set-context default --cluster=k8s --user=gitlab
#- kubectl config use-context default
#- sed -i "s/<VERSION>/${CI_COMMIT_SHORT_SHA}/g" ett_cicd_test_deployment.yaml
#- kubectl apply -f ett_cicd_test_deployment.yaml
-
apk update && apk add git
-
git clone https://kamal:${DEPLOY_TOKEN}@gitlab.com/kamal/ensembl-client-nginx
-
ls ./
only
:
-
git-clone
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