Skip to content

Commit

Permalink
build: tet review pipeline (#2189)
Browse files Browse the repository at this point in the history
* chore: review pipeline DEVOPS-551
* chore: remove useless MockLoginView ja MockLogoutView from tet
  • Loading branch information
terovirtanen authored Aug 30, 2023
1 parent c86d24c commit 8d344aa
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 60 deletions.
65 changes: 65 additions & 0 deletions azure-pipelines/tet-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# Review pipeline. Run build and deploy for Platta test environments.
# Pipeline runs different tests e.g. unittest and browser tests.
#
# Continuous integration (CI) triggers cause a pipeline to run whenever you push
# an update to the specified branches or you push specified tags.
# only PR trigger pipeline
trigger: none

# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
# opened with one of the specified target branches, or when updates are made to
# such a pull request.
#
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# of the pull request.
#
# Opt out of pull request validation
pr:
# PR target branch
branches:
include:
- main
paths:
include:
- azure-pipelines/tet-review.yml
- backend/docker/tet.Dockerfile
- backend/tet/**
- backend/shared/**
- frontend/*
- frontend/tet/**
- frontend/shared/**
exclude:
- README.md
- backend/benefit/**
- backend/kesaseteli/**
- frontend/benefit/**
- frontend/kesaseteli/**
- frontend/**/browser-tests
- frontend/**/__tests__

# By default, use self-hosted agents
pool: Default

resources:
repositories:
# Azure DevOps repository
- repository: yjdh-tet-pipelines
type: git
# Azure DevOps project/repository
name: yjdh-tet/yjdh-tet-pipelines

extends:
# Filename in Azure DevOps Repository (note possible -ui or -api)
# Django example: azure-pipelines-PROJECTNAME-api-release.yml
# Drupal example: azure-pipelines-drupal-release.yml
template: azure-pipelines-tet-review.yml@yjdh-tet-pipelines
# Application build arguments and config map values as key value pairs.
# The values here will override the values defined in the yjdh-tet-pipelines repository.
# for example
# parameters:
# buildArgs:
# NEXT_PUBLIC_DEBUG: 0
# configMap: # pod environment variables
# DEBUG: 0
42 changes: 0 additions & 42 deletions backend/tet/tet/mock_views.py

This file was deleted.

19 changes: 1 addition & 18 deletions backend/tet/tet/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,7 @@
path("oidc/", include("shared.oidc.urls")),
]

if not settings.NEXT_PUBLIC_MOCK_FLAG:
urlpatterns += [path("oauth2/", include("shared.azure_adfs.urls"))]
else:
from tet.mock_views import MockLoginView, MockLogoutView

urlpatterns += [
path(
"oauth2/login",
MockLoginView.as_view(),
name="adfs_login",
),
path(
"oauth2/logout",
MockLogoutView.as_view(),
name="adfs_logout",
),
]

urlpatterns += [path("oauth2/", include("shared.azure_adfs.urls"))]

if settings.ENABLE_ADMIN:
urlpatterns.append(path("admin/", admin.site.urls))
Expand Down

0 comments on commit 8d344aa

Please sign in to comment.