aboutsummaryrefslogtreecommitdiffci
path: root/Jenkinsfile
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile74
1 files changed, 6 insertions, 68 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 0797a5f..24aa17a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -11,20 +11,6 @@ pipeline {
IMAGE_PROFILE = 'Workstation-Live'
IMAGE_VERSION = '45'
OUTPUT_DIR = 'outdir'
-
- B2_ENDPOINT = 'https://s3.eu-central-003.backblazeb2.com'
- AWS_DEFAULT_REGION = 'eu-central-003'
- RPM_BUCKET = 'dist-sayagit-fedora-rpm'
- ISO_BUCKET = 'dist-sayagit-fedora-iso'
-
- // awscli2 sends CRC32 checksums by default, which B2 rejects. Ask for
- // them only where the S3 API requires them.
- AWS_REQUEST_CHECKSUM_CALCULATION = 'when_required'
- AWS_RESPONSE_CHECKSUM_VALIDATION = 'when_required'
-
- // Must match the <source path="dir://..."/> in
- // repositories/kernel-surface.xml.
- KERNEL_SURFACE_REPO = '/var/lib/kernel-surface-repo'
}
stages {
@@ -65,41 +51,6 @@ spec:
container('kiwi') {
script {
try {
- // The kernel-surface RPM is a build input, not
- // something this repository can produce: the image
- // installs kernel-surface by name and <ignore>s
- // Fedora's kernel packages, so it has to be in the
- // local repository before kiwi starts. The buckets
- // stay private, so it is pulled with credentials
- // rather than fetched over a public URL.
- withCredentials([usernamePassword(
- credentialsId: 'backblaze-b2-dist-rpm',
- usernameVariable: 'AWS_ACCESS_KEY_ID',
- passwordVariable: 'AWS_SECRET_ACCESS_KEY')]) {
- sh '''
- set -eux
-
- dnf --assumeyes install awscli2 createrepo_c
-
- mkdir -p "${KERNEL_SURFACE_REPO}"
- aws s3 sync --endpoint-url "${B2_ENDPOINT}" \\
- "s3://${RPM_BUCKET}/fedora/${IMAGE_VERSION}/aarch64/" \\
- "${KERNEL_SURFACE_REPO}/" \\
- --exclude '*' --include 'kernel-surface-*.rpm'
-
- # Say so here rather than letting kiwi fail
- # several minutes later on an unresolvable
- # package name.
- if ! ls "${KERNEL_SURFACE_REPO}"/kernel-surface-*.rpm; then
- echo "No kernel-surface RPM in ${RPM_BUCKET} for Fedora ${IMAGE_VERSION}." >&2
- echo "Run the kernel-surface pipeline first." >&2
- exit 1
- fi
-
- createrepo_c "${KERNEL_SURFACE_REPO}"
- '''
- }
-
sh '''
dnf --assumeyes install git kiwi kiwi-systemdeps distribution-gpg-keys
git config --global --add safe.directory .
@@ -151,25 +102,12 @@ spec:
steps {
container('s5cmd') {
unstash "fedora-workstation-live-iso-stash"
- withCredentials([usernamePassword(
- credentialsId: 'backblaze-b2-dist-iso',
- usernameVariable: 'AWS_ACCESS_KEY_ID',
- passwordVariable: 'AWS_SECRET_ACCESS_KEY')]) {
- sh '''
- set -eux
-
- cd "${OUTPUT_DIR}-build"
- src="Fedora.aarch64-${IMAGE_VERSION}.iso"
- moddate=$(date -r "${src}" -u +"%Y%m%d-%H%M%S")
- dst="Fedora.Surface-Pro-12in.${IMAGE_PROFILE}.${IMAGE_VERSION}.${moddate}.aarch64.iso"
- mv "${src}" "${dst}"
- ls -lh
-
- s5cmd --endpoint-url "${B2_ENDPOINT}" cp \\
- "${dst}" \\
- "s3://${ISO_BUCKET}/fedora/${IMAGE_VERSION}/aarch64/${dst}"
- '''
- }
+ sh '''
+ cd ${OUTPUT_DIR}-build
+ moddate=$(date -r Fedora.aarch64-${IMAGE_VERSION}.iso -u +"%Y%m%d-%H%M%S")
+ mv Fedora.aarch64-${IMAGE_VERSION}.iso "Fedora.Surface-Pro-12in.${IMAGE_PROFILE}.${IMAGE_VERSION}.${moddate}.aarch64.iso"
+ ls -lh
+ '''
}
}
}