Commit 3b2aed53 authored by Julian Gründner's avatar Julian Gründner

feat: add lint and version to ci

parent be56105d
Pipeline #5421 passed with stages
in 26 seconds
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
......@@ -10,12 +10,44 @@ variables:
- docker logout $DOCKER_REGISTRY
stages:
- lint
- version
- build
- deploy
- release
lint yaml:
stage: lint
image:
name: cytopia/yamllint:latest
entrypoint: ["/bin/sh", "-c"]
script:
- yamllint .
only:
changes:
- "deploy/*"
except:
- tags
get next version:
image: docker.miracum.org/miracum-devops/semantic-release
stage: version
script:
- npx semantic-release --dry-run
- test -e .VERSION || (echo $(git describe --abbrev=0 --tags | tr -d v) > .VERSION && touch .NORELEASE)
artifacts:
paths:
- .VERSION
- .NORELEASE
expire_in: 1 hour
except:
- tags
createInstallPackages:
stage: build
script: sh -c "cd deploy && ./create_install_packages.sh $CI_COMMIT_TAG"
script:
- export VERSION=$(cat .VERSION)
- sh -c "cd deploy && ./create_install_packages.sh $VERSION"
artifacts:
paths:
- ./deploy/*.tgz
......@@ -27,4 +59,12 @@ deployInstallPackages:
stage: deploy
dependencies:
- createInstallPackages
script: sh -c "cd deploy && ./deploy_install_packages.sh $CI_COMMIT_TAG"
\ No newline at end of file
script: sh -c "cd deploy && ./deploy_install_packages.sh $VERSION"
create project release:
image: docker.miracum.org/miracum-devops/semantic-release
stage: release
script:
- npx semantic-release
only:
- master
\ No newline at end of file
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo ${nextRelease.version} > .VERSION"
}
],
[
"@semantic-release/gitlab",
{
"gitlabUrl": "https://gitlab.miracum.org"
}
]
]
}
\ No newline at end of file
---
extends: default
rules:
document-start: disable
line-length: disable
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment