-
Bilal authoredcef749a6
This GitLab CI configuration is valid.
Learn more
stages:
- build
default:
image: python:3.8
before_script:
- apt-get update && apt-get install -y libsqlcipher-dev && apt-get install -y libgl1-mesa-glx
- pip install -e .
build_image:
only:
- dev
- prod
- ci-fix-1
stage: build
before_script:
- echo building sentiment-analysis image
image:
name: gcr.io/kaniko-project/executor:latest
entrypoint: [""]
script:
- export DOCKER_BUILDKIT=1
# Prepare Kaniko configuration file
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
# Build and push the image from the Dockerfile at the root of the project.
# To push to a specific docker tag, amend the --destination parameter, e.g. --destination $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
# See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference for available variables
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-latest