Compare commits

...

3 Commits

Author SHA1 Message Date
dave e16b11fe29 misc tweaks
Gitea/docker-artifact/pipeline/head This commit looks good Details
2024-02-07 20:31:59 -08:00
dave 716739da87 update base image
Gitea/docker-artifact/pipeline/head This commit looks good Details
2023-06-01 18:17:46 -07:00
dave 2637941e89 update pydpkg
Gitea/docker-artifact/pipeline/head There was a failure building this commit Details
2023-06-01 17:54:37 -07:00
4 changed files with 115 additions and 36 deletions

View File

@ -1,7 +1,7 @@
FROM ubuntu:bionic
FROM ubuntu:jammy
RUN apt-get update && \
apt-get install -y python3-pip gpgv1 gnupg1 gpg sudo wget git && \
apt-get install -y python3-pip libffi-dev gpgv1 gnupg1 gpg sudo wget git && \
useradd artifact
ADD requirements.txt /tmp/requirements.txt

68
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,68 @@
def image_name = "dpedu/artifact"
pipeline {
agent {
kubernetes {
yaml """
apiVersion: v1
kind: Pod
spec:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution: # avoid nodes already running a jenkins job
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: jenkins
operator: In
values:
- slave
topologyKey: node
containers:
- name: docker
image: docker:20-dind
args:
- "--insecure-registry"
- "dockermirror:5000"
securityContext:
privileged: true
"""
}
}
stages {
stage("Build image") {
steps {
container("docker") {
script {
try {
docker.withRegistry('http://dockermirror:5000') {
docker.image("ubuntu:jammy").pull()
docker.image(image_name).pull() // Pull a recent version to share base layers with (?)
}
} catch (exc) {
echo "couldn't pull image, assuming we're building it for the first time"
}
docker.build(image_name)
}
}
}
}
stage("Push image") {
steps {
container("docker") {
script {
docker.withRegistry('http://dockermirror:5000') {
docker.image(image_name).push("latest")
}
}
}
}
}
stage("Show images") {
steps {
container("docker") {
sh 'docker images'
}
}
}
}
}

View File

@ -142,6 +142,13 @@ def hashmany(data):
return {k: v.hexdigest() for k, v in hashes.items()}
def format_deb_file_name(package_name, package_version, package_architecture):
"""
Format a deb package name. Note
"""
return "{}_{}_{}.deb".format(package_name, package_version, package_architecture)
class AptProvider(object):
def __init__(self, dbcon, s3client, bucket):
self.db = dbcon
@ -286,7 +293,8 @@ Description: Generated by Repobot
fsize = os.path.getsize(tmppkgpath)
p = Dpkg(tmppkgpath)
pkgname = "{}_{}_{}.deb".format(p.message['Package'], p.message['Version'], p.message['Architecture'])
pkgname = format_deb_file_name(p.message['Package'], p.message['Version'], p.message['Architecture'])
#TODO keys can be duplicated in email.message.Message, does this cause any problems?
fields = {key: p.message[key] for key in p.message.keys()}

View File

@ -1,36 +1,39 @@
arpy==1.1.1
asn1crypto==0.24.0
backports.functools-lru-cache==1.5
boto3==1.9.138
botocore==1.12.138
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
cheroot==6.5.4
CherryPy==18.1.1
cryptography==2.6.1
docutils==0.14
idna==2.8
jaraco.functools==2.0
Jinja2==2.10.1
jmespath==0.9.4
MarkupSafe==1.1.1
more-itertools==7.0.0
PGPy==0.4.1
portend==2.4
pyasn1==0.4.5
pycparser==2.19
-e git+https://git.davepedu.com/dave/python-dpkg.git#egg=pydpkg
autocommand==2.2.2
boto3==1.26.145
botocore==1.29.145
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
cheroot==10.0.0
CherryPy==18.8.0
cryptography==41.0.1
idna==3.4
inflect==6.0.4
jaraco.collections==4.2.0
jaraco.context==4.3.0
jaraco.functools==3.7.0
jaraco.text==3.11.1
Jinja2==3.1.2
jmespath==1.0.1
MarkupSafe==2.1.2
more-itertools==9.1.0
PGPy==0.6.0
portend==3.1.0
pyasn1==0.5.0
pycparser==2.21
pydantic==1.10.8
-e git+https://git.davepedu.com/dave/python-dpkg.git@a1c0212e09bb37a711d6c412cab8e3278d17374d#egg=pydpkg
PyMySQL==0.9.3
python-dateutil==2.8.0
python-gnupg==0.4.4
pytz==2019.1
requests==2.21.0
s3transfer==0.2.0
singledispatch==3.4.0.3
six==1.12.0
python-dateutil==2.8.2
python-gnupg==0.5.0
pytz==2023.3
pyzstd==0.15.7
requests==2.31.0
s3transfer==0.6.1
six==1.16.0
SQLAlchemy==1.3.3
tempora==1.14.1
urllib3==1.24.2
wheel==0.33.1
zc.lockfile==1.4
tempora==5.2.2
typing_extensions==4.6.3
urllib3==1.26.16
zc.lockfile==3.0.post1