Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sixue.cheng
Linux
Commits
214715f8
Commit
214715f8
authored
2 years ago
by
sixue.cheng
Browse files
Options
Download
Email Patches
Plain Diff
Update .gitlab-ci.yml, .gitlab-template-ci.yml
parent
2aef66d1
openEuler-test
fedora-test
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+10
-41
.gitlab-ci.yml
.gitlab-template-ci.yml
+74
-0
.gitlab-template-ci.yml
with
84 additions
and
41 deletions
+84
-41
.gitlab-ci.yml
+
10
-
41
View file @
214715f8
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
stages
:
-
init_repo
# List of stages for jobs,and their orderof execution
-
is_update
variables
:
branch_name
:
$CI_COMMIT_BRANCH
baseWork
:
/home/gitlab-runner/ubuntu-rootfs
file_name
:
${branch_name}_${CI_PIPELINE_ID}
code_url
:
${baseWork}/${file_name}
init_repo-job
:
# This job runs in the build stage, which runs first.
stage
:
init_repo
tags
:
-
shell.buildtest
script
:
-
cd $baseWork
-
python3 gettxt.py
is_update-job
:
# This job runs in the build stage, which runs first.
stage
:
is_update
tags
:
-
shell.buildtest
script
:
-
cd $baseWork
-
python3 isupdate.py
needs
:
-
init_repo-job
-
triggers
Fedora-Minimal-Rawhide-20200108.n.0-sda.raw.xz-job
:
stage
:
triggers
trigger
:
include
:
.gitlab-template-ci.yml
variables
:
tagname
:
Fedora-Minimal-Rawhide-20200108.n.0-sda.raw.xz
link
:
http://120.92.155.32:8082/artifactory/ci/externalOs/fedora/Fedora-Minimal-Rawhide-20200108.n.0-sda.raw.xz
date
:
01 Feb 2021 06:15:10 +0000
only
:
-
main
-
fedora-test
This diff is collapsed.
Click to expand it.
.gitlab-template-ci.yml
0 → 100644
+
74
-
0
View file @
214715f8
stages
:
-
test
-
download
-
creat-roofs
-
upload-rootfs
variables
:
tagname
:
${tagname}
link
:
${link}
date
:
${date}
branch_name
:
$CI_COMMIT_BRANCH
baseWork
:
/home/gitlab-runner/fedora-rootfs
file_name
:
${branch_name}_${CI_PIPELINE_ID}
code_url
:
${baseWork}/${file_name}
ROOTFS_EXT4
:
${CI_PIPELINE_ID}_${tagname}_rootfs.ext4
jforurl
:
http://120.92.155.32:8082/artifactory/ci/OS/fedora
gitcode
:
ssh://git@120.92.155.32:10080/tops/ops/Linux.git
ROOTFS_SIZE
:
2584M
init-job
:
stage
:
test
script
:
-
cd $baseWork
-
rm -rf $file_name
-
mkdir $file_name
-
cd $file_name
# - git clone -b $branch_name $gitcode sh
# - mv sh/* .
tags
:
# - shell.buildtest
# - shell.ubuntu
-
shell.citest
download-job
:
stage
:
download
script
:
-
cd $code_url
-
python3 downloadfile.py $link
-
unxz $tagname
-
mkdir rootfs_origin_mount
-
sudo mount "${devLoop}p4" rootfs_origin_mount
-
cd rootfs_origin_mount
-
sudo tar -zcf ../$tagname.rootfs.tar.gz *
-
curl -uadmin:AP5ohjc77AatopcVBsY5cupHJ3J -T ../$tagname.rootfs.tar.gz http://120.92.155.32:8082/artifactory/ci/externalOs/fedora/$tagname.rootfs.tar.gz
-
echo $?
-
cd ..
-
sudo umount rootfs_origin_mount
-
sudo losetup -d ${devLoop}
tags
:
# - shell.buildtest
# - shell.ubuntu
-
shell.citest
needs
:
-
init-job
# creat-roofs-job:
# stage: creat-roofs
# script:
# - cd $code_url
# - sudo docker run --rm --name $file_name -u buildman --privileged=true -v $code_url:/home/buildman baseubuntu:v1 /bin/bash -c "cd /home/buildman && ./build.sh ${ROOTFS_EXT4} $tagname $ROOTFS_SIZE"
# tags:
# # - shell.buildtest
# # - shell.ubuntu
# - shell.citest
# needs:
# - download-job
# upload-rootfs-job:
# stage: upload-rootfs
# script:
# - cd $code_url
# - zip mini_${tagname}.zip $ROOTFS_EXT4
# - curl -uadmin:AP5ohjc77AatopcVBsY5cupHJ3J -T mini_${tagname}.zip $jforurl/mini_${tagname}.zip
# tags:
# # - shell.buildtest
# # - shell.ubuntu
# - shell.citest
# needs:
# - creat-roofs-job
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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
Menu
Projects
Groups
Snippets
Help