kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Merge branch 'CICD-md5hash-and-virustotal' into 'master'
Disco Bot and VT push (windows only for now) See merge request gridtracker.org/gridtracker!292 If this is changing anything in the UI or operational behavior, please prepare to update the wiki!merge-requests/237/merge mac_newTags
commit
a2440ade32
113
.gitlab-ci.yml
113
.gitlab-ci.yml
|
@ -26,8 +26,6 @@ include:
|
|||
- template: "Security/Secret-Detection.gitlab-ci.yml"
|
||||
- template: "Security/SAST.gitlab-ci.yml"
|
||||
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
@ -35,6 +33,7 @@ stages:
|
|||
- package
|
||||
- pre-deploy
|
||||
- deploy
|
||||
- publish
|
||||
|
||||
default:
|
||||
image: ${DEFAULT_IMAGE}
|
||||
|
@ -284,30 +283,6 @@ upload-Google:
|
|||
gcloud config set project $GCLOUD_PROJECT_ID
|
||||
gsutil -m cp -R artifacts/* $GCLOUD_DEPLOY_PATH/
|
||||
|
||||
# this only creates a "source code release" -- gitlab doesn't specify binaries
|
||||
# except as links to external storage, which is suboptimal for now
|
||||
|
||||
sourcerelease:
|
||||
stage: deploy
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^(v).*/'
|
||||
release:
|
||||
tag_name: $CI_COMMIT_TAG
|
||||
name: GridTracker $CI_COMMIT_TAG
|
||||
description: GridTracker release $CI_COMMIT_TAG
|
||||
ref: '$CI_COMMIT_SHA'
|
||||
assets:
|
||||
links:
|
||||
- name: Release Packages for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/
|
||||
external: true
|
||||
link_type: package
|
||||
script:
|
||||
- echo 'Release for $CI_COMMIT_TAG'
|
||||
|
||||
update_arch_aur:
|
||||
stage: deploy
|
||||
image: archlinux:base-devel
|
||||
|
@ -349,3 +324,89 @@ update_arch_aur:
|
|||
cd gridtracker
|
||||
git add PKGBUILD .SRCINFO && git commit -m "upgpkg: gridtracker ${CI_COMMIT_TAG#v}" && git push
|
||||
|
||||
# this only creates a "source code release" -- gitlab doesn't specify binaries
|
||||
# except as links to external storage, which is suboptimal for now
|
||||
|
||||
sourcerelease:
|
||||
stage: publish
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^(v).*/'
|
||||
release:
|
||||
tag_name: $CI_COMMIT_TAG
|
||||
name: GridTracker $CI_COMMIT_TAG
|
||||
description: GridTracker release $CI_COMMIT_TAG
|
||||
ref: '$CI_COMMIT_SHA'
|
||||
assets:
|
||||
links:
|
||||
- name: Windows Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/GridTracker-Installer.${CI_COMMIT_TAG#v}.exe
|
||||
external: true
|
||||
link_type: package
|
||||
- name: Mac x64 ZIP Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/GridTracker-${CI_COMMIT_TAG#v}-mac-x64.zip
|
||||
external: true
|
||||
link_type: package
|
||||
- name: Linux Arm32 GZIP Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/GridTracker-${CI_COMMIT_TAG#v}-linux-arm32.tar.gz
|
||||
external: true
|
||||
link_type: package
|
||||
- name: Linux Arm64 GZIP Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/GridTracker-${CI_COMMIT_TAG#v}-linux-arm64.tar.gz
|
||||
external: true
|
||||
link_type: package
|
||||
- name: Linux x86 GZIP Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/GridTracker-${CI_COMMIT_TAG#v}-linux-x86.tar.gz
|
||||
external: true
|
||||
link_type: package
|
||||
- name: Linux x64 GZIP Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/GridTracker-${CI_COMMIT_TAG#v}-linux-x64.tar.gz
|
||||
external: true
|
||||
link_type: package
|
||||
- name: Debian Linux Package for $CI_COMMIT_TAG
|
||||
url: https://downloads.gridtracker.org/$CI_COMMIT_TAG/gridtracker-${CI_COMMIT_TAG#v}_all.deb
|
||||
external: true
|
||||
link_type: package
|
||||
script:
|
||||
- echo 'Release for $CI_COMMIT_TAG'
|
||||
|
||||
virustotal_push:
|
||||
stage: publish
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^(v|test_).*/'
|
||||
script:
|
||||
- |
|
||||
echo "Pushing release URLs to VirusTotal"
|
||||
VER=`node version.js`
|
||||
BASEURL="http://downloads.gridtracker.org/${CI_COMMIT_TAG}/"
|
||||
curl --request POST --url "https://www.virustotal.com/api/v3/urls" --form url="${BASEURL}GridTracker-Installer.${VER}.exe" --header "x-apikey: ${VT_API_KEY}"
|
||||
|
||||
discord_notify:
|
||||
stage: publish
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^(v|test_).*/'
|
||||
script:
|
||||
- |
|
||||
echo "Notifying Discord #developer-den that a release has built"
|
||||
BASEURL="http://downloads.gridtracker.org/${CI_COMMIT_TAG}/"
|
||||
VER=`node version.js`
|
||||
WIN_MD5=($(md5sum artifacts/GridTracker-Installer.${VER}.exe))
|
||||
MAC_MD5=($(md5sum artifacts/GridTracker-${VER}-mac-x64.zip))
|
||||
LINARM32_MD5=($(md5sum artifacts/GridTracker-${VER}-linux-arm32.tar.gz))
|
||||
LINARM64_MD5=($(md5sum artifacts/GridTracker-${VER}-linux-arm64.tar.gz))
|
||||
LINx86_MD5=($(md5sum artifacts/GridTracker-${VER}-linux-x86.tar.gz))
|
||||
LINx64_MD5=($(md5sum artifacts/GridTracker-${VER}-linux-x64.tar.gz))
|
||||
DEB_MD5=($(md5sum artifacts/gridtracker_${VER}_all.deb))
|
||||
curl -H "Content-Type: application/json" -X POST $DISCORD_WEBHOOK --data-binary @- << EOM
|
||||
{
|
||||
"content": "**GridTracker-Installer.${VER}.exe**\nmd5: ${WIN_MD5} - ${BASEURL}GridTracker-Installer.${VER}.exe\n\n**GridTracker-${VER}-mac-x64.zip**\nMD5: ${MAC_MD5} - ${BASEURL}GridTracker-${VER}-mac-x64.zip\n\n**GridTracker-${VER}-linux-arm32.tar.gz**\nMD5: ${LINARM32_MD5} - ${BASEURL}GridTracker-${VER}-linux-arm32.tar.gz\n\n**GridTracker-${VER}-linux-arm64.tar.gz**\nMD5: ${LINARM64_MD5} - ${BASEURL}GridTracker-${VER}-linux-arm64.tar.gz\n\n**GridTracker-${VER}-linux-x86.tar.gz**\nMD5: ${LINx86_MD5} - ${BASEURL}GridTracker-${VER}-linux-x86.tar.gz\n\n**GridTracker-${VER}-linux-x64.tar.gz**\nMD5: ${LINx64_MD5} - ${BASEURL}GridTracker-${VER}-linux-x64.tar.gz\n\n**gridtracker_${VER}_all.deb**\nMD5: ${DEB_MD5} - ${BASEURL}gridtracker_${VER}_all.deb",
|
||||
"tts": false,
|
||||
"embeds": [],
|
||||
"components": {},
|
||||
"username": "GridTracker Release Bot",
|
||||
"avatar_url": "http://gridtracker.org/images/icons/gridtracker32.png"
|
||||
}
|
||||
EOM
|
||||
echo "Discord notified"
|
||||
|
|
Ładowanie…
Reference in New Issue