Skip to content

Commit 22fd8dc

Browse files
committed
Adding CICD
1 parent 2a5d6fe commit 22fd8dc

File tree

2 files changed

+145
-0
lines changed

2 files changed

+145
-0
lines changed

.gitlab-ci.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
services:
2+
- docker:dind
3+
4+
stages:
5+
- prepare_release
6+
- release
7+
- push
8+
9+
release_msg_job:
10+
stage: prepare_release
11+
image: alpine:latest
12+
script:
13+
- TAG_NAME=$(awk '/^## /{sub(/^## /, ""); print; exit}' CHANGELOG.md)
14+
- TAG_MESSAGE=$(awk '/^### /{flag=1} /^## /{if(flag) exit} flag' CHANGELOG.md)
15+
- TAG_MESSAGE_BASE64=$(echo -n "${TAG_MESSAGE}" | base64 -w 0)
16+
- echo "TAG_NAME=${TAG_NAME}" >> release_variables.env
17+
- echo "TAG_MESSAGE=${TAG_MESSAGE_BASE64}" >> release_variables.env
18+
before_script:
19+
- apk update && apk upgrade
20+
variables:
21+
GIT_STRATEGY: clone
22+
artifacts:
23+
reports:
24+
dotenv: release_variables.env
25+
tags:
26+
- Docker
27+
- Centos9
28+
- IT4I_Network
29+
only:
30+
- master
31+
32+
release_job:
33+
stage: release
34+
image: registry.gitlab.com/gitlab-org/release-cli:latest
35+
needs:
36+
- job: release_msg_job
37+
artifacts: true
38+
script:
39+
- echo "Creating RELEASE \"$TAG_NAME"\"
40+
- git config --global user.name "HEAppE Pipeline"
41+
- git config --global user.email "support.heappe@it4i.cz"
42+
- git checkout master
43+
- git status
44+
before_script:
45+
- apk update && apk upgrade
46+
- apk add git
47+
release:
48+
name: '${TAG_NAME}'
49+
description: '$(echo "${TAG_MESSAGE}" | base64 -d)'
50+
tag_name: '${TAG_NAME}'
51+
variables:
52+
GIT_STRATEGY: clone
53+
tags:
54+
- Docker
55+
- Centos9
56+
- IT4I_Network
57+
only:
58+
- master
59+
60+
push_to_github_job:
61+
stage: push
62+
needs:
63+
- job: release_msg_job
64+
artifacts: true
65+
image: alpine:latest
66+
script:
67+
- git config --global user.name "HEAppE Pipeline"
68+
- git config --global user.email "support.heappe@it4i.cz"
69+
- git checkout origin/master
70+
- git remote add github https://x-access-token:$GITHUB_TOKEN@github.com/It4innovations/HEAppE-scripts.git
71+
- git push github HEAD:$CI_COMMIT_REF_NAME
72+
- git push github --tags
73+
- echo "${TAG_MESSAGE}"
74+
- MODIFICATION_TAG_MESSAGE=$(echo "${TAG_MESSAGE}" | base64 -d | sed '/^[[:space:]]*$/s/^.*$/\\n/' | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
75+
- echo "${MODIFICATION_TAG_MESSAGE}"
76+
- |
77+
curl -L -X POST -H "Authorization: token $GITHUB_TOKEN" -d '{
78+
"tag_name": "'"${TAG_NAME}"'",
79+
"name": "'"${TAG_NAME}"'",
80+
"body": "'"${MODIFICATION_TAG_MESSAGE}"'",
81+
"draft": false,
82+
"prerelease": false
83+
}' https://api.github.com/repos/It4innovations/HEAppE-scripts/releases
84+
before_script:
85+
- apk update && apk upgrade
86+
- apk add --no-cache git curl jq
87+
variables:
88+
GIT_STRATEGY: clone
89+
tags:
90+
- Docker
91+
- Centos9
92+
- IT4I_Network
93+
only:
94+
- master

CHANGELOG.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## V4.2.1
9+
10+
### Compatible with HEAppE V4.2.1
11+
12+
## V4.2.0
13+
14+
### Compatible with HEAppE V4.2.0
15+
16+
## V4.0.0
17+
18+
### Compatible with HEAppE V4.0.0
19+
20+
21+
## V3.1.0
22+
23+
### Compatible with HEAppE V3.1.0
24+
25+
### Security
26+
- Fix vulnerabilities in scripts
27+
28+
## V3.0.0
29+
30+
### Compatible with HEAppE V3.0.0
31+
32+
### Added
33+
- Support for local computing (HPC cluster simulation)
34+
35+
## V2.1.1
36+
37+
### Compatible with HEAppE V2.1.1
38+
39+
### Fixed
40+
- Data transfer problem
41+
42+
## V2.1.0
43+
44+
### Compatible with HEAppE V2.1.0
45+
46+
### Added
47+
- Support for Generic command template functionality
48+
49+
## V2.0.0
50+
51+
### Compatible with HEAppE V2.0.0

0 commit comments

Comments
 (0)