Commit 46ab52df authored by Éloïs's avatar Éloïs
Browse files

Merge branch 'BadReleaseLink' into 1.6

parents c7ddd4b3 7032516c
- github-sync
- build
- test
- package
- prerelease
- release
......@@ -39,13 +38,6 @@ build:
- yarn
<<: *nvm_env
stage: test
- yarn
- yarn test
.build_releases: &build_releases
stage: package
allow_failure: false
......@@ -33,5 +33,5 @@ class BinArtifact(Artifact):
return FSItemSize(int(os.path.getsize(self.file_name)))
def _build_url(self):
return '{}/-/jobs/artifacts/{}/raw/{}?job={}'.format(
os.environ['CI_PROJECT_URL'], self.tag, self.file_name, self.job)
return '{}/-/jobs/{}/artifacts/raw/{}'.format(
os.environ['CI_PROJECT_URL'], self.job, self.file_name)
import json
import os
import urllib.request
from projectapi import ProjectApi
class Pipeline(ProjectApi):
Pipeline data API.
def __init__(self):
ProjectApi.__init__(self, '/pipelines/{}'.format(os.environ['CI_PIPELINE_ID']))
def find_job_id(self, job_name):
Find the id corresponding to given job name in the pipeline.
:param job_name: The job name.
:type job_name: str
:return: The identifier.
:rtype: int
request = self.build_request('/jobs')
response = urllib.request.urlopen(request)
response_data =
for job in json.loads(response_data):
if job['name'] == job_name: return job['id']
print('CRITICAL No job with given name {} found'.format(job_name))
......@@ -5,7 +5,6 @@ import os
from binartifact import BinArtifact
from job import Job
from pipeline import Pipeline
from placeholder import PlaceHolder
from releasenote import ReleaseNote
from releasewikipage import ReleaseWikiPage
......@@ -91,7 +90,6 @@ class Releaser:
for artifact in self._get_bin_artifacts():
if not artifact.job in jobs:
jobs = map(lambda j: Pipeline().find_job_id(j), jobs)
for job_id in jobs: Job(job_id).keep_artifacts()
print('Release published')
......@@ -59,7 +59,7 @@ create_desc() {
cat >"${1}".desc <<-EOF
"version": "${DUNITER_TAG}",
"job": "${CI_JOB_NAME}",
"job": "${CI_JOB_ID}",
"type": "${2^}",
"category": "${3}",
"arch": "x64"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment