Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
conda-environments
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
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
LHCb Core Software
conda-environments
Merge requests
!54
New deployment and update DPA/analysis-productions
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
New deployment and update DPA/analysis-productions
new-deployment
into
master
Overview
0
Commits
3
Pipelines
1
Changes
7
Merged
Chris Burr
requested to merge
new-deployment
into
master
2 years ago
Overview
0
Commits
3
Pipelines
1
Changes
7
Expand
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
efbc0a28
3 commits,
2 years ago
7 files
+
65
−
132
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
.ci/create-artifacts.py deleted
100755 → 0
+
0
−
55
Options
#!/usr/bin/env python
import
subprocess
import
shutil
import
os
from
os.path
import
dirname
,
isdir
,
isfile
,
islink
,
join
,
relpath
import
tempfile
subdir
=
"
linux-64
"
cvmfs_base
=
"
/cvmfs/lhcbdev.cern.ch/conda
"
pkgs_dir
=
join
(
cvmfs_base
,
"
pkgs
"
,
subdir
)
envs_dir
=
join
(
cvmfs_base
,
"
envs
"
)
output_dir
=
join
(
os
.
getcwd
(),
'
build-artifacts
'
)
TAR_CMD
=
[
"
tar
"
,
"
--zstd
"
,
"
--hard-dereference
"
,
"
--recursive
"
,
"
--create
"
]
if
isdir
(
output_dir
):
shutil
.
rmtree
(
output_dir
)
os
.
makedirs
(
output_dir
)
tarball_paths
=
set
()
# Package cache
for
fn
in
os
.
listdir
(
pkgs_dir
):
if
fn
in
[
"
cache
"
,
"
urls
"
]:
continue
fn
=
join
(
pkgs_dir
,
fn
)
if
not
islink
(
fn
)
and
not
isdir
(
fn
):
print
(
"
Adding:
"
,
fn
)
tarball_paths
.
add
(
fn
)
# Environments
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
envs_dir
,
topdown
=
True
):
print
(
"
Trying
"
,
dirpath
)
if
"
.cvmfscatalog
"
in
filenames
:
print
(
"
Found environment:
"
,
dirpath
)
tarball_paths
.
add
(
dirpath
)
yaml_fn
=
dirpath
+
"
.yaml
"
if
not
isfile
(
yaml_fn
):
raise
RuntimeError
(
"
Failed to find yaml file
"
+
repr
(
yaml_fn
))
tarball_paths
.
add
(
yaml_fn
)
dirnames
[:]
=
[]
if
not
tarball_paths
:
raise
RuntimeError
(
"
Failed to find anything to upload!
"
)
with
tempfile
.
NamedTemporaryFile
(
mode
=
"
wt
"
)
as
fp
:
fp
.
write
(
"
\n
"
.
join
([
relpath
(
fn
,
cvmfs_base
)
for
fn
in
tarball_paths
]))
fp
.
flush
()
tar_fn
=
join
(
output_dir
,
f
"
{
os
.
environ
[
'
CI_PIPELINE_ID
'
]
}
.tar.ztd
"
)
print
(
"
Creating
"
,
tar_fn
)
subprocess
.
run
(
TAR_CMD
+
[
f
"
--directory=
{
cvmfs_base
}
"
,
f
"
--file=
{
tar_fn
}
"
,
"
--files-from
"
,
fp
.
name
],
check
=
True
)
Loading