CI 수정
This commit is contained in:
38
.gitlab-ci.yml
Normal file
38
.gitlab-ci.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
stages:
|
||||
- test
|
||||
|
||||
test-job:
|
||||
image: harbor.exem-oss.org/test/test-runner:latest
|
||||
stage: test
|
||||
variables:
|
||||
file1: "./old_version.json"
|
||||
file2: "./test_json.json"
|
||||
git_token: $TOKEN
|
||||
before_script: |
|
||||
git config --global user.email "sa_8001@ex-em.com"
|
||||
git config --global user.name "변정훈"
|
||||
script: |
|
||||
jq_parse() {
|
||||
jq -r '.[] | "\(.name):\(.version)"' "$1"
|
||||
}
|
||||
|
||||
declare -A versions1
|
||||
while IFS=: read -r name version; do
|
||||
versions1["$name"]=$version
|
||||
done < <(jq_parse "$file1")
|
||||
|
||||
declare -a different_names
|
||||
while IFS=: read -r name version; do
|
||||
if [[ "${versions1["$name"]}" != "$version" ]]; then
|
||||
different_names+=("$name$version")
|
||||
fi
|
||||
done < <(jq_parse "$file2")
|
||||
|
||||
echo "버전이 달라진 프로젝트 목록"
|
||||
for name in "${different_names[@]}"; do
|
||||
echo "$name"
|
||||
done
|
||||
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_MESSAGE =~ /CI 수정/
|
||||
12
new_version.json
Normal file
12
new_version.json
Normal file
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"name":"test_app_agent_name_long",
|
||||
"version":"1.2",
|
||||
"user":"\ubcc0\uc815\ud6c83"
|
||||
},
|
||||
{
|
||||
"name":"exemone-java-agent",
|
||||
"version":"1.3.0",
|
||||
"user":"\ubcc0\uc815\ud6c81"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user