Loading capif/.gitlab-ci.yml +64 −0 Original line number Diff line number Diff line Loading @@ -592,6 +592,70 @@ main_build_and_push: # SECURE_LOG_LEVEL: debug # <<: *main_dnd deploy_ocf_main: stage: deploy_ocf_main needs: - main_build_and_push <<: *main_common environment: name: review/main url: https://$NAMESPACE_STAGING.$DOMAIN_STAGING on_stop: delete_ocf_main auto_stop_in: 3 day # rules: # - if: $CI_COMMIT_BRANCH == "staging" # when: never # - if: $CI_COMMIT_BRANCH == "main" script: # - echo "### git clone OCF repo ###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git - echo "### install helm###" - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig delete_ocf_main: stage: delete_ocf_main <<: *main_common script: - echo "### deleting environment $NAMESPACE_STAGING###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig when: manual environment: name: review/main action: stop robot_framework_testing: needs: ["deploy_ocf_main"] stage: testing Loading capif/templates/cd-deploy-ocf.gitlab-ci.yml +0 −66 Original line number Diff line number Diff line stages: - deploy_ocf_main - delete_ocf_main - deploy_ocf_staging - delete_ocf_staging - deploy_ocf_dev Loading Loading @@ -39,70 +37,6 @@ variables: tags: - shell deploy_ocf_main: stage: deploy_ocf_main needs: - main_build_and_push <<: *main_common environment: name: review/main url: https://$NAMESPACE_STAGING.$DOMAIN_STAGING on_stop: delete_ocf_main auto_stop_in: 3 day # rules: # - if: $CI_COMMIT_BRANCH == "staging" # when: never # - if: $CI_COMMIT_BRANCH == "main" script: # - echo "### git clone OCF repo ###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git - echo "### install helm###" - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig delete_ocf_main: stage: delete_ocf_main <<: *main_common script: - echo "### deleting environment $NAMESPACE_STAGING###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig when: manual environment: name: review/main action: stop deploy_ocf_staging: stage: deploy_ocf_staging <<: *staging_common Loading Loading
capif/.gitlab-ci.yml +64 −0 Original line number Diff line number Diff line Loading @@ -592,6 +592,70 @@ main_build_and_push: # SECURE_LOG_LEVEL: debug # <<: *main_dnd deploy_ocf_main: stage: deploy_ocf_main needs: - main_build_and_push <<: *main_common environment: name: review/main url: https://$NAMESPACE_STAGING.$DOMAIN_STAGING on_stop: delete_ocf_main auto_stop_in: 3 day # rules: # - if: $CI_COMMIT_BRANCH == "staging" # when: never # - if: $CI_COMMIT_BRANCH == "main" script: # - echo "### git clone OCF repo ###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git - echo "### install helm###" - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig delete_ocf_main: stage: delete_ocf_main <<: *main_common script: - echo "### deleting environment $NAMESPACE_STAGING###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig when: manual environment: name: review/main action: stop robot_framework_testing: needs: ["deploy_ocf_main"] stage: testing Loading
capif/templates/cd-deploy-ocf.gitlab-ci.yml +0 −66 Original line number Diff line number Diff line stages: - deploy_ocf_main - delete_ocf_main - deploy_ocf_staging - delete_ocf_staging - deploy_ocf_dev Loading Loading @@ -39,70 +37,6 @@ variables: tags: - shell deploy_ocf_main: stage: deploy_ocf_main needs: - main_build_and_push <<: *main_common environment: name: review/main url: https://$NAMESPACE_STAGING.$DOMAIN_STAGING on_stop: delete_ocf_main auto_stop_in: 3 day # rules: # - if: $CI_COMMIT_BRANCH == "staging" # when: never # - if: $CI_COMMIT_BRANCH == "main" script: # - echo "### git clone OCF repo ###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git - echo "### install helm###" - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig delete_ocf_main: stage: delete_ocf_main <<: *main_common script: - echo "### deleting environment $NAMESPACE_STAGING###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig when: manual environment: name: review/main action: stop deploy_ocf_staging: stage: deploy_ocf_staging <<: *staging_common Loading