Update .gitlab-ci.yml file
This commit is contained in:
@@ -31,36 +31,6 @@ pytest:
|
||||
script:
|
||||
- pytest -v
|
||||
|
||||
qodana:
|
||||
stage: 'code_quality'
|
||||
needs: ['gemnasium-python-dependency_scanning', 'semgrep-sast', 'kics-iac-sast']
|
||||
image:
|
||||
name: jetbrains/qodana-python-community
|
||||
entrypoint:
|
||||
- ''
|
||||
cache:
|
||||
- key: qodana-2023.3-$CI_DEFAULT_BRANCH-$CI_COMMIT_REF_SLUG
|
||||
fallback_keys:
|
||||
- qodana-2023.3-$CI_DEFAULT_BRANCH-
|
||||
- qodana-2023.3-
|
||||
paths:
|
||||
- ".qodana/cache"
|
||||
- $CI_PROJECT_DIR/venv
|
||||
variables:
|
||||
QODANA_TOKEN: "$qodana_token2"
|
||||
before_script:
|
||||
- pip install --upgrade --quiet pip
|
||||
- cd $CI_PROJECT_DIR/
|
||||
- python -m venv venv
|
||||
- chmod u+x venv/bin/activate
|
||||
- source venv/bin/activate
|
||||
script:
|
||||
- qodana --save-report --results-dir=$CI_PROJECT_DIR/.qodana/results --cache-dir=$CI_PROJECT_DIR/.qodana/cache
|
||||
artifacts:
|
||||
expose_as: 'Qodana report'
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- ".qodana/results/"
|
||||
|
||||
variables:
|
||||
# fill those if you have a proxy in your environment
|
||||
@@ -134,25 +104,3 @@ Push tag:
|
||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
|
||||
push:
|
||||
stage: 'deploy'
|
||||
image: 'alpine'
|
||||
needs: ['qodana']
|
||||
only:
|
||||
- master
|
||||
before_script:
|
||||
- apk add openssh-client > /dev/null
|
||||
- eval $(ssh-agent -s)
|
||||
- chmod 400 $SSH_PRIVATE_KEY
|
||||
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
|
||||
- cp $SSH_PRIVATE_KEY ~/.ssh/id_rsa
|
||||
|
||||
- ssh-add ~/.ssh/id_rsa
|
||||
script:
|
||||
- ssh $BOT_HOST -oStrictHostKeyChecking=accept-new 'cd /opt/discord/tarkov && git pull'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user