Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gotify Webhooks Plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Leon Schmidt
Gotify Webhooks Plugin
Commits
7a1cc4f2
Commit
7a1cc4f2
authored
10 months ago
by
Leon Schmidt
Browse files
Options
Downloads
Plain Diff
Merge branch 'ci-updates' into 'main'
Add Gotify Go Version-dependent releases Closes
#1
See merge request
!3
parents
9fa7a4d9
8bf0ac1a
No related branches found
Branches containing commit
Tags
1.0.1
Tags containing commit
1 merge request
!3
Add Gotify Go Version-dependent releases
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+25
-9
25 additions, 9 deletions
.gitlab-ci.yml
with
25 additions
and
9 deletions
.gitlab-ci.yml
+
25
−
9
View file @
7a1cc4f2
...
...
@@ -27,31 +27,47 @@ push-plugin:
stage
:
upload
rules
:
-
if
:
$CI_COMMIT_TAG
needs
:
-
job
:
build-plugin
artifacts
:
true
image
:
curlimages/curl
script
:
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
build/gotify-webhooks-linux-amd64.so
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}/gotify-webhooks-linux-amd64.so"'
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
build/gotify-webhooks-linux-arm-7.so
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}/gotify-webhooks-linux-arm-7.so"'
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
build/gotify-webhooks-linux-arm64.so
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}/gotify-webhooks-linux-arm64.so"'
# prepare go version variable for release
# see https://docs.gitlab.com/ee/user/project/releases/release_cicd_examples.html#create-release-metadata-in-a-custom-script
-
'
export
GO_VERS=$(cat
build/gotify-server-go-version)'
-
'
echo
"GO_VERS=$GO_VERS"
>
variables.env'
# check if upload already exists
-
'
if
curl
--head
--output
/dev/null
--fail
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}_go${GO_VERS}/gotify-webhooks-linux-amd64.so";
then
echo
"Package
already
exists!";
false;
else
true;
fi'
# upload
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
build/gotify-webhooks-linux-amd64.so
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}_go${GO_VERS}/gotify-webhooks-linux-amd64.so"'
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
build/gotify-webhooks-linux-arm-7.so
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}_go${GO_VERS}/gotify-webhooks-linux-arm-7.so"'
-
'
curl
--header
"JOB-TOKEN:
$CI_JOB_TOKEN"
--upload-file
build/gotify-webhooks-linux-arm64.so
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}_go${GO_VERS}/gotify-webhooks-linux-arm64.so"'
artifacts
:
reports
:
dotenv
:
variables.env
release-plugin
:
stage
:
release
rules
:
-
if
:
$CI_COMMIT_TAG
needs
:
-
job
:
push-plugin
artifacts
:
true
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
script
:
-
echo "
Doing release"
-
'
echo
"
Releasing
${CI_COMMIT_TAG}_go${GO_VERS}"'
release
:
name
:
"
Release
$CI_COMMIT_TAG"
description
:
"
Release
for
version
$CI_COMMIT_TAG
for
the
Gotify
Webhooks
Plugin"
name
:
"
Release
$
{
CI_COMMIT_TAG
}_go${GO_VERS}
"
description
:
"
Release
for
version
$
{
CI_COMMIT_TAG
}_go${GO_VERS}
for
the
Gotify
Webhooks
Plugin
,
compatible
with
all
version
of
Gotify
built
with
Go
${GO_VERS}
"
tag_name
:
"
$CI_COMMIT_TAG"
assets
:
links
:
-
name
:
gotify-webhooks-linux-amd64.so
url
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}/gotify-webhooks-linux-amd64.so"
url
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}
_go${GO_VERS}
/gotify-webhooks-linux-amd64.so"
link_type
:
package
-
name
:
gotify-webhooks-linux-arm-7.so
url
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}/gotify-webhooks-linux-arm-7.so"
url
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}
_go${GO_VERS}
/gotify-webhooks-linux-arm-7.so"
link_type
:
package
-
name
:
gotify-webhooks-linux-arm64.so
url
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}/gotify-webhooks-linux-arm64.so"
url
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/gotify-webhooks/${CI_COMMIT_TAG}
_go${GO_VERS}
/gotify-webhooks-linux-arm64.so"
link_type
:
package
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment