Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docs
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jupyterjsc
docs
Commits
7d39a5b3
Commit
7d39a5b3
authored
9 months ago
by
Tim Kreuzer
Browse files
Options
Downloads
Patches
Plain Diff
update .gitlab-ci.yml
parent
45fadf38
No related branches found
No related tags found
No related merge requests found
Pipeline
#231630
passed
9 months ago
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+18
-15
18 additions, 15 deletions
.gitlab-ci.yml
with
18 additions
and
15 deletions
.gitlab-ci.yml
+
18
−
15
View file @
7d39a5b3
...
@@ -12,39 +12,42 @@ pages:
...
@@ -12,39 +12,42 @@ pages:
# Define a function to download artifacts based on a given URL
# Define a function to download artifacts based on a given URL
download_artifacts() {
download_artifacts() {
local url=$1
local url=$1
local
dir
=$2
local
branch
=$2
local http_status=$(curl -k -o /dev/null -s -w "%{http_code}" "$url")
local http_status=$(curl -k -o /dev/null -s -w "%{http_code}" "$url")
if [[ "$http_status" =~ ^2 ]]; then
if [[ "$http_status" =~ ^2 ]]; then
echo "HTTP $http_status OK. Downloading artifacts from $url..."
echo "HTTP $http_status OK. Downloading artifacts from $url..."
curl -o artifacts.zip "$url"
curl -o artifacts.zip "$url"
mkdir -p "$dir"
mkdir -p tmp
unzip -o artifacts.zip -d "$dir"
if unzip -o artifacts.zip -d tmp; then
test -d tmp/public/${branch} && mv tmp/public/${branch} public/${branch}
else
echo "Failed to unzip artifacts.zip for branch ${branch}"
fi
# This artifact contains all branches, but we're only interested in one
rm artifacts.zip
rm artifacts.zip
rm -rf tmp
else
else
echo "No artifacts found or failed to download from $url. HTTP Status Code: $http_status"
echo "No artifacts found or failed to download from $url. HTTP Status Code: $http_status"
fi
fi
}
}
mkdir -p public
# Loop through each branch and download artifacts
# Loop through each branch and download artifacts
for branch in $BRANCHES; do
for branch in $BRANCHES; do
# Skip download if branch is the current commit branch
if [[ "$branch" == "$CI_COMMIT_REF_NAME" ]]; then
echo "Skipping artifact download for current branch: $branch"
continue
fi
artifact_url="${ARTIFACT_URL_PREFIX}/${branch}/${ARTIFACT_URL_SUFFIX}"
artifact_url="${ARTIFACT_URL_PREFIX}/${branch}/${ARTIFACT_URL_SUFFIX}"
download_artifacts "$artifact_url" "
./public/
$branch"
download_artifacts "$artifact_url" "$branch"
done
done
-
pip install -r requirements.txt
-
pip install -r requirements.txt
-
echo "Previous content of public directory"
-
ls public
-
echo "ls juniq"
-
ls public/juniq
-
echo "ls jupyterjsc"
-
ls public/jupyterjsc
-
mkdocs build -d tmp
-
ls tmp
-
rm -rf public/${CI_COMMIT_REF_NAME}
-
rm -rf public/${CI_COMMIT_REF_NAME}
-
mkdocs build -d tmp
-
mv tmp public/${CI_COMMIT_REF_NAME}
-
mv tmp public/${CI_COMMIT_REF_NAME}
-
echo "Post-build content of public directory"
-
ls public
artifacts
:
artifacts
:
paths
:
paths
:
-
public
-
public
...
...
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