Skip to content

Commit

Permalink
chore(release): back to 0.0.0-nightly (#1911)
Browse files Browse the repository at this point in the history
* chore(release): back to 0.0.0-nightly

Signed-off-by: moabu <[email protected]>

* ci: adjust build workflows

Signed-off-by: moabu <[email protected]>

---------

Signed-off-by: moabu <[email protected]>
  • Loading branch information
moabu authored Dec 2, 2024
1 parent c1afa73 commit 71be844
Show file tree
Hide file tree
Showing 75 changed files with 273 additions and 246 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/activate-nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"
permissions:
contents: read

jobs:
publish_binary_packages:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: set nightly version
id: nightly
Expand All @@ -23,13 +33,8 @@ jobs:
sudo cp gh_${VERSION}_linux_amd64/bin/gh /usr/local/bin/
gh version
echo "${{ secrets.MOWORKFLOWTOKEN }}" | gh auth login --with-token
BASE_VERSION=$(cat charts/gluu/Chart.yaml | grep "appVersion" | awk -F ": " '{print $2}' | tr -d '"' | sed 's/-dev//')
# Clean up old nightly release
gh release delete v${BASE_VERSION}.nightly --cleanup-tag --yes || echo "v${BASE_VERSION}.nightly" does not exist
git push --delete origin v${BASE_VERSION}.nightly || echo "v${BASE_VERSION}.nightly" does not exist
# Create new nightly release
gh release delete v${BASE_VERSION}.nightly --cleanup-tag --yes || echo "v${BASE_VERSION}.nightly" does not exist
gh release delete v${BASE_VERSION}.nightly --cleanup-tag --yes || echo "v${BASE_VERSION}.nightly" does not exist
git push --delete origin v${BASE_VERSION}.nightly || echo "v${BASE_VERSION}.nightly" does not exist
gh release create v${BASE_VERSION}.nightly --generate-notes --prerelease --title "v${BASE_VERSION}.nightly"
NIGHTLY_VERSION="nightly"
gh release delete ${NIGHTLY_VERSION} --cleanup-tag --yes || echo "${NIGHTLY_VERSION}" does not exist
gh release delete ${NIGHTLY_VERSION} --cleanup-tag --yes || echo "${NIGHTLY_VERSION}" does not exist
git push --delete origin ${NIGHTLY_VERSION} || echo "${NIGHTLY_VERSION}" does not exist
gh release create ${NIGHTLY_VERSION} --generate-notes --prerelease --title "${NIGHTLY_VERSION}"
32 changes: 27 additions & 5 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ on:
push:
tags:
- 'v**'
- 'nightly'
jobs:
publish_binary_packages:
if: github.repository == 'GluuFederation/flex'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -43,8 +45,13 @@ jobs:
python_version: "3.6"

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: temp-flex

Expand All @@ -63,7 +70,7 @@ jobs:
- name: Import GPG key
id: import_gpg
continue-on-error: true
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }}
Expand All @@ -77,6 +84,11 @@ jobs:
run: |
echo "version=$(echo ${{ github.event.ref }} | cut -d 'v' -f 2)" >> $GITHUB_OUTPUT
echo "tag=$(echo ${{ github.event.ref }} | cut -d '/' -f 3)" >> $GITHUB_OUTPUT
if [[ ${{ github.event.ref }} == 'refs/tags/nightly' ]]; then
echo "version=0.0.0-nightly" >> $GITHUB_OUTPUT
else
echo "version=$(echo ${{ github.event.ref }} | cut -d 'v' -f 2)" >> $GITHUB_OUTPUT
fi
echo "PACKAGE_PREFIX=flex" >> ${GITHUB_ENV}
- name: Print Version and tag
Expand All @@ -87,7 +99,7 @@ jobs:
id: run_build
run: |
cd flex/
sudo python${{ matrix.python_version }} flex_setup.py --jans-branch="v1.1.6-hotfix" --jans-setup-branch="v1.1.6-hotfix" -download-exit
sudo python${{ matrix.python_version }} install.py --jans-branch="nightly" --jans-setup-branch="nightly" -download-exit -yes --keep-downloads --keep-setup -force-download
cp -r /opt/dist flex-src/opt/
cp -r /opt/jans flex-src/opt/
touch flex-src/opt/jans/jans-setup/package
Expand All @@ -111,9 +123,10 @@ jobs:
cd flex/
sed -i "s/%VERSION%/${{ steps.previoustag.outputs.version }}/g" checksum.sh
sudo ./checksum.sh
- name: Upload binaries to release
id: upload_binaries
uses: svenstaro/upload-release-action@v2
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
with:
repo_token: ${{ secrets.MOWORKFLOWTOKEN }}
file: ${{github.workspace}}/${{ matrix.asset_path }}/flex${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ matrix.asset_suffix }}
Expand All @@ -122,10 +135,19 @@ jobs:
overwrite: true
- name: Upload checksum to release
id: upload_shas
uses: svenstaro/upload-release-action@v2
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
with:
repo_token: ${{ secrets.MOWORKFLOWTOKEN }}
file: ${{github.workspace}}/${{ matrix.asset_path }}/flex${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ matrix.asset_suffix }}.sha256sum
asset_name: ${{ env.PACKAGE_PREFIX }}${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ matrix.asset_suffix }}.sha256sum
tag: ${{ steps.previoustag.outputs.tag }}
overwrite: true
- name: Upload sig to release
id: upload_sigs
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
with:
repo_token: ${{ secrets.MOAUTO_WORKFLOW_TOKEN }}
file: ${{github.workspace}}/${{ matrix.asset_path }}/flex{{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ matrix.asset_suffix }}.asc
asset_name: ${{ env.PACKAGE_PREFIX }}${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ matrix.asset_suffix }}.asc
tag: ${{ steps.previoustag.outputs.tag }}
overwrite: true
6 changes: 3 additions & 3 deletions .github/workflows/docker_build_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
MAIN_VERSION=$(python3 -c "from dockerfile_parse import DockerfileParser ; dfparser = DockerfileParser('./docker-${{ matrix.docker-images }}') ; print(dfparser.labels['org.opencontainers.image.version'])")
DOCKER_IMAGE=ghcr.io/$REPOSITORY/${{ matrix.docker-images }}
VERSION=${MAIN_VERSION}_dev
VERSION=${MAIN_VERSION}
if [[ ${{ matrix.docker-images }} == "flex-monolith" ]]; then
VERSION=5.1.6-1
VERSION=0.0.0-nightly
DOCKER_IMAGE=ghcr.io/$REPOSITORY/monolith
fi
BUILD=true
Expand All @@ -101,7 +101,7 @@ jobs:
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\_[a-b]{1}[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:${MAIN_VERSION}_dev"
TAGS="$TAGS,${DOCKER_IMAGE}:${MAIN_VERSION}"
fi
# If the user passed a manual image tag to build a custom manual image
MANUAL_IMAGE_TAG=${{ github.event.inputs.image_tag }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ on:
jans_release_as:
description: 'Release version for the python projects, admin ui, docker images, and helm charts'
required: true
default: '1.1.6'
default: '0.0.0-nightly'
mega_release_as:
description: 'Mega release version'
required: true
default: '5.1.6'
default: '0.0.0-nightly'
next_jans_release_as:
description: 'next anticipated jans Mega release version'
required: true
default: '1.1.6'
default: '0.0.0-nightly'
next_mega_release_as:
description: 'next anticipated Mega release version'
required: true
default: '5.1.6'
default: '0.0.0-nightly'

jobs:
mega-release-pr:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ on:
jans_release_as:
description: 'Release version for the python projects, admin ui, docker images, and helm charts'
required: true
default: '1.1.6'
default: '0.0.0-nightly'
mega_release_as:
description: 'Mega release version'
required: true
default: '5.1.6'
default: '0.0.0-nightly'
next_jans_release_as:
description: 'next anticipated jans Mega release version'
required: true
default: '1.1.6'
default: '0.0.0-nightly'
next_mega_release_as:
description: 'next anticipated Mega release version'
required: true
default: '5.1.6'
default: '0.0.0-nightly'

jobs:
mega-release-pr:
Expand Down
2 changes: 1 addition & 1 deletion admin-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gluu-admin-ui",
"version": "5.1.6",
"version": "0.0.0-nightly",
"description": "UI to administer the jans-sever features",
"keywords": [
"jans-server",
Expand Down
18 changes: 9 additions & 9 deletions automation/rancher-partner-charts/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ questions:
- variable: auth-server.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The Auth Server Image tag"
label: Auth Server image tag
group: "Images"
Expand Down Expand Up @@ -732,7 +732,7 @@ questions:
- variable: admin-ui.image.tag
required: true
type: string
default: "5.1.6-1"
default: "0.0.0-nightly"
description: "The AdminUI Image tag"
label: AdminUI image tag
group: "Images"
Expand Down Expand Up @@ -761,7 +761,7 @@ questions:
- variable: auth-server-key-rotation.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The Auth Server Image tag"
label: Auth Server KeyRotation image tag
group: "Images"
Expand Down Expand Up @@ -790,7 +790,7 @@ questions:
- variable: casa.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The Casa Image tag"
label: Casa image tag
group: "Images"
Expand Down Expand Up @@ -819,7 +819,7 @@ questions:
- variable: config.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The Configurator Image tag"
label: Configurator image tag
group: "Images"
Expand Down Expand Up @@ -848,7 +848,7 @@ questions:
- variable: config-api.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The ConfigAPI Image tag"
label: ConfigAPI image tag
group: "Images"
Expand Down Expand Up @@ -877,7 +877,7 @@ questions:
- variable: fido2.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The Fido2 Image tag"
label: Fido2 image tag
group: "Images"
Expand Down Expand Up @@ -906,7 +906,7 @@ questions:
- variable: persistence.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The Persistence Image tag"
label: Persistence image tag
group: "Images"
Expand Down Expand Up @@ -935,7 +935,7 @@ questions:
- variable: scim.image.tag
required: true
type: string
default: "1.1.6-1"
default: "0.0.0-nightly"
description: "The SCIM Image tag"
label: SCIM image tag
group: "Images"
Expand Down
6 changes: 3 additions & 3 deletions charts/gluu-all-in-one/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ annotations:
artifacthub.io/containsSecurityUpdates: 'true'
artifacthub.io/images: |
- name: all-in-one
image: ghcr.io/gluufederation/flex/flex-all-in-one:5.1.6-1
image: ghcr.io/gluufederation/flex/flex-all-in-one:0.0.0-nightly
artifacthub.io/license: Apache-2.0
catalog.cattle.io/certified: partner
catalog.cattle.io/release-name: gluu-all-in-one
catalog.cattle.io/display-name: Gluu Flex Cloud Identity and Access Management All-in-One
apiVersion: v2
appVersion: "5.1.6"
appVersion: "0.0.0-nightly"
icon: >-
https://gluu.org/docs/gluu-server/favicon.ico
home: https://docs.gluu.org
Expand All @@ -21,4 +21,4 @@ maintainers:
email: [email protected]
description: Gluu Access and Identity Management All-in-One Chart. This chart deploys the selected janssen microservice all in one deployment.
name: gluu-all-in-one
version: 5.1.6
version: 0.0.0-nightly
Loading

0 comments on commit 71be844

Please sign in to comment.