Category : gitlab

I have written a springboot thymeleaf application and i haved pushed it to GitLab. I want to generate jar from GitLab and store in a respoistory. To do this i m using below plugins <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-1</version> <configuration> <descriptors> <descriptor>src/main/resources/distribution/Dynamic2Static-distribution.xml </descriptor> </descriptors> <finalName>Dynamic2Static-${project.version}</finalName> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> ..

Read more

.gitlab-ci.yml image: docker:stable … … heroku_publishing: stage: publish_image services: – docker:dind script: – docker login –username=_ –password=$HEROKU_AUTH_KEY registry.heroku.com – docker login –username=$DOCKER_LOGIN –password=$DOCKER_PASSWORD – docker tag fagam32/study_project_backend:latest registry.heroku.com/study-project-backend/release – docker push registry.heroku.com/study-project-backend/release # needs: # – build allow_failure: false deploy: stage: deploy image: buddy/heroku-cli:latest script: – heroku container:release release needs: – heroku_publishing when: manual I’m ..

Read more

I have a Gitlab pipeline that builds my Docker image from a Dockerfile, but when the "docker build" command fails, the pipeline still reports a success. build: stage: build script: – docker build –no-cache -t $CI_REGISTRY/dockerfile:$CONTAINER_LABEL . I’ve added an error to my Dockerfile so I can provoke an error: FROM ubuntu:20.04 RUN not_a_real_command_that_should_fail The ..

Read more

In a GitLab repo, I have a Dockerfile with the following lines, FROM python:alpine RUN addgroup -S java RUN adduser -s /bin/bash -S -G java java USER java WORKDIR /home/java so that when the image is instantiated (container running), it will run as user ‘java’ When GitLab CI/CD clones the project code however, it is ..

Read more

I’m trying to implement CD for my dockerized Django application on the DigitalOcean droplet. Here’s my .gitlab-ci.yml: image: name: docker/compose:1.29.1 entrypoint: [""] services: – docker:dind stages: – build – deploy variables: DOCKER_HOST: tcp://docker:2375 DOCKER_DRIVER: overlay2 before_script: – export IMAGE=$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME – export WEB_IMAGE=$IMAGE/web:web – export NGINX_IMAGE=$IMAGE/nginx:nginx – apk add –no-cache openssh-client bash – chmod +x ./setup_env.sh ..

Read more