Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
03cb751c
Commit
03cb751c
authored
Jun 08, 2021
by
Guilhem Saurel
Browse files
Target.public
parent
c8bbfcd4
Pipeline
#14882
failed with stage
in 1 minute and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/migrations/0057_target_public.py
0 → 100644
View file @
03cb751c
# Generated by Django 3.2.4 on 2021-06-08 16:47
from
django.db
import
migrations
,
models
def
pal_private
(
apps
,
schema_editor
):
Target
=
apps
.
get_model
(
'rainboard'
,
'Target'
)
Target
.
objects
.
filter
(
name__in
=
[
'dubnium'
,
'erbium'
,
'ferrum'
]).
update
(
public
=
False
)
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'rainboard'
,
'0056_disable_1604'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'target'
,
name
=
'public'
,
field
=
models
.
BooleanField
(
default
=
True
),
),
migrations
.
RunPython
(
pal_private
),
]
rainboard/models.py
View file @
03cb751c
...
...
@@ -814,6 +814,7 @@ class Target(NamedModel):
active
=
models
.
BooleanField
(
default
=
True
)
main
=
models
.
BooleanField
(
default
=
False
)
py2_available
=
models
.
BooleanField
(
default
=
True
)
public
=
models
.
BooleanField
(
default
=
True
)
objects
=
TargetQuerySet
.
as_manager
()
...
...
@@ -956,12 +957,16 @@ class Image(models.Model):
py
=
''
return
f
'
{
self
.
robotpkg
}{
py
}
:
{
self
.
target
}
'
@
property
def
public
(
self
):
return
self
.
target
.
public
and
self
.
robotpkg
.
project
.
public
def
get_build_args
(
self
):
ret
=
{
'TARGET'
:
self
.
target
,
'ROBOTPKG'
:
self
.
robotpkg
,
'CATEGORY'
:
self
.
robotpkg
.
category
,
'REGISTRY'
:
se
lf
.
robotpkg
.
project
.
registry
(),
'REGISTRY'
:
se
ttings
.
PUBLIC_REGISTRY
if
self
.
public
else
settings
.
PRIVATE_REGISTRY
'CCACHE'
:
self
.
robotpkg
.
project
.
ccache
,
}
if
not
self
.
robotpkg
.
project
.
public
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment