Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
myspringweb
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
황 재인
myspringweb
Commits
05b8bfdb
Commit
05b8bfdb
authored
2 weeks ago
by
황 재인
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
26cbb331
No related branches found
No related tags found
No related merge requests found
Pipeline
#11711
passed with warnings
2 weeks ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+37
-0
37 additions, 0 deletions
.gitlab-ci.yml
with
37 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
37
−
0
View file @
05b8bfdb
stages
:
-
build
-
deploy
cache
:
paths
:
-
.m2/repository
-
./target
build
:
#image: maven:3.8.5-openjdk-17 // 필요 없음
stage
:
build
artifacts
:
when
:
always
paths
:
-
./target/*.jar
-
Dockerfile
script
:
-
'
mvn
package'
-
echo "Hello, you are at build stage."
only
:
-
main
deploy:docker
:
image
:
docker
services
:
-
"
docker:dind"
stage
:
deploy
when
:
manual
before_script
:
-
docker login –u $DOCKER_HUB_USERID –p $DOCKER_HUB_PASSWORD
script
:
-
docker build -t myspringweb .
-
docker tag myspringweb $DOCKER_HUB_USERID/myspringweb
-
docker push $DOCKER_HUB_USERID/myspringweb
after_script
:
-
docker logout
only
:
-
main
\ No newline at end of file
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