Skip to content

Commit

Permalink
Merge pull request #517 from indigo-dc/prerel
Browse files Browse the repository at this point in the history
4.5.2
  • Loading branch information
zachmann authored May 9, 2023
2 parents 0235146 + 3f91a30 commit 24d962b
Show file tree
Hide file tree
Showing 60 changed files with 448 additions and 1,482 deletions.
79 changes: 79 additions & 0 deletions .gitlab-ci-scripts/local-before-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/bash

FILES=""
PACKAGING_BRANCH="packaging"

echo "======== oidc-agent-local-before-script starting======="
export VERSION=`cat VERSION`
# clone the packages file of this repo:
# Try with VERSION
git clone -b ${PACKAGING_BRANCH}/v${VERSION} http://git.scc.kit.edu/m-team/oidc-agent.git delme || {
git clone -b ${PACKAGING_BRANCH}/latest http://git.scc.kit.edu/m-team/oidc-agent.git delme
}


case ${DISTRO} in
debian|ubuntu)
ls -la
[ -d debian ] && {
echo "There IS an existing debian folder"
echo "This is the content:"
ls -la debian
}
[ -d docker ] && {
echo "There IS an existing docker folder."
}
[ -d debian ] || {
echo "using freshly cloned and adapted debian folder"

mv delme/debian .
}
[ -d docker ] || {
echo "Creating docker folder"
mkdir docker
}
[ -e docker/debian.mk ] || {
echo "copying docker/debian.mk"
mv delme/docker/debian.mk docker/
}
# convert templates
[ -e debian/changelog.template ] && {
echo "converting changelog.template"
# define variables
export VERSION=`cat VERSION`
export RELEASE=1
export DATE=`date -R`
# envsubst
FILES="${FILES} debian/changelog"
for FILE in ${FILES}; do
cat ${FILE}.template | envsubst > ${FILE}
rm ${FILE}.template
cat ${FILE}
done
}
;;
*) # We expect only RPM by default
[ -d rpm ] || {
echo "using freshly cloned and adapted rpm folder"

mv delme/rpm .
}
# define variables
export VERSION=`cat VERSION`
export RELEASE=1
export DATE=`date +"%a %B %d %Y"`
# envsubst
FILES="${FILES} rpm/oidc-agent.spec"
for FILE in ${FILES}; do
cat ${FILE}.template | envsubst > ${FILE}
rm ${FILE}.template
cat ${FILE}
done
;;
esac

# Clean up
rm -rf delme

echo "======== oidc-agent-local-before-script done ========"

169 changes: 60 additions & 109 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variables:
DOCKER_IMAGE_NAME: 'oidc-agent'
GIT_STRATEGY: clone
GIT_DEPTH: 0
#TARGET_REPO: 'devel'
# TARGET_REPO: 'devel'
# The following varialbes can be overwritten only in specific targets
# See generic-ci.yml -> .repo-definition for the full list
# REPO_BASE => deprecated
Expand All @@ -20,144 +20,63 @@ variables:
# PUBLISH_TESTED_RESULTS_REPO: 'prerel'
# PUBLISH_MASTER_RESULTS_REPO: 'for-prod'
PREREL_BRANCH_NAME: 'prerel'
# PREREL_BRANCH_NAME: 'ci/move-buildfiles-out'
# See generic-ci.yml -> .build-definition for the full list
# DOCKER_IMAGE_VERSION
# DOCKER_IMAGE_VERSION_WINDOWS
#PREREL_BRANCH_NAME: 'feat/mytoken/server_profiles'


.oidc-agent-deb-before-script: &oidc-agent-deb-before-script
- git clone -b debian/dev_`cat VERSION` http://salsa.debian.org/debian/oidc-agent.git delme
- ls -la
- test -e debian && ls -la debian
- test -e ddocker && ls -la ls -la docker
- test -e debian || mv delme/debian .
- test -e docker/debian.mk || mv delme/docker/debian.mk docker/
- rm -rf delme
- !reference [ .default-before-script ]
# PREREL_BRANCH_NAME: 'feat/mytoken/server_profiles'
MTEAM_CI_EXTRA_REPOSITORY_STRING: 'deb https://repo.data.kit.edu/devel/${DISTRO}/${RELEASE} ./'
MTEAM_CI_EXTRA_REPOSITORY_KEY_URL: 'https://repo.data.kit.edu/devel/automatic-repo-data-kit-edu-key.gpg'
MTEAM_CI_EXTRA_REPOSITORY_URL_YUM: 'https://repo.data.kit.edu/devel/data-kit-edu-${DISTRO}${RELEASE}.repo'
MTEAM_CI_EXTRA_REPOSITORY_URL_ZYPPER: 'https://repo.data.kit.edu/devel/data-kit-edu-${DISTRO}${RELEASE}.repo'
MTEAM_CI_ADDITIONAL_PACKAGES_APT: 'mustache-spec libmustach-core-dev libclibs-list-dev'
MTEAM_CI_ADDITIONAL_PACKAGES_YUM: ''
MTEAM_CI_ADDITIONAL_PACKAGES_ZYPPER: ''


build-debian-buster:
extends:
- .build-debian-buster
before_script:
- *oidc-agent-deb-before-script
script:
- make buster-debsource
- dpkg-buildpackage -uc -us
allow_failure: true

build-debian-bullseye:
extends:
- .build-debian-bullseye
before_script:
- *oidc-agent-deb-before-script

build-debian-bookworm:
extends:
- .build-debian-bookworm
before_script:
- *oidc-agent-deb-before-script

build-ubuntu-focal:
extends:
- .build-ubuntu-focal
before_script:
- *oidc-agent-deb-before-script
script:
- make focal-debsource
- dpkg-buildpackage -uc -us
allow_failure: true

build-ubuntu-bionic:
extends:
- .build-ubuntu-bionic
before_script:
- *oidc-agent-deb-before-script
script:
- make bionic-debsource
- dpkg-buildpackage -uc -us
allow_failure: true

build-ubuntu-jammy:
extends:
- .build-ubuntu-jammy
before_script:
- *oidc-agent-deb-before-script

build-ubuntu-kinetic:
extends:
- .build-ubuntu-kinetic
before_script:
- *oidc-agent-deb-before-script


build-centos-7:
extends:
- .build-centos-7
#before_script:
# - |
# # Force RPM's python-bytecompile script to use python3
# sed "s@^default_python@default_python=python3\n#default_python@" -i /usr/lib/rpm/brp-python-bytecompile
# echo "typing-extensions" >> requirements.txt

build-centos-8:
extends:
- .build-centos-8

build-centos-stream:
extends:
- .build-centos-stream


build-rockylinux-8:
extends:
- .build-rockylinux-8
- .never

build-rockylinux-8.5:
extends:
- .build-rockylinux-85


build-opensuse-15.3:
extends:
- .build-opensuse-153
- .never

build-opensuse-15.4:
extends:
- .build-opensuse-154

build-opensuse-15.5:
extends:
- .build-opensuse-155

build-opensuse-tumbleweed:
extends:
- .build-opensuse-tumbleweed

build-fedora-36:
extends:
- .build-fedora-36

###### WINDOWS ######
build-windows-lib-32:
extends:
- .build-win-msys2-mingw32
- .on-push-and-master
artifacts:
paths:
- bin
- include
script:
- |
set -e
set -x
mkdir -p results/
make
make install_includes INCLUDE_PATH=include
rm -rf bin
mkdir bin
cp lib/api/liboidc-agent* bin
build-windows-lib-64:
extends:
- .build-win-msys2-mingw64
Expand All @@ -173,8 +92,8 @@ build-windows-lib-64:
set -e
set -x
mkdir -p results/
make
make install_includes INCLUDE_PATH=include
make -j 1
make -j 1 install_includes INCLUDE_PATH=include
rm -rf bin
mkdir bin
cp lib/api/liboidc-agent* bin
Expand All @@ -198,25 +117,60 @@ build-windows-64:
- |
set -e
set -x
# Install envar plugin
# Version v0.3 from https://nsis.sourceforge.io/File:EnVar_plugin.zip
# pushd ./
# cd /mingw64/share/nsis
# wget https://nsis.sourceforge.io/mediawiki/images/archive/7/7f/20210202122230%21EnVar_plugin.zip -O /tmp/envar_plugin.zip
# unzip /tmp/envar_plugin.zip
# cp Plugins/amd64-unicode/EnVar.dll Plugins/unicode/
# popd
# Build
make win
make -j 1 win
ls -la bin
set +x
ki-oidc-plugin:
stage: build
needs:
- build-windows-64
- build-windows-lib-64
rules:
- if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "web"
when: never
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
variables:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
TRIGGER_BRANCH: main
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
variables:
TRIGGER_BRANCH: devel
inherit:
variables:
- ANYBRANCH_RESOLVE_DEPENDENCIES_REPO
- ANYBRANCH_RESOLVE_DEPENDENCIES_REPO
- DISTRO
- PREPROD_RESOLVE_DEPENDENCIES_REPO
- PREREL_BRANCH_NAME
- PREREL_RESOLVE_DEPENDENCIES_REPO
- RELEASE
- RESOLVE_DEPENDENCIES_REPO
variables:
# These are needed to find the artifacts:
CI_UPSTREAM_PROJECT_PATH: $CI_PROJECT_PATH
CI_UPSTREAM_COMMIT_REF_NAME: $CI_COMMIT_REF_NAME
# These are needed to synchronise the rules
CI_UPSTREAM_PIPELINE_SOURCE: $CI_PIPELINE_SOURCE
CI_UPSTREAM_COMMIT_BRANCH: $CI_COMMIT_BRANCH
CI_UPSTREAM_DEFAULT_BRANCH: $CI_DEFAULT_BRANCH
CI_UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
AGENT_REF: $CI_COMMIT_REF_NAME
trigger:
project: m-team/ki-oidc-plugin
branch: $TRIGGER_BRANCH
strategy: depend

installer:
stage: publish
needs:
- build-windows-64
- ki-oidc-plugin
rules:
- if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "web"
when: never
Expand All @@ -234,9 +188,6 @@ installer:
- ANYBRANCH_RESOLVE_DEPENDENCIES_REPO
- ANYBRANCH_RESOLVE_DEPENDENCIES_REPO
- DISTRO
- DOCKER_IMAGE_NAME
- DOCKER_IMAGE_NAMESPACE
- DOCKER_IMAGE_VERSION_WINDOWS
- PREPROD_RESOLVE_DEPENDENCIES_REPO
- PREREL_BRANCH_NAME
- PREREL_RESOLVE_DEPENDENCIES_REPO
Expand All @@ -251,7 +202,7 @@ installer:
CI_UPSTREAM_COMMIT_BRANCH: $CI_COMMIT_BRANCH
CI_UPSTREAM_DEFAULT_BRANCH: $CI_DEFAULT_BRANCH
CI_UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
PLUGIN_REF: main
PLUGIN_REF: $TRIGGER_BRANCH
AGENT_REF: $CI_COMMIT_REF_NAME
trigger:
project: m-team/oidc/oidc-agent-win-installer
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
<!-- ### Dependencies -->
<!-- -->

## oidc-agent 4.5.2

### Changes

- Changed the `oidc-prompt` visuals because of CSS change

### Bugfixes

- Fixed a bug in `oidc-token` where the `-i` and `-e` options printed to `stderr` instead of `stdout` when a env var
command was printed.
- Fixed missing urlencoding of request values in the auth code flow

### Dependencies

- `oidc-prompt` no longer uses `bootswatch` for css styling but `simplecss` instead.
- Updated `liblist`

### Other

- Improvements to the build process

## oidc-agent 4.5.1

### OIDC communication
Expand Down
Loading

0 comments on commit 24d962b

Please sign in to comment.