Compare commits
10 Commits
69656f095d
...
v0.0.24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19625f0c13 | ||
|
|
bcf510b936 | ||
|
|
f6139782b4 | ||
|
|
c4297c7c25 | ||
|
|
f89ccb0f63 | ||
|
|
0ba8dd27f0 | ||
|
|
b08a3913e7 | ||
|
|
ac4d180382 | ||
|
|
c5da967d34 | ||
|
|
e916154e4e |
@@ -148,11 +148,14 @@ steps:
|
|||||||
git config user.email "woodpecker@exygen.fr"
|
git config user.email "woodpecker@exygen.fr"
|
||||||
git config user.name "Woodpecker CI"
|
git config user.name "Woodpecker CI"
|
||||||
|
|
||||||
|
echo "ℹ️ Save pipeline info"
|
||||||
mkdir -p .woodpecker/builds/
|
mkdir -p .woodpecker/builds/
|
||||||
echo $NEW_VERSION > .woodpecker/builds/$CI_PIPELINE_NUMBER
|
echo NEW_VERSION=$NEW_VERSION > .woodpecker/builds/$CI_PIPELINE_NUMBER
|
||||||
|
git add .woodpecker/builds/$CI_PIPELINE_NUMBER 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "ℹ️ add generated files (sql)"
|
||||||
git add ./database/src/sql/*.sql 2>/dev/null || true
|
git add ./database/src/sql/*.sql 2>/dev/null || true
|
||||||
git add package.json 2>/dev/null || true
|
git add package.json 2>/dev/null || true
|
||||||
git add .woodpecker/builds/$CI_PIPELINE_NUMBER 2>/dev/null || true
|
|
||||||
|
|
||||||
# Commiter uniquement s'il y a des changements
|
# Commiter uniquement s'il y a des changements
|
||||||
if ! git diff --cached --quiet; then
|
if ! git diff --cached --quiet; then
|
||||||
|
|||||||
1
.woodpecker/builds/100
Normal file
1
.woodpecker/builds/100
Normal file
@@ -0,0 +1 @@
|
|||||||
|
NEW_VERSION=0.0.24
|
||||||
1
.woodpecker/builds/97
Normal file
1
.woodpecker/builds/97
Normal file
@@ -0,0 +1 @@
|
|||||||
|
NEW_VERSION=0.0.22
|
||||||
1
.woodpecker/builds/98
Normal file
1
.woodpecker/builds/98
Normal file
@@ -0,0 +1 @@
|
|||||||
|
NEW_VERSION=0.0.23
|
||||||
@@ -7,9 +7,16 @@ steps:
|
|||||||
- name: get-artifact
|
- name: get-artifact
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
commands: |
|
commands: |
|
||||||
VERSION=${CI_COMMIT_TAG#v}
|
echo CI_PIPELINE_PARENT=$CI_PIPELINE_PARENT
|
||||||
curl -o /tmp/${CI_REPO_NAME}-${VERSION}.tar \
|
echo CI_COMMIT_TAG=$CI_COMMIT_TAG
|
||||||
"https://nexus.cicd.exygen.fr/repository/domaine-passignat/apps/${CI_REPO_NAME}/${VERSION}/${CI_REPO_NAME}-${VERSION}.tar"
|
echo CI_PIPELINE_EVENT=$CI_PIPELINE_EVENT
|
||||||
|
echo CI_PIPELINE_NUMBER=$CI_PIPELINE_NUMBER
|
||||||
|
echo CI_PREV_PIPELINE_NUMBER=$CI_PREV_PIPELINE_NUMBER
|
||||||
|
echo CI_PREV_PIPELINE_PARENT=$CI_PREV_PIPELINE_PARENT
|
||||||
|
source .woodpecker/$CI_PREV_PIPELINE_NUMBER
|
||||||
|
echo new version: $NEW_VERSION
|
||||||
|
curl -o /tmp/${CI_REPO_NAME}-$NEW_VERSION.tar \
|
||||||
|
"https://nexus.cicd.exygen.fr/repository/domaine-passignat/apps/${CI_REPO_NAME}/$NEW_VERSION/${CI_REPO_NAME}-${VERSION}.tar"
|
||||||
|
|
||||||
# Étape 7: Transfert vers le serveur distant (SCP)
|
# Étape 7: Transfert vers le serveur distant (SCP)
|
||||||
- name: transfert
|
- name: transfert
|
||||||
@@ -22,7 +29,7 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: remote_password
|
from_secret: remote_password
|
||||||
port: 22
|
port: 22
|
||||||
source: /tmp/${CI_REPO_NAME}-${VERSION}.tar
|
source: /tmp/${CI_REPO_NAME}-$NEW_VERSION.tar
|
||||||
target: /tmp/
|
target: /tmp/
|
||||||
depends_on: [ get-artifact ]
|
depends_on: [ get-artifact ]
|
||||||
|
|
||||||
|
|||||||
1
database/src/sql/version-0.0.21-0.0.22.sql
Normal file
1
database/src/sql/version-0.0.21-0.0.22.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
1
database/src/sql/version-0.0.22-0.0.23.sql
Normal file
1
database/src/sql/version-0.0.22-0.0.23.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
1
database/src/sql/version-0.0.23-0.0.24.sql
Normal file
1
database/src/sql/version-0.0.23-0.0.24.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cicd",
|
"name": "cicd",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.21",
|
"version": "0.0.24",
|
||||||
"description": "Node.js Rest Apis with Express, Sequelize & PostgreSQL",
|
"description": "Node.js Rest Apis with Express, Sequelize & PostgreSQL",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"update:patch": "node scripts/update-version.js -patch",
|
"update:patch": "node scripts/update-version.js -patch",
|
||||||
|
|||||||
Reference in New Issue
Block a user