Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
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
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
PrivateStorage
PrivateStorageio
Commits
3201e531
Commit
3201e531
authored
3 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Stop using Docker and start using the fully-configured testing grid
parent
dee264ae
No related branches found
Branches containing commit
No related tags found
3 merge requests
!140
Merge staging into production
,
!122
Merge develop into staging
,
!115
Continuous deployment for the grid systems
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-33
1 addition, 33 deletions
.gitlab-ci.yml
ci-tools/vulnerability-scan
+1
-1
1 addition, 1 deletion
ci-tools/vulnerability-scan
with
2 additions
and
34 deletions
.gitlab-ci.yml
+
1
−
33
View file @
3201e531
...
...
@@ -21,67 +21,35 @@ unit-tests:
-
"
nix-shell
--run
'nix-build
nixos/unit-tests.nix'
&&
cat
result"
.morph-build
:
&MORPH_BUILD
tags
:
# Run this job in a Docker container so that it won't have the system
# /nix/store so that it has to build everything. This is necessary so
# that the logic below that chooses what to send to cachix catches all our
# stuff. Anything that exists in /nix/store at the beginning of the job
# won't be cached. Also there are issues with any concurrent builds
# sharing /nix/store.
#
# This is far from ideal but maybe it's a tolerable hack for now.
-
"
nixos"
-
"
docker"
image
:
"
nixos/nix:latest"
stage
:
"
test"
variables
:
&MORPH_BUILD_VARIABLES
# CACHIX_AUTH_TOKEN, which lets us push to cachix, is supplied by GitLab
# thanks to project-level configuration.
CACHIX_NAME
:
"
privatestorage-opensource"
before_script
:
-
|
nix-env -iA nixpkgs.cachix nixpkgs.bash
cachix use privatestorage-opensource
nix path-info --all > /tmp/store-path-pre-build
script
:
-
|
# GRID is set in one of the "instantiations" of this job template.
nix-shell --command "morph build morph/grid/${GRID}/grid.nix"
after_script
:
-
|
bash -c "comm -13 <(sort /tmp/store-path-pre-build | grep -v '\.drv$') <(nix path-info --all | grep -v '\.drv$' | sort) | cachix push $CACHIX_NAME"
"nix-shell --command "morph build morph/grid/${GRID}/grid.nix"
morph-build-localdev
:
<<
:
*MORPH_BUILD
variables
:
<<
:
*MORPH_BUILD_VARIABLES
GRID
:
"
local"
morph-build-testing
:
<<
:
*MORPH_BUILD
variables
:
<<
:
*MORPH_BUILD_VARIABLES
GRID
:
"
testing"
morph-build-production
:
<<
:
*MORPH_BUILD
variables
:
<<
:
*MORPH_BUILD_VARIABLES
GRID
:
"
production"
vulnerability-scan
:
stage
:
"
test"
script
:
-
"
sed
-i
's/undefined/
\"
unundefined
\"
/'
morph/grid/local/public-keys/users.nix"
-
"
ci-tools/vulnerability-scan
security-report.json"
-
"
ci-tools/count-vulnerabilities
<security-report.json"
artifacts
:
...
...
This diff is collapsed.
Click to expand it.
ci-tools/vulnerability-scan
+
1
−
1
View file @
3201e531
...
...
@@ -21,7 +21,7 @@ OUTPUT=$1
[
-e
scan-target
]
&&
rm
-v
scan-target
nix-shell
--run
'
set -x
if morph_result=$(morph build morph/grid/
local
/grid.nix 2>&1); then
if morph_result=$(morph build morph/grid/
testing
/grid.nix 2>&1); then
object=$(echo "$morph_result" | tail -n 1)
ln -s "$object" scan-target
else
...
...
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