Category : gitlab-ci

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

What I have: react application having as package manager yarn (version 1.22.5) with a gitlab-ci.yml in which ./gradlew build (gradle version 7.2) is executed a gitlab runner locally as docker container based on "gitlab/gitlab-runner:alpine" image -> the gitlab runner executor is docker with default docker image "docker:20.10.8" For any reason my ci build always fails ..

Read more

I want to run the oracle DB along with project, so I have an oracle image that i’m using as service image and my project’s image as the base image. Both these image reside in AWS ECR. test: stage: test image: ***.dkr.ecr.us-east-2.amazonaws.com/project:latest services: – name: ***.dkr.ecr.us-east-2.amazonaws.com/oracle-db:latest alias: oracleDB tags: – [runner] I get the below ..

Read more