Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
software-project-WS25
Telegram Team
Commits
4a47c883
Commit
4a47c883
authored
Nov 05, 2025
by
Gadhave
Browse files
Update .gitlab-ci.yml file
parent
8408accf
Pipeline
#12057
failed with stages
in 1 minute and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
4a47c883
...
@@ -8,6 +8,9 @@ variables:
...
@@ -8,6 +8,9 @@ variables:
PYTHONPATH
:
"
${CI_PROJECT_DIR}"
PYTHONPATH
:
"
${CI_PROJECT_DIR}"
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
DOCKER_REGISTRY
:
"
docker.io"
DOCKER_REGISTRY
:
"
docker.io"
DOCKER_IMAGE_NAME
:
telegram-bot
DOCKER_TAG
:
$CI_COMMIT_SHORT_SHA
before_script
:
before_script
:
...
@@ -41,24 +44,19 @@ test:
...
@@ -41,24 +44,19 @@ test:
after_script
:
after_script
:
-
echo "Tests completed succesfully"
-
echo "Tests completed succesfully"
build_docker_image
:
build
:
stage
:
build
stage
:
build
image
:
alpine:latest
image
:
docker:latest
variables
:
services
:
DOCKER_REGISTRY
:
docker.io
-
name
:
docker:dind
DOCKER_CONFIG
:
/kaniko/.docker/
alias
:
docker
IMAGE_NAME
:
"
${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${CI_PROJECT_NAME}"
IMAGE_TAG
:
"
${CI_COMMIT_SHORT_SHA}"
script
:
script
:
-
apk add --no-cache curl
-
echo "=== Starting Docker Build for commit" $CI_COMMIT_SHA
-
curl -sSLO https://storage.googleapis.com/kaniko-project/executor
-
echo "Project structure:"
-
chmod +x executor && mv executor /usr/local/bin/kaniko
-
ls -R
-
mkdir -p /kaniko/.docker
-
echo "Navigating to Desktop/Telegram_Bot directory..."
-
echo "{\"auths\":{\"${DOCKER_REGISTRY}\":{\"username\":\"${DOCKER_USERNAME}\",\"password\":\"${DOCKER_PASSWORD}\"}}}" > /kaniko/.docker/config.json
-
cd Desktop/Telegram_Bot
-
echo "Building Docker image" $DOCKER_IMAGE_NAME ":" $DOCKER_TAG
# Run Kaniko build and push in one clean command (no backslashes)
-
docker build -t "$DOCKER_IMAGE_NAME:$DOCKER_TAG" .
-
/usr/local/bin/kaniko --context "${CI_PROJECT_DIR}/Desktop/Telegram_Bot" --dockerfile "${CI_PROJECT_DIR}/Desktop/Telegram_Bot/Dockerfile" --destination "${IMAGE_NAME}:${IMAGE_TAG}" --cleanup
-
echo "Docker image built successfully:"" $DOCKER_IMAGE_NAME":"$DOCKER_TAG
after_script
:
-
docker images | grep "$DOCKER_IMAGE_NAME"
-
echo "Docker image pushed successfully!"
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment