Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CICDTest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Perwaiz Ali
CICDTest
Commits
ed43cc73
Commit
ed43cc73
authored
Aug 25, 2022
by
Perwaiz Ali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update .gitlab-ci.yml
parent
23f70714
Pipeline
#2175
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
30 deletions
+65
-30
.gitlab-ci.yml
.gitlab-ci.yml
+65
-30
No files found.
.gitlab-ci.yml
View file @
ed43cc73
image
:
gitlab/dind
stages
:
services
:
-
test
-
docker:dind
-
build
-
assemble
default
:
image
:
adoptopenjdk:14.0.2_12-jdk-hotspot-bionic
before_script
:
-
echo `pwd`
# debug
-
export GRADLE_USER_HOME=`pwd`/.gradle
-
export JIB_CACHE_HOME=`pwd`/.jib
# installs git
# - apt update && apt install -y git
# - git status
cache
:
paths
:
-
.gradle/caches
-
.gradle/wrapper
-
.jib
variables
:
variables
:
GRADLE_OPTS
:
"
-Dorg.gradle.daemon=false"
APP_VERSION
:
1.0.0
DOCKER_DRIVER
:
overlay
DOCKER_DRIVER
:
overlay
SPRING_PROFILES_ACTIVE
:
gitlab-ci
PROJECT_NAME
:
"
SPRING_BOOT_APP"
USER_GITLAB
:
sanjaybsm
IMAGE_NAME
:
"
app-svc"
APP_NAME
:
springbootgitlab
REPO
:
springbootlabtest
stages
:
test
:
-
build
stage
:
test
-
test
script
:
-
docker
-
./gradlew -S -g /cache/.gradle -Dorg.gradle.java.home=${JAVA_HOME} clean test
only
:
-
merge_requests
tags
:
-
test
except
:
-
master
-
release-app-1.0.0
maven-build
:
build
:
image
:
maven:3-jdk-8
stage
:
build
stage
:
build
script
:
"
mvn
clean
package
-B"
script
:
artifacts
:
-
./gradlew printVersion build
paths
:
tags
:
-
target/*.jar
-
build
maven-test
:
image
:
maven:3-jdk-8
stage
:
test
script
:
"
mvn
test"
artifacts
:
artifacts
:
paths
:
paths
:
-
target/*.jar
-
build/libs/*.jar
-
build/reports/tests
docker-build
:
-
build/reports/jacoco
stage
:
docker
-
build/docs/asciidoc
script
:
-
build/version.id
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
expire_in
:
5 day
-
docker build -t registry.gitlab.com/yournameingitlab/springbootlabtest .
-
docker push registry.gitlab.com/yournameingitlab/springbootlabtest
docker_publish_app
:
stage
:
assemble
when
:
manual
tags
:
-
assemble
image
:
docker:latest
before_script
:
-
apk add --update --no-cache curl jq py3-configobj py3-pip py3-setuptools python3 python3-dev
-
docker login -u "$CONTAINER_REGISTRY_USER" -p "$CONTAINER_REGISTRY_PW" $CONTAINER_REGISTRY_NAME
services
:
#- docker:dind
-
name
:
docker:dind
script
:
-
cd /builds/Application-Repo/spring-boot-app
-
docker --version
-
docker build . -t "mousumi08/mourepo:${APP_VERSION}.${CI_BUILD_ID}" -f Dockerfile
-
docker tag mousumi08/mourepo:${APP_VERSION}.${CI_BUILD_ID} mousumi08/mourepo:${APP_VERSION}.latest
-
docker tag mousumi08/mourepo:${APP_VERSION}.${CI_BUILD_ID} mousumi08/mourepo:${APP_VERSION}.${CI_BUILD_ID}
after_script
:
-
echo "End CI"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment