Skip to content

Commit

Permalink
AM 1.16.0 + SS 0.22.0
Browse files Browse the repository at this point in the history
* Upgrade pre-commit dependencies
* Upgrade test workflow dependencies
* debs: Use dbconfig in jammy SS packages and others
* Update debhelper compat to 10
* Allow to use external database server in AM and SS
* Update 1.15 references
* Update 0.21 references
* Update RPM testing script
* Update DEB testing script
* Add GitHub workflows for AM packages

Co-authored-by: Miguel Medinilla <[email protected]>
  • Loading branch information
replaceafill and Miguel Medinilla authored Apr 4, 2024
1 parent bcab910 commit c450bff
Show file tree
Hide file tree
Showing 38 changed files with 513 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
with:
python-version: "3.x"
- name: "Run pre-commit"
uses: "pre-commit/[email protected].0"
uses: "pre-commit/[email protected].1"
145 changes: 145 additions & 0 deletions .github/workflows/test-am-debs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: Archivematica DEB Packages Test
on:
pull_request:
paths:
- "debs/jammy/archivematica/**"
- "debs/jammy/archivematica-storage-service/**"
- "debs/jammy-testing/**"
push:
branches:
- "stable/**"
- "qa/**"
paths:
- "debs/jammy/archivematica/**"
- "debs/jammy/archivematica-storage-service/**"
- "debs/jammy-testing/**"
jobs:
build-am-deb:
name: Build Archivematica Debian packages
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: |
make -C ${{ github.workspace }}/debs/jammy/archivematica
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: archivematica-deb
path: |
${{ github.workspace }}/debs/jammy/archivematica/repo
build-ss-deb:
name: Build Storage Service Debian package
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: |
make -C ${{ github.workspace }}/debs/jammy/archivematica-storage-service
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: archivematica-storage-service-deb
path: |
${{ github.workspace }}/debs/jammy/archivematica-storage-service/repo
create-deb-repo:
name: Create Debian repository
runs-on: ubuntu-latest
needs:
- build-am-deb
- build-ss-deb
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Restore Archivematica packages
uses: actions/download-artifact@v4
with:
name: archivematica-deb
path: |
${{ github.workspace }}/debs/jammy/archivematica/repo
- name: Restore Storage Service package
uses: actions/download-artifact@v4
with:
name: archivematica-storage-service-deb
path: |
${{ github.workspace }}/debs/jammy/archivematica-storage-service/repo
- name: Create repository
run: |
make -C ${{ github.workspace }}/debs/jammy createrepo
- name: Save package repository
uses: actions/upload-artifact@v4
with:
name: repository-deb
path: |
${{ github.workspace }}/debs/jammy/_deb_repository
test-deb:
name: Test Debian packages
needs: create-deb-repo
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Restore package repository
uses: actions/download-artifact@v4
with:
name: repository-deb
path: ${{ github.workspace }}/debs/jammy/_deb_repository
- name: Install Vagrant
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
- name: Install VirtualBox
run: |
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt update && sudo apt install virtualbox-7.0
- name: Install the vagrant-vbguest plugin
run: |
vagrant plugin install vagrant-vbguest
- name: Update vbox networks
run: |
sudo mkdir -p /etc/vbox/
echo "* 192.168.33.0/24" | sudo tee -a /etc/vbox/networks.conf
- name: Start
run: |
vagrant up --no-provision
working-directory: ${{ github.workspace }}/debs/jammy-testing
- name: Install Guest Additions build dependencies
run: |
vagrant ssh -c 'sudo apt-get update -y'
vagrant ssh -c 'sudo apt-get install -y linux-headers-$(uname -r) build-essential dkms'
working-directory: ${{ github.workspace }}/debs/jammy-testing
- name: Stop
run: |
vagrant halt
working-directory: ${{ github.workspace }}/debs/jammy-testing
- name: Start and provision
run: |
vagrant up
working-directory: ${{ github.workspace }}/debs/jammy-testing
env:
PROVISION: yes
LOCAL_REPOSITORY: yes
- name: Test AM API - Get processing configurations
run: |
test $( \
curl \
--silent \
--header 'Authorization: ApiKey admin:apikey' \
--header 'Content-Type: application/json' \
'http://192.168.33.2/api/processing-configuration/' \
| jq -r '.processing_configurations == ["automated", "default"]' \
) == true
- name: Test SS API - Get pipeline count
run: |
test $( \
curl \
--silent \
--header 'Authorization: ApiKey admin:apikey' \
--header 'Content-Type: application/json' \
'http://192.168.33.2:8000/api/v2/pipeline/' \
| jq -r '.meta.total_count == 1' \
) == true
147 changes: 147 additions & 0 deletions .github/workflows/test-am-rpms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: Archivematica RPM Packages Test
on:
pull_request:
paths:
- "rpms/EL9/archivematica/**"
- "rpms/EL9/archivematica-storage-service/**"
- "rpms/EL9-testing/**"
push:
branches:
- "stable/**"
- "qa/**"
paths:
- "rpms/EL9/archivematica/**"
- "rpms/EL9/archivematica-storage-service/**"
- "rpms/EL9-testing/**"
jobs:
build-am-rpm:
name: Build Archivematica RPM packages
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: |
make -C ${{ github.workspace }}/rpms/EL9/archivematica
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: archivematica-rpm
path: |
${{ github.workspace }}/rpms/EL9/archivematica/*.rpm
build-ss-rpm:
name: Build Storage Service RPM package
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: |
make -C ${{ github.workspace }}/rpms/EL9/archivematica-storage-service
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: archivematica-storage-service-rpm
path: |
${{ github.workspace }}/rpms/EL9/archivematica-storage-service/*.rpm
create-rpm-repo:
name: Create RPM repository
runs-on: ubuntu-latest
needs:
- build-am-rpm
- build-ss-rpm
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Restore Archivematica packages
uses: actions/download-artifact@v4
with:
name: archivematica-rpm
path: |
${{ github.workspace }}/rpms/EL9/archivematica/
- name: Restore Storage Service package
uses: actions/download-artifact@v4
with:
name: archivematica-storage-service-rpm
path: |
${{ github.workspace }}/rpms/EL9/archivematica-storage-service
- name: Create repository
run: |
make -C ${{ github.workspace }}/rpms/EL9 createrepo
- name: Save package repository
uses: actions/upload-artifact@v4
with:
name: repository-rpm
path: |
${{ github.workspace }}/rpms/EL9/_yum_repository
test-rpm:
name: Test RPM packages
needs: create-rpm-repo
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Restore package repository
uses: actions/download-artifact@v4
with:
name: repository-rpm
path: ${{ github.workspace }}/rpms/EL9/_yum_repository
- name: Install Vagrant
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
- name: Install VirtualBox
run: |
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt update && sudo apt install virtualbox-7.0
- name: Install the vagrant-vbguest plugin
run: |
vagrant plugin install vagrant-vbguest
- name: Update vbox networks
run: |
sudo mkdir -p /etc/vbox/
echo "* 192.168.33.0/24" | sudo tee -a /etc/vbox/networks.conf
- name: Start
run: |
vagrant up --no-provision
working-directory: ${{ github.workspace }}/rpms/EL9-testing
- name: Install Guest Additions build dependencies
run: |
vagrant ssh -c 'sudo yum update -y && sudo yum upgrade -y'
vagrant ssh -c 'sudo yum install -y epel-release yum-utils'
vagrant ssh -c 'sudo yum-config-manager --enable crb'
vagrant ssh -c 'sudo yum install -y kernel-devel'
working-directory: ${{ github.workspace }}/rpms/EL9-testing
- name: Stop
run: |
vagrant halt
working-directory: ${{ github.workspace }}/rpms/EL9-testing
- name: Start and provision
run: |
vagrant up
working-directory: ${{ github.workspace }}/rpms/EL9-testing
env:
PROVISION: yes
LOCAL_REPOSITORY: yes
- name: Test AM API - Get processing configurations
run: |
test $( \
curl \
--silent \
--header 'Authorization: ApiKey admin:apikey' \
--header 'Content-Type: application/json' \
'http://192.168.33.2:81/api/processing-configuration/' \
| jq -r '.processing_configurations == ["automated", "default"]' \
) == true
- name: Test SS API - Get pipeline count
run: |
test $( \
curl \
--silent \
--header 'Authorization: ApiKey admin:apikey' \
--header 'Content-Type: application/json' \
'http://192.168.33.2:8001/api/v2/pipeline/' \
| jq -r '.meta.total_count == 1' \
) == true
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
rev: v0.39.0
hooks:
- id: markdownlint
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ may be a bit different between packages, but the most common are `BRANCH`,
So in order to build a specific branch or version, this command can be used from
the folder of the package we want to build:

make BRANCH=qa/1.x VERSION=1.15.0 RELEASE=rc5
make BRANCH=qa/1.x VERSION=1.16.0 RELEASE=rc5

Keep in mind that the makefiles are a bit recursive, they will invoke Docker,
mount the current folder, and run the deb-build target.
Expand Down
2 changes: 1 addition & 1 deletion debs/focal/.Jenkinsci
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pipeline {
string(defaultValue: 'qa/1.x', description: '', name: 'BRANCH')
string(defaultValue: '', description: '', name: 'GIT_REPO')
string(defaultValue: '0F4A4D31', description: 'For production packages, use production key', name: 'GPG_ID')
string(defaultValue: '1.15.0', description: '', name: 'VERSION')
string(defaultValue: '1.16.0', description: '', name: 'VERSION')
string(defaultValue: '-beta1', description: '', name: 'RELEASE')
string(defaultValue: 'qa/1.x', description: '', name: 'PACKBUILD_BRANCH')
string(defaultValue: 'jenkinsci', description: '', name: 'REPOSITORY')
Expand Down
22 changes: 14 additions & 8 deletions debs/jammy-testing/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.network "private_network", ip: "192.168.33.2"
config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder "../../", "/am-packbuild"
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = "2"
end
config.vm.provision "shell",
inline: "/am-packbuild/debs/jammy-testing/install.sh",
env: {
"LOCAL_REPOSITORY" => ENV.fetch('LOCAL_REPOSITORY', 'no'),
"SEARCH_ENABLED" => ENV.fetch('SEARCH_ENABLED', 'no'),
}
if ENV.key?("PROVISION")
config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder "../../", "/am-packbuild"
config.vm.provision "shell",
inline: "/am-packbuild/debs/jammy-testing/install.sh",
env: {
"LOCAL_REPOSITORY" => ENV.fetch('LOCAL_REPOSITORY', 'no'),
"SEARCH_ENABLED" => ENV.fetch('SEARCH_ENABLED', 'no'),
}
else
config.vbguest.auto_update = false
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "../../", "/am-packbuild", disabled: true
end
end
Loading

0 comments on commit c450bff

Please sign in to comment.