From c03ee02aa5d4c2764c807a3c463f5201b03ec2e3 Mon Sep 17 00:00:00 2001 From: anton Date: Tue, 2 Apr 2024 22:40:31 +0200 Subject: [PATCH] Removed Travis's scripts and updated README.md --- .../package_and_push_helm_chart.yaml | 43 ++++----- .travis.yml | 84 ------------------ .travis/add_pod_annotations.sh | 24 ----- .travis/ci-service-account.json.enc | Bin 2320 -> 0 bytes README.md | 7 +- charts/.travis/build.sh | 9 -- charts/.travis/install.sh | 16 ---- charts/fairspace-keycloak/values.yaml | 1 + 8 files changed, 28 insertions(+), 156 deletions(-) delete mode 100644 .travis.yml delete mode 100755 .travis/add_pod_annotations.sh delete mode 100644 .travis/ci-service-account.json.enc delete mode 100755 charts/.travis/build.sh delete mode 100755 charts/.travis/install.sh diff --git a/.github/workflows/package_and_push_helm_chart.yaml b/.github/workflows/package_and_push_helm_chart.yaml index ba9a210f..b4e89495 100644 --- a/.github/workflows/package_and_push_helm_chart.yaml +++ b/.github/workflows/package_and_push_helm_chart.yaml @@ -7,15 +7,9 @@ on: - release workflow_dispatch: inputs: - name: - description: "Manual trigger for Helm chart packaging and pushing" - release_type: - description: "Release or snapshot version?" - required: true - default: "SNAPSHOT" - options: - - "SNAPSHOT" - - "RELEASE" + version: + description: "Version of the Helm chart to push" + required: false jobs: deploy: @@ -25,6 +19,21 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Prepare version + run: | + VERSION=$(cat ./VERSION) + BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + echo "Building images from the branch: $BRANCH" + if [ $BRANCH != "release" ]; then + VERSION=$VERSION-SNAPSHOT + fi + # override version of custom input is provided + if [[ -n "${{ github.event.inputs.version }}" ]]; then + VERSION=${{ github.event.inputs.version }} + fi + echo "Helm charts version to be deployed: $VERSION" + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Setup Helm uses: azure/setup-helm@v4.1.0 with: @@ -39,20 +48,14 @@ jobs: helm repo add codecentric https://codecentric.github.io/helm-charts helm dependency update "charts/fairspace-keycloak" - - name: Prepare version + - name: Lint Helm chart run: | - VERSION=$(cat ./VERSION) - if [[ ${{ github.event.inputs.release_type }} = "SNAPSHOT" ]] || [[ $BRANCH = "dev" ]]; then - VERSION=$VERSION-SNAPSHOT - fi - echo "VERSION=$VERSION" >> $GITHUB_ENV + helm lint "charts/fairspace-keycloak" - - name: Package and Push Helm chart to repository + - name: Package Helm chart run: | helm package "charts/fairspace-keycloak" --version ${{ env.VERSION }} - helm push "fairspace-keycloak-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}" - echo "Pushed package to repository" - - name: Clean up + - name: Push Helm chart to repository run: | - rm -rf "fairspace-keycloak*.tgz" + helm push "fairspace-keycloak-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 304f8611..00000000 --- a/.travis.yml +++ /dev/null @@ -1,84 +0,0 @@ -dist: jammy - -language: java - -env: - global: - - NODE_VERSION="18.16.0" - - APPNAME="fairspace-keycloak" - - ORG="thehyve" - - ARTIFACT_BUILD_FILE="" - - BUILD_SCRIPTS_REPO="thehyve/fairspace-build-scripts" - - DEPLOYMENT_CONFIG_REPO="thehyve/fairspace-config-private" - - ACCOUNT_CONFIG_DIR="./.travis" - - RELEASE_BRANCH="release" - - SNAPSHOT_BRANCH="dev" - - DOCKER_USERNAME="fairspace" - - GCP_PROJECT="fairspace-207108" - - GITHUB_USERNAME="fairspace-ci" - - SHOULD_DEPLOY=false - # DEPLOYMENT RELATED VARIABLES - REQUIRED IF SHOULD_DEPLOY=true - # - SNAPSHOT_CONTEXT="gke_fairspace-207108_europe-west1-b_fairspacecicluster" - # - SNAPSHOT_CLUSTER_NAME="fairspacecicluster" - # - SNAPSHOT_CLUSTER_ZONE="europe-west1-b" - # - RELEASE_CONTEXT="gke_fairspace-207108_europe-west1-b_fairspacecicluster" - # - RELEASE_CLUSTER_NAME="fairspacecicluster" - # - RELEASE_CL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6y7wmPIOke/Ib7SmQYmulEP7lkJDH+v0RUHHMeKcMjUZdA/ADmopxuW1uQ2+V8arIFKM5Tb4GPCr6PEvOMDm5Nrauo9LuXPVmSJ5jcR6w1PAMdLjONGWJLNTKeP72T7DmikMNhjWtJl2IeevBXiDAtPW3AU++BibnkrOk3q0ENhrF/oK6e2c0PWtkDaqgQMJi2uSu9Tni8LWiwZQLmUkA/vAkllz6dwZZ9ooA26qtVAUnPeMepNLU/9+HBQio6hbtHN5hL+3Sekv/16ZgfI72Bhb8Eo3ElnXoeybAmhM5fGGSvgYtp+VEHCmXSIvW5XDgcv3f2sA60bldSuu+T5yw76EIlM7eCke+x84g7HxAPBLffGJxZqS8g=" - -cache: - directories: - - $HOME/downloads - - $HOME/.gradle - -before_install: - - nvm install $NODE_VERSION - - export KUBE_CONFIG_ENC_KEY=$encrypted_6c9f30024cb1_key - - export KUBE_CONFIG_ENC_IV=$encrypted_6c9f30024cb1_iv - - git clone https://$GITHUB_USERNAME:$GITHUB_PASSWORD@github.com/$BUILD_SCRIPTS_REPO ci - - export BUILD_SCRIPTS_DIR=$(pwd)/ci - - 'if [[ "$SHOULD_DEPLOY" = "true" ]]; then git clone https://$GITHUB_USERNAME:$GITHUB_PASSWORD@github.com/$DEPLOYMENT_CONFIG_REPO ci-config ; fi' - - 'if [[ "$SHOULD_DEPLOY" = "true" ]]; then export DEPLOYMENT_CONFIG_DIR="$(pwd)/ci-config/fairspace-keycloak" ; fi' - - 'if [[ "$SHOULD_DEPLOY" = "true" ]] && [[ "$TRAVIS_BRANCH" = "$SNAPSHOT_BRANCH" ]]; then export ALLOW_SNAPSHOTS=1 DEPLOY_TARGET=ci KUBERNETES_CONTEXT="$SNAPSHOT_CONTEXT" DEPLOY_PLATFORM="GCP" KUBERNETES_CONTEXT="$SNAPSHOT_CONTEXT" CLUSTER_NAME="$SNAPSHOT_CLUSTER_NAME" CLUSTER_ZONE="$SNAPSHOT_CLUSTER_ZONE"; fi' - - 'if [[ "$SHOULD_DEPLOY" = "true" ]] && [[ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" ]]; then export DEPLOY_TARGET=test KUBERNETES_CONTEXT="$RELEASE_CONTEXT" CLUSTER_NAME="$RELEASE_CLUSTER_NAME" DEPLOY_PLATFORM="GCP" CLUSTER_ZONE="$RELEASE_CLUSTER_ZONE"; fi' - - source ./ci/setup_env.sh - - 'if [[ "$SHOULD_RELEASE" ]] ; then export NEED_INTERNAL_HELM=1 RELEASE_PLATFORM="GCP" ; fi' - -jobs: - include: - - stage: build - cache: false - name: Build helm charts - install: - - source charts/.travis/install.sh - script: - - charts/.travis/build.sh - - if: branch = release AND type != pull_request - cache: false - stage: Versioning - name: Set tag and update version - script: - - "./ci/helm/tag.sh" - - "ci/versioning/add_tag_to_git.sh" - - "ci/versioning/set_next_version.sh" - - stage: deploy - cache: false - if: env(SHOULD_DEPLOY) = true and branch = dev and type != pull_request - install: - - source charts/.travis/install.sh - script: - - travis_wait ci/helm/deploy.sh $DEPLOY_TARGET - -notifications: - slack: - rooms: - - secure: "dpJL60bCwWHBbY23/6gTUWjLFo5FXp2+56k6EoxtFFwH7a8I9RAnuxHgbNknVypY115GgSpueSSbePaSlbGeHqZ/AQ1e6q2r80RQPBe+lFSc3+0DTkq00p97xqqFjpSSTE4+wYSGldP9GVpN89LLc9wZbSeI+GH3nr/vgMjTA8OPsUFPr49n/VNnqUm4I5SA2YKxYlVZuUoWGqWqj107LBiFFgOCUSeGgeM9wafFA86rxmkNU3h77g6N4rJrx8SUZrjFg158KHsN+nfnc6kFTHx+CJg+WSPx3T7Stf0XPPQe7pDgMpOucNH7n6duqa9V6ldhG9jati9BmSa74EzxzLGuhwVUiZgWQ0dZaND6hfTQnWk3/XKI9lNyUQ5uuCYuHaT33CiEiIt/HkigFoMgX6QkCPqk9eYAfVsOLz2nnqfmtT7AMM6xcCXrHRjJ7O/ZIo1UZaR5GwUD7j3JVA6UgNzztIBr+h/CyjvRSWQklOpVAYhCmuHJ1bEfKXfUx4Qkc0k5IaoefZ5uW5Ny64VBZoQMNt5MRxysKS9/ITqY4CALSxf0oBkQbxms5Oz967zFOWhD3+QL6sHAkLkVaUro1Y89Epm1YMqAaawC0DAFvrmeDXCITuPcDpsFHWVfpPLphxLA6d+TLZ5BNrdCpCj9GpDnFD0UkQ+wodZdfI6YaVo=" - template: - - "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository_slug}@%{branch}" - - "Latest commit: %{commit_message} - by %{author}" - - "Result: %{result} in %{duration}" diff --git a/.travis/add_pod_annotations.sh b/.travis/add_pod_annotations.sh deleted file mode 100755 index 53577c74..00000000 --- a/.travis/add_pod_annotations.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# This script will add a pod annotations for each project that has -# been built to ensure -# that the pod will be recreated for new SNAPSHOT images -# -# Required env variables: -# $APPNAME -# $COMMIT_ID -# -DIR=$(dirname $0) - -# If we have no changes at all in any of the projects, we can skip -# pod annotations -if $DIR/build-condition.sh $TRAVIS_COMMIT_RANGE projects/; then - echo "Adding pod annotations" - - # Remove empty pod annotations - sed -i -e "s/podAnnotations: { }//" charts/fairspace-keycloak/values.yaml - - # Add a pod annotation in the values.yaml file - echo -e "\npodAnnotations:" >> charts/fairspace-keycloak/values.yaml - echo -e " fairspace-keycloak:\n commit: \"$COMMIT_ID\"\n" >> charts/fairspace-keycloak/values.yaml -fi diff --git a/.travis/ci-service-account.json.enc b/.travis/ci-service-account.json.enc deleted file mode 100644 index ff0f6bf2bde5a0f9e05b41f3f2b0f123d081c6c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2320 zcmV+r3Geo_q4|XNKqkBxx_lpr_ZBtnc6sqB8Y`u>ZkANhZmu)GO|!;8yeBF@dGCZ$ z%pC+Sg27I5h}Qo*oNS`x|Iw_MI=i?qK&$)LhngGGbWxHhswpz>3006mqF&%4RiiHl zD#i+#b;=_}C(zVv()CY0jK44qFliStevGv5?&wKf1|Z#@n{4r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