🚧 This instance is under construction; expect occasional downtime. Runners available in /repos. Questions? Ask in #wikimedia-gitlab on libera.chat, or under GitLab on Phabricator.

Commit 46e2ad63 authored by 20after4's avatar 20after4
Browse files

update ci to do staging deployments on data.releng.team

parent 53957f53
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: docker-registry.wikimedia.org/python3-build-bullseye:latest
# Change pip's cache directory to be inside the project directory since we can
......@@ -31,16 +14,24 @@ cache:
- .cache/pip
- venv/
- node_modules/
stages: # List of stages for jobs, and their order of execution
- prep
- build
- test
- deploy
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
stage: prep
- npm install
stage: prep
- python3 -V # Print out python version for debugging
- pip3 install virtualenv
- if [ ! -d "./venv" ]
- if [ ! -d "./venv" ]
- then
- virtualenv --python=python3 venv
- fi
......@@ -48,5 +39,26 @@ unit-test-job: # This job runs in the test stage.
- git submodule update --init --recursive
- pip3 install poetry pytest
- poetry build
stage: build
- tsc
stage: build
- grunt
stage: test # It only starts when the job in the build stage completes successfully.
- source venv/bin/activate
- poetry install
- pytest test/
stage: deploy
environment: data.releng.team
- cp -af . /home/gitlab-runner/deploy/$VERSION
\ No newline at end of file
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