Skip to content
Snippets Groups Projects
Commit e91bac38 authored by benoit-cty's avatar benoit-cty
Browse files

Clean gitlab-ci

parent a74ae5a5
No related branches found
No related tags found
1 merge request!112Fix build conda and PyPi
Pipeline #12274 passed
......@@ -33,16 +33,11 @@ cache:
before_script:
# git is needed for pre-commit
- apt update && apt install -y git make
# - rm -rf openfisca-france-data && git clone --branch master https://project_14_bot:${GITLAB_TOKEN_FRANCE_DATA}@git.leximpact.dev/benjello/openfisca-france-data.git
- pip install --find-links=${PIP_DOWNLOAD_DIR} poetry # STEP 2
- cp deploy/.env-ci notebooks/.env
- cp deploy/.env-ci leximpact_prepare_data/.env
- cp deploy/.env-ci .env
# Hack for simu-etat
# - mkdir -p /builds/leximpact/leximpact-pre
# - cp deploy/.env-ci /builds/leximpact/leximpact-pre/.env
#- git remote set-url origin https://${CI_REGISTRY_USER}:${API_TOKEN}@${CI_REPOSITORY_URL#*@}
#- git remote -v
install:
stage: init
......@@ -56,7 +51,6 @@ install:
check-style:
stage: check
script:
#- poetry run pre-commit install --install-hooks
- poetry run pre-commit run --all-files --show-diff-on-failure
run-notebooks:
......@@ -71,24 +65,6 @@ run-notebooks:
paths:
- ./papermill
# Not used yet
.git-bump-script: &git-bump-script |
git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
make bump
lines=$(git status -s | wc -l)
if [ $lines -gt 0 ];then
echo "gitlabci: Committing changes ----------"
git config --global user.name "$GIT_AUTHOR_NAME"
git config --global user.email "$GIT_EMAIL"
# git add --ignore-removal to avoid adding deletation
git add pyproject.toml leximpact_socio_fisca_simu_etat/__init__.py
git commit -m "Bump version"
# Create the token by going to {PROJECT} / Settings / Access Tokens. Then create one with read/write repository.
git push -o ci.skip "https://${CI_REGISTRY_USER}:${API_TOKEN}@${CI_REPOSITORY_URL#*@}"
else
echo "gitlabci: no change, nothing to commit ----------"
fi
.prepare-deploy: &prepare-deploy |
echo "gitlabci: Set openfisca-survey-manager config"
mkdir -p /root/.config/openfisca-survey-manager
......@@ -128,12 +104,6 @@ run-notebooks:
#- git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
- git config --global user.name "$GIT_AUTHOR_NAME"
- git config --global user.email "$GIT_EMAIL"
#- git fetch origin documentations-html
#- git rebase --quit || true
#- git switch documentations-html --force
#- git merge -X theirs "origin/$CI_COMMIT_REF_NAME" || true
#- git tag "$CI_COMMIT_SHA"
#- git reset "origin/$CI_COMMIT_REF_NAME" --hard
- git checkout -b documentations-html-$CI_COMMIT_SHA
# On génère la doc
- *prepare-deploy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment