Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netvs-middleware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-middleware
Commits
ac050ec5
Verified
Commit
ac050ec5
authored
3 months ago
by
Janis Streib
Browse files
Options
Downloads
Patches
Plain Diff
UPD: new ci yml due to repo-split
parent
7c81142a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#391087
passed with warnings
3 months ago
Stage: lint
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+119
-0
119 additions, 0 deletions
.gitlab-ci.yml
with
119 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
119
−
0
View file @
ac050ec5
default
:
image
:
debian-bookworm:latest
tags
:
-
netvs
cache
:
key
:
files
:
-
requirements.txt
paths
:
-
venv/
before_script
:
## dependencies
-
apt-get update -y
-
command -v curl || apt-get -y install curl
-
command -v git || apt-get -y install git
-
if [ $CI_JOB_STAGE != "deploy" ]; then command -v pip3 || (apt-get update -y && apt-get install -y python3-pip); fi
-
if [ $CI_JOB_STAGE != "deploy" ]; then (apt-get update -y && apt-get install -y python3-venv && python3 -m venv venv && source venv/bin/activate); fi
-
export NETDB_VERSION="4.1"
stages
:
-
lint
-
deploy
middleware-lint
:
stage
:
lint
script
:
-
command -v venv/bin/flake8 || venv/bin/pip3 install flake8
-
venv/bin/flake8 . --exclude venv/ --count --show-source --statistics --max-line-length=120
needs
:
[]
allow_failure
:
false
interruptible
:
true
middleware-audit
:
stage
:
lint
script
:
-
'
command
-v
ssh-agent
||
(
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
echo "${SSH_PRIVATE_KEY}" | base64 -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
-
apt-get -y install libpq-dev build-essential
-
venv/bin/pip3 install pip-audit
-
venv/bin/pip-audit -r <(grep -vE "net-api-generator|python3.*packages.pgsql.*" requirements.txt)
needs
:
[]
allow_failure
:
true
interruptible
:
true
deploy_lab
:
stage
:
deploy
script
:
-
'
command
-v
ssh-agent
||
(
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
echo "${SSH_PRIVATE_KEY}" | base64 -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
-
ssh www-netvs@netvs-lab.scc.kit.edu "${CI_COMMIT_SHA}"
environment
:
name
:
lab
url
:
https://netvs-lab.scc.kit.edu
only
:
-
lab
deploy_devel
:
stage
:
deploy
script
:
-
'
command
-v
ssh-agent
||
(
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
echo "${SSH_PRIVATE_KEY}" | base64 -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
-
ssh www-netvs@netvs-devel.scc.kit.edu "${CI_COMMIT_SHA}"
environment
:
name
:
devel
url
:
https://netvs-devel.scc.kit.edu
only
:
-
devel
interruptible
:
false
deploy_test
:
stage
:
deploy
script
:
-
'
command
-v
ssh-agent
||
(
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | base64 -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
-
ssh www-netvs@netvs-test.scc.kit.edu "${CI_COMMIT_SHA}"
environment
:
name
:
test
url
:
https://netvs-test.scc.kit.edu
only
:
-
main
interruptible
:
false
deploy_prod
:
stage
:
deploy
script
:
-
'
command
-v
ssh-agent
||
(
apt-get
install
openssh-client
-y
)'
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY" | base64 -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
-
ssh www-netvs@netvs.scc.kit.edu "${CI_COMMIT_SHA}"
environment
:
name
:
prod
url
:
https://netvs.scc.kit.edu
only
:
-
main
interruptible
:
false
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment