Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DAACDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Syed Bilal Raees
DAACDemo
Commits
f3101b9b
Commit
f3101b9b
authored
Apr 12, 2023
by
Waqas Riaz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update archive creation strategy
parent
245a7364
Pipeline
#4140
failed with stages
in 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
.gitlab-ci.yml
.gitlab-ci.yml
+9
-12
No files found.
.gitlab-ci.yml
View file @
f3101b9b
...
@@ -10,24 +10,23 @@ build_job:
...
@@ -10,24 +10,23 @@ build_job:
-
tar --version
-
tar --version
script
:
script
:
-
echo "Starting script for deploying to Jfrog"
-
echo "Starting script for deploying to Jfrog"
-
files_list=$(find . -type f -name "*.jsonnet" ! -path "./grafonnet-lib/*")
-
existing_files=$(find . -type f -name "*.jsonnet" ! -path "./grafonnet-lib/*" | xargs -I{} basename {} )
-
last_commit_files=$(git diff --name-only HEAD^ HEAD)
-
files_list=$(comm -12 <(echo "${last_commit_files[@]}" | tr ' ' '\n' | sort) <(echo "${existing_files[@]}" | tr ' ' '\n' | sort))
-
echo "Creating directory"
-
echo "Creating directory"
-
mkdir grafonnet
-
mkdir grafonnet
# - export version=$(echo "$(cat version.txt) + 0.1" | bc)
# - export version=$(cat version.txt)
-
ls
-
ls
-
|
-
|
while IFS= read -r jsonnet_file
;
for json_file in ${files_list[@]}
;
do
do
echo $json
net
_file
echo $json_file
filename=$(basename -- "$json
net
_file")
filename=$(basename -- "$json_file")
filename="${filename%.*}"
filename="${filename%.*}"
echo $filename
echo $filename
JSONNET_PATH=grafonnet-lib \
JSONNET_PATH=grafonnet-lib \
jsonnet $json
net
_file > grafonnet/$filename.json
jsonnet $json_file > grafonnet/$filename.json
done <<< "$files_list"
done
-
tar -cvzf grafonnet.tar.gz grafonnet/
-
tar -cvzf grafonnet.tar.gz grafonnet/
# - echo "version.txt is `cat version.txt` and uploading version is $version"
-
echo "Uploading to $ARTIFACTORY_URL/grafonet/$CI_PIPELINE_ID/grafonnet.tar.gz"
-
echo "Uploading to $ARTIFACTORY_URL/grafonet/$CI_PIPELINE_ID/grafonnet.tar.gz"
-
curl -u $ARTIFACTORY_USER:$ARTIFACTORY_PASS -T grafonnet.tar.gz "$ARTIFACTORY_URL/grafonet/$CI_PIPELINE_ID/grafonnet.tar.gz"
-
curl -u $ARTIFACTORY_USER:$ARTIFACTORY_PASS -T grafonnet.tar.gz "$ARTIFACTORY_URL/grafonet/$CI_PIPELINE_ID/grafonnet.tar.gz"
...
@@ -45,8 +44,6 @@ deploy_job:
...
@@ -45,8 +44,6 @@ deploy_job:
-
jq --version
-
jq --version
-
tar --version
-
tar --version
script
:
script
:
# - export version=$(echo "$(cat version.txt) + 0.1" | bc)
# - export version=$(cat version.txt)
-
mkdir -p build/$CI_BUILD_ID
-
mkdir -p build/$CI_BUILD_ID
-
cd build/$CI_BUILD_ID
-
cd build/$CI_BUILD_ID
-
echo "Downloading artifact from $ARTIFACTORY_URL/grafonet/$CI_PIPELINE_ID/grafonnet.tar.gz"
-
echo "Downloading artifact from $ARTIFACTORY_URL/grafonet/$CI_PIPELINE_ID/grafonnet.tar.gz"
...
...
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