Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webeos-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
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
webservices
webeos
webeos-tests
Commits
5c8b1831
Commit
5c8b1831
authored
1 year ago
by
Chrysoula Dikonimaki
Browse files
Options
Downloads
Patches
Plain Diff
squashfs test
parent
981fb46f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!12
Add a squashfs package
Pipeline
#6962723
failed
1 year ago
Stage: copy
Stage: deploy
Stage: squashfs
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+87
-46
87 additions, 46 deletions
.gitlab-ci.yml
.gitlab/squashfs.sh
+15
-0
15 additions, 0 deletions
.gitlab/squashfs.sh
squashfs/.htaccess
+1
-0
1 addition, 0 deletions
squashfs/.htaccess
with
103 additions
and
46 deletions
.gitlab-ci.yml
+
87
−
46
View file @
5c8b1831
# This variable can be defined here or, if it needs to be hidden, as a secure variable of the project
# This variable can be defined here or, if it needs to be hidden, as a secure variable of the project
variables
:
variables
:
# Important as the default is xrdcp which doens't preserve file permissions
# Important as the default is xrdcp which doens't preserve file permissions
METHOD
:
rsync
METHOD
:
rsync
.master_variables
:
&master_variables
.master_variables
:
&master_variables
EOS_PATH
:
"
/eos/user/o/okdtests/webeos-tests/"
EOS_PATH
:
"
/eos/user/o/okdtests/webeos-tests/"
.dev_variables
:
&dev_variables
EOS_PATH
:
"
/eos/user/o/okdtests/dev-webeos-tests/"
.common_variables
:
&common_variables
SSH_SERVER_HOSTKEYS
:
lxplus ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTA/5AzXgbkSapknIPDoEePTM1PzIBSiyDnpZihdDXKzm8UdXxCDJLUVjBwc1JfBjnaXPEeBKZDuozDss/m98m5qQu+s2Dks000V8cUFTU+BFotzRWX0jWSBpmzse0477b40X2XCPqX0Cqfx9yHdkuMlyF0kJRxXgsGTcwzwbmvqNHJdHHYJJz93hGpBhYMREcDN5VOxXz6Ack3X7xfF29xaC91oOAqq75O11LXF5Y4kAeN9kDG8o6Zsqk4c5at5aqWqzZfnnVtGjhkgU2Mt5aKwptaFMe0Z3ys/zZM4SnsE9NfompnnWsiKk2y09UvrbzuYPWLt43Fp3+IFqRJvBX
.dev_variables
:
&dev_variables
EOS_PATH
:
"
/eos/user/o/okdtests/dev-webeos-tests/"
stages
:
stages
:
-
copy
-
copy
-
deploy
-
deploy
-
squashfs
# Copy repo content to folder that is going to be sent to eos
# Copy repo content to folder that is going to be sent to eos
copy
:
copy
:
stage
:
copy
stage
:
copy
before_script
:
before_script
:
-
yum install -y rsync && yum clean all
-
yum install -y rsync && yum clean all
script
:
script
:
# Create a directory where to move the output generated
# Create a directory where to move the output generated
-
mkdir public
-
mkdir public
# This is an important step as it allows the artifact to NOT
# This is an important step as it allows the artifact to NOT
# include the .git subfolder from the directory where project
# include the .git subfolder from the directory where project
# was checked out by CI runners, since cp * will skip the .git folder.
# was checked out by CI runners, since cp * will skip the .git folder.
-
rsync -a --exclude 'public' --exclude '.git' * public/
-
rsync -a --exclude 'public' --exclude '.git' * public/
artifacts
:
artifacts
:
paths
:
paths
:
# Upload as an artifact the folder where the output has been generated
# Upload as an artifact the folder where the output has been generated
# This will attach to the job the output. It can be browsed or downloaded
# This will attach to the job the output. It can be browsed or downloaded
-
public
-
public
# Make it vanish in 1 hour
# Make it vanish in 1 hour
expire_in
:
1 hour
expire_in
:
1 hour
# Deploy to an EOS folder the contents generated
# Deploy to an EOS folder the contents generated
.base_deploy
:
&base_deploy
.base_deploy
:
&base_deploy
# Executed during the deploy stage
# Executed during the deploy stage
stage
:
deploy
stage
:
deploy
# Custom docker image providing the needed tools to deploy in EOS
# Custom docker image providing the needed tools to deploy in EOS
image
:
gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
image
:
gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script
:
script
:
# Script that performs the deploy to EOS. Makes use of the variables defined in the project
# Script that performs the deploy to EOS. Makes use of the variables defined in the project
# It will copy the generated content to the folder in EOS
# It will copy the generated content to the folder in EOS
-
deploy-eos
-
deploy-eos
# do not run any globally defined before_script or after_script for this step
# do not run any globally defined before_script or after_script for this step
before_script
:
[]
before_script
:
[]
after_script
:
[]
after_script
:
[]
# Create squashfs package in an EOS folder
.add_squashfs
:
&add_squashfs
stage
:
squashfs
before_script
:
-
mkdir -p ~/.ssh
# validate lxplus's SSH key
-
'
echo
"$SSH_SERVER_HOSTKEYS"
>
~/.ssh/known_hosts'
# tell SSH to forward Kerberos credentials so lxplus can access AFS/EOS on behalf of the user
-
'
echo
-e
"Host
*\n\tGSSAPIDelegateCredentials
yes\n\tGSSAPITrustDNS
yes\n\n"
>
~/.ssh/config'
script
:
-
PACKAGE_DIR=squashfs/package
-
CONTENT_DIR=cgi-folder
# make sure to get a forwardable Kerberos ticket so lxplus can access AFS/EOS on behalf of the user
-
echo "${EOS_ACCOUNT_PASSWORD}" | kinit -f ${EOS_ACCOUNT_USERNAME}@CERN.CH
-
ssh ${EOS_ACCOUNT_USERNAME}@lxplus "bash -s" < ./.gitlab/squashfs.sh $EOS_PATH $PACKAGE_DIR $CONTENT_DIR
#- ssh ${EOS_ACCOUNT_USERNAME}@lxplus "eos root://eoshome-a.cern.ch squash new $EOS_PATH$PACKAGE_DIR"
#- ssh ${EOS_ACCOUNT_USERNAME}@lxplus "cp -r $EOS_PATH$CONTENT_DIR/. $EOS_PATH$PACKAGE_DIR/"
#- ssh ${EOS_ACCOUNT_USERNAME}@lxplus "eos root://eoshome-a.cern.ch squash pack $EOS_PATH$PACKAGE_DIR"
Test squashfs
:
<<
:
*add_squashfs
variables
:
<<
:
*dev_variables
<<
:
*common_variables
squashfs
:
<<
:
*add_squashfs
variables
:
<<
:
*master_variables
<<
:
*common_variables
only
:
-
master
Test deploy
:
Test deploy
:
<<
:
*base_deploy
<<
:
*base_deploy
variables
:
variables
:
<<
:
*dev_variables
<<
:
*dev_variables
Deploy
:
Deploy
:
<<
:
*base_deploy
<<
:
*base_deploy
only
:
only
:
-
master
-
master
variables
:
variables
:
<<
:
*master_variables
<<
:
*master_variables
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab/squashfs.sh
0 → 100644
+
15
−
0
View file @
5c8b1831
# Create squashfs package with the contents of a EOS directory in an EOS path
# Input:
# $1: The EOS path
# $2: The subdirectory of the package
# $3: The subdirectory to copy into the package
echo
"Params given as input: "
echo
"EOS path:
$1
"
echo
"Package directory:
$2
"
echo
"Content directory:
$3
"
eos root://eoshome-a.cern.ch squash new
$1$2
cp
-r
$1$3
/.
$1$2
/
eos root://eoshome-a.cern.ch squash pack
$1$2
This diff is collapsed.
Click to expand it.
squashfs/.htaccess
0 → 100644
+
1
−
0
View file @
5c8b1831
Options
FollowSymlinks
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