Skip to content
Snippets Groups Projects
Verified Commit 1cdc320c authored by ornanovitch's avatar ornanovitch Committed by ornanovitch
Browse files

Merge branch '128-protocole-de-release' into 'dev'

chore: release protocol

Closes #128

See merge request !84
parent 832f7c77
No related branches found
No related tags found
No related merge requests found
stages:
- test
- docker
- deploy
test:
stage: test
......@@ -22,9 +22,53 @@ test:
paths:
- test-results/
expire_in: 1 week
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "dev"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
prepare:
stage: deploy
image: node:alpine
before_script:
- apk add --no-cache git openssh openssl curl
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | openssl enc -d -base64 | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- git checkout $CI_COMMIT_REF_NAME
- git remote set-url origin "git@forge.tedomum.net:$CI_PROJECT_PATH.git"
- git config --global user.name "${CI_USERNAME}"
- git config --global user.email "${CI_EMAIL}"
- npm ci
script:
- GITLAB_TOKEN=$CI_JOB_TOKEN npx release-it --ci --no-npm --gitlab.release --dry-run
- >-
curl
--header "PRIVATE-TOKEN: ${RELEASE_IT_TOKEN}"
--request PUT
-d "target_branch=main"
-d "description=$(npx release-it --no-npm --changelog)"
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/merge_requests/${CI_MERGE_REQUEST_IID}"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_MERGE_REQUEST_LABELS =~ /RELEASE/ &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "dev"
release:
stage: deploy
extends:
- prepare
script:
- GITLAB_TOKEN=$CI_JOB_TOKEN npx release-it --ci --no-npm --gitlab.release
rules:
- if: $CI_COMMIT_BRANCH == "main"
docker:
stage: docker
stage: deploy
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
......@@ -32,6 +76,6 @@ docker:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME%+*}
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
needs: ["test"]
[git]
requireCommits = true
[plugins]
[plugins."@release-it/conventional-changelog"]
infile = "CHANGELOG.md"
[plugins."@release-it/conventional-changelog".preset]
name = "conventionalcommits"
[plugins."@release-it/bumper"]
out = ["package.json", "pyproject.toml"]
This diff is collapsed.
{
"name": "hiboo",
"version": "1.0.0",
"version": "0.0.0",
"description": "Hiboo",
"main": "assest/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"release": "release-it"
},
"author": "",
"license": "ISC",
......@@ -24,5 +25,10 @@
"url-loader": "^4.1.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"devDependencies": {
"@release-it/bumper": "^6.0.1",
"@release-it/conventional-changelog": "^8.0.1",
"release-it": "^17.2.0"
}
}
[tool.poetry]
name = "Hiboo"
version = "0.1.0"
version = "0.0.0"
description = "Security framework for small-sized hosting services"
homepage = "https://forge.tedomum.net/acides/hiboo"
repository = "https://forge.tedomum.net/acides/hiboo"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment