Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CloWM Workflow Service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Computational Metagenomics
CloWM
CloWM Workflow Service
Commits
4d231131
Verified
Commit
4d231131
authored
1 year ago
by
Daniel Göbel
Browse files
Options
Downloads
Patches
Plain Diff
Use GitLab Dependency Proxy in CI pipeline
#62
parent
7b5543c7
No related branches found
No related tags found
2 merge requests
!69
Delete dev branch
,
!59
Resolve "Endpoint for developer statistics"
Pipeline
#39563
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-5
5 additions, 5 deletions
.gitlab-ci.yml
app/git_repository/abstract_repository.py
+4
-2
4 additions, 2 deletions
app/git_repository/abstract_repository.py
with
9 additions
and
7 deletions
.gitlab-ci.yml
+
5
−
5
View file @
4d231131
image
:
python:3.11-slim
image
:
${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/
python:3.11-slim
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
...
...
@@ -43,7 +43,7 @@ integration-test-job: # Runs integration tests with the database
DB_DATABASE
:
"
integration-test-db"
DB_HOST
:
"
integration-test-db"
services
:
-
name
:
mysql:8
-
name
:
${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/
mysql:8
alias
:
integration-test-db
variables
:
MYSQL_RANDOM_ROOT_PASSWORD
:
"
yes"
...
...
@@ -71,7 +71,7 @@ e2e-test-job: # Runs e2e tests on the API endpoints
DB_DATABASE
:
"
e2e-test-db"
DB_HOST
:
"
e2e-test-db"
services
:
-
name
:
mysql:8
-
name
:
${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/
mysql:8
alias
:
e2e-test-db
variables
:
MYSQL_RANDOM_ROOT_PASSWORD
:
"
yes"
...
...
@@ -136,7 +136,7 @@ lint-test-job: # Runs linters checks on code
publish-dev-docker-container-job
:
stage
:
deploy
image
:
name
:
gcr.io/kaniko-project/executor:v1.1
6
.0-debug
name
:
gcr.io/kaniko-project/executor:v1.1
7
.0-debug
entrypoint
:
[
"
"
]
dependencies
:
[]
only
:
...
...
@@ -159,7 +159,7 @@ publish-dev-docker-container-job:
publish-docker-container-job
:
stage
:
deploy
image
:
name
:
gcr.io/kaniko-project/executor:v1.1
6
.0-debug
name
:
gcr.io/kaniko-project/executor:v1.1
7
.0-debug
entrypoint
:
[
"
"
]
dependencies
:
[]
only
:
...
...
This diff is collapsed.
Click to expand it.
app/git_repository/abstract_repository.py
+
4
−
2
View file @
4d231131
...
...
@@ -145,12 +145,13 @@ class GitRepository(ABC):
Flags if the files exist.
"""
with
tracer
.
start_as_current_span
(
"
git_check_files_exists
"
)
as
span
:
span
.
set_attribute
(
"
repository
"
,
self
.
url
)
span
.
set_attribute
s
({
"
repository
"
:
self
.
url
,
"
files
"
:
files
}
)
tasks
=
[
asyncio
.
ensure_future
(
self
.
check_file_exists
(
file
,
client
=
client
))
for
file
in
files
]
result
=
await
asyncio
.
gather
(
*
tasks
)
if
raise_error
:
missing_files
=
[
f
for
f
,
exist
in
zip
(
files
,
result
)
if
not
exist
]
if
len
(
missing_files
)
>
0
:
span
.
set_attribute
(
"
missing_files
"
,
missing_files
)
raise
HTTPException
(
status_code
=
status
.
HTTP_400_BAD_REQUEST
,
detail
=
f
"
The files
{
'
,
'
.
join
(
missing_files
)
}
are missing in the repo
{
str
(
self
)
}
"
,
...
...
@@ -175,7 +176,8 @@ class GitRepository(ABC):
with
SpooledTemporaryFile
(
max_size
=
512000
)
as
f
:
# temporary file with 500kB data spooled in memory
await
self
.
download_file
(
filepath
,
client
=
client
,
file_handle
=
f
)
f
.
seek
(
0
)
obj
.
upload_fileobj
(
f
)
with
tracer
.
start_as_current_span
(
"
s3_upload_file
"
):
obj
.
upload_fileobj
(
f
)
async
def
download_file_stream
(
self
,
filepath
:
str
,
client
:
AsyncClient
)
->
AsyncIterator
[
bytes
]:
"""
...
...
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