Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove scarf step #218

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions roles/generate-jenkins/templates/Jenkinsfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
SCARF_TOKEN=credentials('scarf_api_key')
{% for repo_var in repo_vars %}
{{ repo_var }}
{% endfor %}
Expand Down Expand Up @@ -625,35 +624,6 @@ pipeline {
"visibility":"public"}' '''
}{{ ' ' }}
}
/* #######################
Scarf.sh package registry
####################### */
// Add package to Scarf.sh and set permissions
stage("Scarf.sh package registry"){
when {
branch "{{ ls_branch }}"
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''#! /bin/bash
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="{{ lsio_project_name_short }}/{{ project_name }}") | .uuid' || :)
if [ -z "${PACKAGE_UUID}" ]; then
echo "Adding package to Scarf.sh"
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
-H "Authorization: Bearer ${SCARF_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name":"{{ lsio_project_name_short }}/{{ project_name }}",\
"shortDescription":"example description",\
"libraryType":"docker",\
"website":"{{ project_github_repo_url }}",\
"backendUrl":"https://ghcr.io/{{ lsio_project_name_short }}/{{ project_name }}",\
"publicUrl":"https://lscr.io/{{ lsio_project_name_short }}/{{ project_name }}"}' || :
else
echo "Package already exists on Scarf.sh"
fi
'''
}{{ ' ' }}
}
/* ###############
Build Container
############### */
Expand Down