Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devops_wise24_ewbo
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
Service Desk
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
ewbo4360
devops_wise24_ewbo
Commits
8416f1ff
Commit
8416f1ff
authored
3 months ago
by
ewbo4360
Browse files
Options
Downloads
Patches
Plain Diff
trying to patch the artifact publishing
parent
20326166
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#74551
failed
3 months ago
Stage: build
Stage: test
Stage: publish-artifacts
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+37
-12
37 additions, 12 deletions
.gitlab-ci.yml
with
37 additions
and
12 deletions
.gitlab-ci.yml
+
37
−
12
View file @
8416f1ff
...
...
@@ -13,7 +13,7 @@
stages
:
-
build
-
test
-
publish
-
publish
-artifacts
cache
:
paths
:
...
...
@@ -26,13 +26,18 @@
# the 2 following steps make sure that the required building tool (meson) is installed on the runner
#and also that all the other external dependencies are here (this will be part of a container later)
-
apt-get update
# Make sure the package lists are updated
-
apt update
-
apt-get upgrade -y
-
apt upgrade -y
#install all necessary dependencies
-
apt-get install python3-pip -y
-
apt-get install meson -y
-
apt-get install -y ccache
-
apt-get install -y cmake
-
apt-get install -y ninja-build
-
apt install -y ca-certificates
-
update-ca-certificates
-
apt install -y curl
-
apt-get install -y libfmt-dev
-
apt-get install -y libgtest-dev
-
apt-get install -y libpcre2-dev
...
...
@@ -69,21 +74,26 @@
build-job
:
stage
:
build
# rules:
# - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_TAG == null'
image
:
ubuntu:24.04
script
:
-
echo "Hello, $GITLAB_USER_LOGIN! This is a build job"
-
mkdir -p ./artifacts
-
meson compile -C output/full --verbose
# artifacts:
# paths:
# - output/full # Publish the built artifacts
artifacts
:
paths
:
-
./artifacts
# Publish the built artifacts
expire_in
:
300 sec
cache
:
paths
:
-
output/full
#save cache for later jobs
test-job1
:
stage
:
test
# rules:
# - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_TAG == null'
image
:
ubuntu:24.04
script
:
-
echo "This job is for untit-tests"
...
...
@@ -96,6 +106,8 @@
test-job2
:
stage
:
test
# rules:
# - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_TAG == null'
image
:
ubuntu:24.04
script
:
-
echo "This job is for general tests"
...
...
@@ -107,20 +119,33 @@
paths
:
-
output/full
#reuse the build cache :)
upload
:
stage
:
publish
to-registry
:
stage
:
publish-artifacts
# rules:
# - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_TAG == null'
image
:
ubuntu:24.04
dependencies
:
-
build-job
script
:
-
echo "This job deploys something from the $CI_COMMIT_BRANCH branch."
-
echo "Publishing the artifact..."
# - cp -r output/full ./artifacts # Ensure the artifacts are included for deployment
-
|
for artifact in ./artifacts/*; do
chmod +x ${artifact}
curl \
--header "JOB-TOKEN: ${CI_JOB_TOKEN}" \
--upload-files ${artifact} \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/artifacts/${version}/"
done
environment
:
production
cache
:
paths
:
-
output/full
#reuse the build cache :)
artifacts
:
when
:
on_failure
access
:
all
expire_in
:
301 sec
paths
:
-
./artifacts
# Publish the artifact(s) to GitLab
# artifacts:
# when: on_failure
# access: all
# expire_in: 301 sec
# paths :
# - ./artifacts # Publish the artifact(s) to GitLab
\ No newline at end of file
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