Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PipelineExample
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ishaan15
PipelineExample
Commits
122f95e5
Commit
122f95e5
authored
4 years ago
by
ishaan15
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml
parent
ab9ae9b0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3487
canceled
4 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+27
-23
27 additions, 23 deletions
.gitlab-ci.yml
with
27 additions
and
23 deletions
.gitlab-ci.yml
+
27
−
23
View file @
122f95e5
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
trigger_build
:
stage
:
deploy
script
:
-
"
curl
-X
POST
-F
token=4ca535b69f6ee1a0b1766f2f8ebad8
-F
ref=master
https://git.cs.vt.edu/api/v4/projects/9302/trigger/pipeline"
docker-build-master
:
# Official docker image.
image
:
docker:latest
before_script
:
-
echo "Before script section"
-
echo "For example you might run an update here or install a build dependency"
-
echo "Or perhaps you might print out some debugging details"
after_script
:
-
echo "After script section"
-
echo "For example you might do some cleanup here"
build1
:
stage
:
build
services
:
-
docker:dind
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script
:
-
docker build --pull -t "$CI_REGISTRY_IMAGE" .
-
docker push "$CI_REGISTRY_IMAGE"
only
:
-
master
-
echo "Do your build here"
docker-build
:
# Official docker image.
image
:
docker:latest
stage
:
build
services
:
-
docker:dind
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
test1
:
stage
:
test
script
:
-
echo "Do a test here"
-
echo "For example run a test suite"
test2
:
stage
:
test
script
:
-
echo "Do another parallel test here"
-
echo "For example run a lint test"
deploy1
:
stage
:
deploy
script
:
-
docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
-
docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except
:
-
master
-
echo "Do your deploy here"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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