Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aura-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
AURA
aura-tests
Commits
53d971ab
Commit
53d971ab
authored
9 months ago
by
Kay Effenberger
Browse files
Options
Downloads
Patches
Plain Diff
Feat adding ci
parent
f6f5c03b
No related branches found
No related tags found
1 merge request
!1
Feat adding ci
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+168
-0
168 additions, 0 deletions
.gitlab-ci.yml
with
168 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
168
−
0
View file @
53d971ab
stages
:
-
test
.aura-runtime
:
# These variables are basically a copy from what can be found in tests/env.
# GitLab supports dotenv reports that can be loaded in dependent jobs, but
# there doesn’t seem to be a way to load an env file directly.
variables
:
# GitLab feature flag: services need to be able to communicate for OIDC
FF_NETWORK_PER_BUILD
:
'
true'
# Service output might be useful for debugging
CI_DEBUG_SERVICES
:
'
true'
# general settings
ADMIN_USERNAME
:
admin
ADMIN_PASSWORD
:
admin
# tank settings
TANK_HOST
:
tank
TANK_PORT
:
8040
TANK_ORIGIN
:
http://$TANK_HOST:$TANK_PORT
TANK_CALLBACK_BASE_URL
:
$TANK_ORIGIN
TANK_OIDC_CLIENT_ID
:
123456
TANK_OIDC_CLIENT_SECRET
:
tank-oidc-secret
TANK_POSTGRES_DB
:
tank
TANK_POSTGRES_USER
:
tank
TANK_POSTGRES_PASSWORD
:
aura
TANK_VERSION
:
main
# steering settings
STEERING_HOST
:
steering
STEERING_PORT
:
8000
STEERING_ORIGIN
:
http://$STEERING_HOST:$STEERING_PORT
STEERING_VERSION
:
main
# dashboard settings
DASHBOARD_VERSION
:
main
DASHBOARD_BRANCH
:
main
DASHBOARD_PORT
:
80
DASHBOARD_HOST
:
dashbaord
DASHBOARD_ORIGIN
:
http://$DASHBOARD_HOST:$DASHBOARD_PORT
DASHBOARD_CALLBACK_BASE_URL
:
$DASHBOARD_ORIGIN
DASHBOARD_OIDC_CLIENT_ID
:
234567
DASHBOARD_OIDC_CLIENT_SECRET
:
dashboard-oidc-secret
services
:
-
name
:
postgres:13
alias
:
postgres
variables
:
POSTGRES_DB
:
$TANK_POSTGRES_DB
POSTGRES_USER
:
$TANK_POSTGRES_USER
POSTGRES_PASSWORD
:
$TANK_POSTGRES_PASSWORD
-
name
:
autoradio/steering:${STEERING_VERSION}
alias
:
steering
variables
:
DJANGO_SUPERUSER_EMAIL
:
admin@example.org
DJANGO_SUPERUSER_USERNAME
:
$ADMIN_USERNAME
DJANGO_SUPERUSER_PASSWORD
:
$ADMIN_PASSWORD
entrypoint
:
[
'
/bin/bash'
]
command
:
-
'
-c'
-
|
cat >>/app/steering/settings.py <<EOF
CORS_ALLOWED_ORIGINS = ["$DASHBOARD_ORIGIN"]
ALLOWED_HOSTS = ["*"]
SITE_URL = "$STEERING_ORIGIN"
DEBUG = True
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"console": {
"class": "logging.StreamHandler",
},
},
"root": {
"handlers": ["console"],
"level": "INFO",
},
}
EOF
poetry run ./manage.py initialize
poetry run ./manage.py loadfixtures sample
exec ./entrypoint.sh run.prod
-
name
:
autoradio/tank:${TANK_VERSION}
alias
:
tank
entrypoint
:
[
'
/bin/bash'
]
command
:
-
'
-c'
-
|
# make sure postgres is up before starting tank
while true; do
timeout 0.25 cat >/dev/null 2>&1 </dev/tcp/postgres/5432
if [ "$?" = 124 ]; then break; fi
done
while true; do
timeout 0.25 cat >/dev/null 2>&1 <"/dev/tcp/steering/$STEERING_PORT"
if [ "$?" = 124 ]; then break; fi
done
cat >/tmp/tank.yaml <<EOF
store:
path: /srv/audio
audio:
format: flac
sample-rate: 44100
db:
type: postgres
host: postgres
tls: disable
username: "$TANK_POSTGRES_USER"
password: "$TANK_POSTGRES_PASSWORD"
database: "$TANK_POSTGRES_DB"
importer:
temp-path: /srv/import-temp
workers: 4
normalizer: ffmpeg
auth:
sessions:
max-age: 12h
static:
engine:
secret: no-secret
readonly: true
allShows: true
oidc:
issuer-url: $STEERING_ORIGIN/openid
client-id: $TANK_OIDC_CLIENT_ID
client-secret: $TANK_OIDC_CLIENT_SECRET
callback-url: $TANK_ORIGIN/auth/oidc/callback
login-timeout: 10m
web:
cors:
allowed-origins: ['$DASHBOARD_ORIGIN']
allowed-methods:
- GET
- PUT
- POST
- PATCH
- DELETE
allowed-headers: ['*']
allow-credentials: true
debug: true
EOF
/usr/local/bin/tank --config /tmp/tank.yaml run --listen ":$TANK_PORT"
-
name
:
autoradio/dashboard:${DASHBOARD_VERSION}
alias
:
dashboard
variables
:
DASHBOARD_OIDC_CLIENT_ID
:
$DASHBOARD_OIDC_CLIENT_ID
AURA_PROTO
:
http
AURA_HOST
:
$DASHBOARD_HOST
integration-tests
:
extends
:
.aura-runtime
stage
:
test
image
:
debian:bookworm-slim
before_script
:
-
apt update -y && apt install -y make wait-for-it
-
wait-for-it -t 120 -h steering -p "$STEERING_PORT"
-
wait-for-it -t 120 -h tank -p "$TANK_PORT"
-
wait-for-it -t 120 -h dashboard -p "$DASHBOARD_PORT"
script
:
-
echo 'insert integrations Tests'
\ No newline at end of file
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