Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Data API Reader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Utils
FACT Data API Reader
Commits
0f9b712f
Commit
0f9b712f
authored
6 months ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Fixing nested ci-cd jobs
parent
61ce2495
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci-release.yml
+9
-17
9 additions, 17 deletions
.gitlab-ci-release.yml
.gitlab-ci.yml
+5
-1
5 additions, 1 deletion
.gitlab-ci.yml
with
14 additions
and
18 deletions
.gitlab-ci-release.yml
+
9
−
17
View file @
0f9b712f
image
:
julia:latest
stages
:
-
test
-
register
-
deploy
-
deploy
_release
# Rename this stage to avoid conflict with the deploy stage in .gitlab-ci.yml
# Define the environment variables for authentication
variables
:
GITLAB_REGISTRY_USER
:
$GITLAB_REGISTRY_USER
# Username token
GITLAB_REGISTRY_PASS
:
$GITLAB_REGISTRY_PASS
# Password token
# Test stage
test
:
stage
:
test
script
:
-
julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.test()'
GITLAB_REGISTRY_USER
:
$GITLAB_REGISTRY_USER
GITLAB_REGISTRY_PASS
:
$GITLAB_REGISTRY_PASS
# Register the package in the registry
register
:
...
...
@@ -24,21 +16,21 @@ register:
using Pkg;
Pkg.add("Registrator");
using Registrator;
ENV["GITLAB_USER"] = ENV["GITLAB_REGISTRY_USER"]
ENV["GITLAB_PASS"] = ENV["GITLAB_REGISTRY_PASS"]
ENV["GITLAB_USER"] = ENV["GITLAB_REGISTRY_USER"]
;
ENV["GITLAB_PASS"] = ENV["GITLAB_REGISTRY_PASS"]
;
Registrator.register(RegistrySpec(name="NILURegistry", url="https://git.nilu.no/julia/registry.git"))'
only
:
-
tags
# Deploy the package (tag-based release)
deploy
:
stage
:
deploy
deploy
_release
:
stage
:
deploy
_release
# Using the new stage name to avoid conflicts
script
:
-
julia --project=. -e '
using Pkg;
Pkg.add("TagBot");
ENV["GITLAB_USER"] = ENV["GITLAB_REGISTRY_USER"]
ENV["GITLAB_PASS"] = ENV["GITLAB_REGISTRY_PASS"]
ENV["GITLAB_USER"] = ENV["GITLAB_REGISTRY_USER"]
;
ENV["GITLAB_PASS"] = ENV["GITLAB_REGISTRY_PASS"]
;
TagBot.tag()'
only
:
-
tags
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
5
−
1
View file @
0f9b712f
...
...
@@ -3,7 +3,10 @@ image: julia:latest
stages
:
-
documentation
-
deploy
-
register
# Declare the stage from .gitlab-ci-release.yml
-
deploy_release
# Differentiate release deploy from pages deploy
# Existing jobs for documentation and pages
build documentation
:
stage
:
documentation
script
:
...
...
@@ -26,6 +29,7 @@ pages:
only
:
-
main
# Include release-specific
jobs from another
YAML file
# Include
the
release-specific YAML file
include
:
-
local
:
.gitlab-ci-release.yml
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