Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Scripts
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
Specification Tools
Scripts
Commits
57d00866
Commit
57d00866
authored
1 year ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Changing the name of the published file
parent
d11c8051
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#396
failed
1 year ago
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+9
-5
9 additions, 5 deletions
.gitlab-ci.yml
publish_on_pages.sh
+3
-3
3 additions, 3 deletions
publish_on_pages.sh
publish_spec.sh
+1
-1
1 addition, 1 deletion
publish_spec.sh
with
13 additions
and
9 deletions
.gitlab-ci.yml
+
9
−
5
View file @
57d00866
...
@@ -78,13 +78,15 @@ Publish spec:
...
@@ -78,13 +78,15 @@ Publish spec:
-
chmod +x publish_spec.sh
-
chmod +x publish_spec.sh
-
|
-
|
curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/Spec-template%2Edocx/raw?ref=master" >> onem2m_spec_template.docx
curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/Spec-template%2Edocx/raw?ref=master" >> onem2m_spec_template.docx
-
|
export SPEC_NAME=$(ls | grep *.md | cut -d'.' -f1)
script
:
script
:
-
echo 'Publishing spec'
-
echo 'Publishing spec'
-
./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} onem2m_spec_template.docx
-
./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} onem2m_spec_template.docx
$SPEC_NAME
artifacts
:
artifacts
:
name
:
"
${
CI_PROJ
EC
T
_NAME}_${CI_COMMIT_TAG}"
name
:
"
${
SP
EC_NAME}_${CI_COMMIT_TAG}"
paths
:
paths
:
-
"
${
CI_PROJ
EC
T
_NAME}_${CI_COMMIT_TAG}.docx"
-
"
${
SP
EC_NAME}_${CI_COMMIT_TAG}.docx"
pages
:
pages
:
stage
:
web
stage
:
web
...
@@ -104,9 +106,11 @@ pages:
...
@@ -104,9 +106,11 @@ pages:
curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/updateIndex%2Epy/raw?ref=master" >> updateIndex.py
curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/updateIndex%2Epy/raw?ref=master" >> updateIndex.py
-
|
-
|
curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/index%2Ehtml/raw?ref=master" >> index.html
curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/index%2Ehtml/raw?ref=master" >> index.html
-
|
export SPEC_NAME=$(ls | grep *.md | cut -d'.' -f1)
script
:
script
:
-
echo 'Publishing on pages'
-
echo 'Publishing on pages'
-
./publish_on_pages.sh updateIndex.py $CI_PAGES_URL ${CI_PROJECT_NAME} $TAG_NAME index.html $CLEAN_WEB_PAGES
-
./publish_on_pages.sh updateIndex.py $CI_PAGES_URL ${CI_PROJECT_NAME} $TAG_NAME index.html $CLEAN_WEB_PAGES
$SPEC_NAME
artifacts
:
artifacts
:
paths
:
paths
:
-
public
-
public
\ No newline at end of file
This diff is collapsed.
Click to expand it.
publish_on_pages.sh
+
3
−
3
View file @
57d00866
...
@@ -21,12 +21,12 @@ if [ $6 == 'true' ]; then
...
@@ -21,12 +21,12 @@ if [ $6 == 'true' ]; then
elif
[
$6
==
'false'
]
;
then
elif
[
$6
==
'false'
]
;
then
mkdir
-p
"public/
$4
"
mkdir
-p
"public/
$4
"
ls
public/
ls
public/
cp
-r
-f
"
$
3
_$4
.docx"
public/
$4
cp
-r
-f
"
$
7
_$4
.docx"
public/
$4
docker run
--rm
-v
$(
pwd
)
:/tmp
-w
/tmp
"
$DOCKER_IMAGE
"
pip
install
bs4
&&
python3
$1
"
$
3
_$4
"
"
$4
/
$
3
_$4
.docx"
"
$5
"
docker run
--rm
-v
$(
pwd
)
:/tmp
-w
/tmp
"
$DOCKER_IMAGE
"
pip
install
bs4
&&
python3
$1
"
$
7
_$4
"
"
$4
/
$
7
_$4
.docx"
"
$5
"
else
else
echo
'Removing entry for '
$6
echo
'Removing entry for '
$6
rm
-r
-f
public/
$6
rm
-r
-f
public/
$6
docker run
--rm
-v
$(
pwd
)
:/tmp
-w
/tmp
"
$DOCKER_IMAGE
"
pip
install
bs4
&&
python3
$1
-re
"
$
3
_$6
"
"
$4
/
$
3
_$4
.docx"
"
$5
"
docker run
--rm
-v
$(
pwd
)
:/tmp
-w
/tmp
"
$DOCKER_IMAGE
"
pip
install
bs4
&&
python3
$1
-re
"
$
7
_$6
"
"
$4
/
$
7
_$4
.docx"
"
$5
"
fi
fi
echo
"------ Zip the content and publish the zip again ------"
echo
"------ Zip the content and publish the zip again ------"
...
...
This diff is collapsed.
Click to expand it.
publish_spec.sh
+
1
−
1
View file @
57d00866
...
@@ -30,7 +30,7 @@ for i in *.md ; do
...
@@ -30,7 +30,7 @@ for i in *.md ; do
echo
"
\n
------ Preparaing spec --------"
echo
"
\n
------ Preparaing spec --------"
docker run
--rm
-v
$(
pwd
)
:/tmp/
-u
$(
id
-u
)
:
$(
id
-g
)
"
$TOOLS_DOCKER_IMAGE
"
pandocFilter
-o
"/tmp/"
"/tmp/
$i
"
docker run
--rm
-v
$(
pwd
)
:/tmp/
-u
$(
id
-u
)
:
$(
id
-g
)
"
$TOOLS_DOCKER_IMAGE
"
pandocFilter
-o
"/tmp/"
"/tmp/
$i
"
echo
"
\n
------ Publishing spec --------"
echo
"
\n
------ Publishing spec --------"
docker run
--rm
-v
$(
pwd
)
:/data
-u
$(
id
-u
)
:
$(
id
-g
)
"
$DOCKER_IMAGE
"
"/data/
$i
"
-f
markdown
-t
docx
--reference-doc
"/data/
${
3
}
"
-o
"
${
PROJECT_NAME
}
_
${
2
}
.docx"
docker run
--rm
-v
$(
pwd
)
:/data
-u
$(
id
-u
)
:
$(
id
-g
)
"
$DOCKER_IMAGE
"
"/data/
$i
"
-f
markdown
-t
docx
--reference-doc
"/data/
${
3
}
"
-o
"
${
4
}
_
${
2
}
.docx"
done
done
...
...
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