Commit 23f70714 authored by Perwaiz Ali's avatar Perwaiz Ali

Update .gitlab-ci.yml

parent 6e9ee5db
Pipeline #2174 failed with stages
build-job:
stage: build
tags:
- ci
script:
- echo "Hello, "
image: gitlab/dind
services:
- docker:dind
test-job1:
stage: test
tags:
- ci
script:
- echo "This job tests something"
variables:
DOCKER_DRIVER: overlay
SPRING_PROFILES_ACTIVE: gitlab-ci
USER_GITLAB: sanjaybsm
APP_NAME: springbootgitlab
REPO: springbootlabtest
test-job2:
stages:
- build
- test
- docker
maven-build:
image: maven:3-jdk-8
stage: build
script: "mvn clean package -B"
artifacts:
paths:
- target/*.jar
maven-test:
image: maven:3-jdk-8
stage: test
tags:
- ci
script:
- echo "This job tests something, but takes more time than test-job1."
- echo "After the echo commands complete, it runs the sleep command for 20 seconds"
- echo "which simulates a test that runs 20 seconds longer than test-job1"
- sleep 20
script: "mvn test"
artifacts:
paths:
- target/*.jar
deploy-prod:
stage: deploy
tags:
- ci
docker-build:
stage: docker
script:
- echo "This job deploys something from the $CI_COMMIT_BRANCH branch."
\ No newline at end of file
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t registry.gitlab.com/yournameingitlab/springbootlabtest .
- docker push registry.gitlab.com/yournameingitlab/springbootlabtest
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment