Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
nghyd
Commits
7d35dfe4
Commit
7d35dfe4
authored
1 year ago
by
David Dorchies
Browse files
Options
Downloads
Patches
Plain Diff
ci: use artifacts instead of gitlab CI cache
Refs
#630
parent
1a3111e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!230
Resolve "CI: change cache strategy for node modules"
Pipeline
#143610
passed
1 year ago
Stage: install
Stage: build
Stage: clean-stale-branches
Stage: deploy-dev
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+12
-19
12 additions, 19 deletions
.gitlab-ci.yml
with
12 additions
and
19 deletions
.gitlab-ci.yml
+
12
−
19
View file @
7d35dfe4
...
...
@@ -9,7 +9,7 @@ stages:
-
releases-version
default
:
tags
:
[
mia2
]
tags
:
[
docker
]
image
:
geaucassiopee/ci-cd-cross-platform-webapp:v3
variables
:
...
...
@@ -37,36 +37,25 @@ before_script:
-
mkdir -p ~/.ssh
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
cache
:
key
:
files
:
-
jalhyd_branch
-
package.json
paths
:
-
node_modules/
-
jalhyd/
install
:
stage
:
install
only
:
-
pushes
-
tags
-
schedules
-
web
artifacts
:
paths
:
-
node_modules/
-
jalhyd/
expire_in
:
1 min
script
:
-
JALHYD_BRANCH=`cat jalhyd_branch`
-
echo "CI_COMMIT_REF_NAME - $CI_COMMIT_REF_NAME"
-
if [ "$CI_COMMIT_REF_NAME" = "master" ]; then JALHYD_BRANCH="master"; fi
-
if [ "$CI_COMMIT_REF_NAME" = "devel" ]; then JALHYD_BRANCH="devel"; fi
-
echo "Branche JalHyd - $JALHYD_BRANCH"
-
rm -rf jalhyd
-
git clone https://forgemia.inra.fr/cassiopee/jalhyd.git
-
cd jalhyd
-
git checkout "$JALHYD_BRANCH" || git checkout devel
-
npm ci --force
-
npm run build
-
cd ..
-
rm -rf node_modules
-
npm ci --force --unsafe-perm
test
:
...
...
@@ -81,6 +70,8 @@ test:
.build
:
stage
:
build
dependencies
:
-
install
artifacts
:
expire_in
:
10 min
paths
:
...
...
@@ -157,7 +148,8 @@ releases-nightly:
except
:
# exclude master to apply releases-nightly on devel only
-
master
dependencies
:
[]
dependencies
:
-
install
script
:
-
./scripts/release-version.sh nightly $PROD_LOGIN $PROD_HOST $RELEASES_PATH
...
...
@@ -166,6 +158,7 @@ releases-version:
only
:
variables
:
-
$CI_COMMIT_REF_NAME =~ /^[0-9]+\.[0-9]+\.[0-9]+$/
# version tag
dependencies
:
[]
dependencies
:
-
install
script
:
-
./scripts/release-version.sh $CI_COMMIT_REF_NAME $PROD_LOGIN $PROD_HOST $RELEASES_PATH
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