Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
kiva-robot committed Nov 14, 2023
2 parents 444e57c + afbd234 commit c6a9251
Show file tree
Hide file tree
Showing 17 changed files with 317 additions and 67 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/create-release.yaml

This file was deleted.

7 changes: 2 additions & 5 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc*'

env:
GITHUB_PAT: "${{ secrets.KIVA_ROBOT_GITHUB_PAT }}"
Expand Down Expand Up @@ -55,8 +52,8 @@ jobs:
# Build and push the image to ECR
build:
runs-on: ubuntu-latest
# Run on merges to development or tag pushes (done by create-release workflow)
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
# Run on merges to development (main)
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
62 changes: 57 additions & 5 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,84 @@
name: Semantic Release

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: 'Environment to release to. Select "staging" for a pre-release or "production" for a full release.'
options:
- staging
- production
required: true
push:
branches:
- staging
- production

jobs:
# Create a release
create-release:
runs-on: ubuntu-latest
outputs:
published: ${{ steps.release.outputs.published }}
tag: ${{ steps.release.outputs.tag }}
steps:
- name: checkout-repo
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false
token: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
- name: checkout-actions
- name: Checkout actions
uses: actions/checkout@v4
with:
repository: kiva/github-actions
token: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
persist-credentials: false
path: .github/
- name: semantic-release
- name: Run semantic-release
id: release
uses: ./.github/actions/semantic-release
env:
GITHUB_PAT: ${{ secrets.KIVA_ROBOT_GITHUB_PAT }}
with:
config: "node"

# Build and push the image to ECR if the release was published
build-image:
runs-on: ubuntu-latest
needs: create-release
if: needs.create-release.outputs.published == 'true'
env:
GITHUB_PAT: "${{ secrets.KIVA_ROBOT_GITHUB_PAT }}"
AWS_REGION: "us-west-2"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SLACK_BOT_TOKEN: "${{ secrets.SLACK_TOKEN }}"
SLACK_CHANNEL: "eng-build-failures"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.create-release.outputs.tag }}
- uses: actions/checkout@v4
with:
repository: kiva/github-actions
token: ${{ env.GITHUB_PAT }}
path: .github/
- uses: snow-actions/sparse-checkout@v1.2.0
with:
repository: kiva/marketplace-web-ui-ci
token: ${{ env.GITHUB_PAT }}
path: .docker
ref: main
patterns: |
resources/org/kiva/marketplaceWebUiCi/ui
- name: move files
run: |
mv .docker/resources/org/kiva/marketplaceWebUiCi/ui/Dockerfile .
- name: docker-build
uses: ./.github/actions/docker-build-push
with:
dockerfile_target: "release"
push: true
tag_source: "git"
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
## [2.720.0-rc.5](https://github.com/kiva/ui/compare/v2.720.0-rc.4...v2.720.0-rc.5) (2023-11-13)


### 🐛 Bugfixes

* add option for alternate api audience ([f210f07](https://github.com/kiva/ui/commit/f210f072c79dc48a7650eda6ce1839a1a3ce0cef))

## [2.720.0-rc.4](https://github.com/kiva/ui/compare/v2.720.0-rc.3...v2.720.0-rc.4) (2023-11-10)


### 🐛 Bugfixes

* ensure server api url uses passed env var too ([5fe7a95](https://github.com/kiva/ui/commit/5fe7a9528dce391a1e181ec40888fe404a0e60db))

## [2.720.0-rc.3](https://github.com/kiva/ui/compare/v2.720.0-rc.2...v2.720.0-rc.3) (2023-11-10)


### 🐛 Bugfixes

* allow passing in full api url ([fc183ad](https://github.com/kiva/ui/commit/fc183adb3c7fd63ed0c89abff3d02d071b685aba))

## [2.720.0-rc.2](https://github.com/kiva/ui/compare/v2.720.0-rc.1...v2.720.0-rc.2) (2023-11-10)


### 🐛 Bugfixes

* turn off apollo batching for ui in all evns including prod ([241639f](https://github.com/kiva/ui/commit/241639ff141f15f889b3e86892091d08d501cfba))

## [2.720.0-rc.1](https://github.com/kiva/ui/compare/v2.719.1...v2.720.0-rc.1) (2023-11-09)


### 🎉 New Features

* increase edit donation amount from modal ([352531e](https://github.com/kiva/ui/commit/352531e85e46e4d93906d42483f8b9f29f18cd11))
* run release and release build in same workflow ([7e4c927](https://github.com/kiva/ui/commit/7e4c92740c38140bc99c3b54663b15c697d55621))
* team challenge section added to portfolio page ([#5064](https://github.com/kiva/ui/issues/5064)) ([a28266d](https://github.com/kiva/ui/commit/a28266db785fbbdcf0ca2ef04e3f2ed64e53138c))


### 🐛 Bugfixes

* ensure docker build push runs for successful semantic releases ([ed88f23](https://github.com/kiva/ui/commit/ed88f23bdc503b54440540c713389ac4accd4786))
* ensure we use cached possible types, config updates for local login state ([c7bc015](https://github.com/kiva/ui/commit/c7bc015589d888fe64a6442a2ba995ef58d10cc2))
* remove previous build process for tags ([d64c866](https://github.com/kiva/ui/commit/d64c86600e47cf0a9988264053cd6815a621072f))
* use git tag source for docker image build ([5018170](https://github.com/kiva/ui/commit/5018170c9fbadd4dff3fc1368e13edd77ad20326))


### 🏗️ Build System

* also run semantic release on stage & production branch pushes ([c65a2f2](https://github.com/kiva/ui/commit/c65a2f2802a8fb679102bc773714a485f5cb4b0d))
* persist credentials that use the kiva robot pat ([2f4f4e9](https://github.com/kiva/ui/commit/2f4f4e93b8174aa1772ff7653c8e35f68455b42e))


### 🪚 Refactors

* remove unused field and use util to get feature flag value ([94c3468](https://github.com/kiva/ui/commit/94c3468f1cd2a18645b27c281fb3ba28636e8516))

## [2.719.1](https://github.com/kiva/ui/compare/v2.719.0...v2.719.1) (2023-11-07)


Expand Down
2 changes: 1 addition & 1 deletion config/dev-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = merge(base, devVm, {
gaId: 'UA-11686022-7', // dev-vm property
auth0: {
loginRedirectUrls: {
xOXldYg02WsLnlnn0D5xoPWI2i3aNsFD: 'https://www.dev.kiva.org/authenticate?authLevel=recent',
xOXldYg02WsLnlnn0D5xoPWI2i3aNsFD: 'https://www.development.kiva.org/authenticate?authLevel=recent',
KIzjUBQjKZwMRgYSn6NvMxsUwNppwnLH: 'http://localhost:8888/ui-login?force=true',
ouGKxT4mE4wQEKqpfsHSE96c9rHXQqZF: 'http://localhost:8888/ui-login?force=true',
},
Expand Down
7 changes: 4 additions & 3 deletions config/dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const formattedUrlEnv = env === 'prod' ? '' : `${env}.`;
const enableOptimizely = process.env.ENABLE_OPTIMIZELY !== 'false';
const enablePerimeterx = process.env.ENABLE_PERIMETERX !== 'false';
const enableHotjar = process.env.ENABLE_HOTJAR !== 'false';
const graphqlUri = process.env.API_HOSTNAME || `https://gateway.${baseUrl}/graphql`;

// Auth0 app IDs
const adminAuthId = process.env.ADMIN_AUTH_ID || 'cNTV7eN5sBKgv9nQOxDpAz1pPfJGlBI5';
Expand Down Expand Up @@ -37,7 +38,7 @@ module.exports = {
},
enable: true,
checkFakeAuth,
apiAudience: `https://api.${baseUrl}/graphql`,
apiAudience: process.env.ALTERNATE_API_AUDIENCE || `https://api.${baseUrl}/graphql`,
mfaAudience: `https://kiva-${env}.auth0.com/mfa/`,
browserClientID,
serverClientID,
Expand All @@ -63,7 +64,7 @@ module.exports = {
merchantId: '10620948091453922228'
},
googleTagmanagerId: process.env.GOOGLE_TAG_MANAGER_ID || 'GTM-PXFRMT',
graphqlUri: `https://gateway.${baseUrl}/graphql`,
graphqlUri,
grecaptchaSitekey: process.env.G_RECAPTCHA_SITE_KEY || '6LcXENcmAAAAAEC4ygspn1WTm4zP4gLexXDnWuXE',
host: `www.${baseUrl}`,
hotjarId: process.env.HOTJAR_ID || '3071239',
Expand Down Expand Up @@ -94,7 +95,7 @@ module.exports = {
},
server: {
disableCluster: true,
graphqlUri: `https://gateway.${baseUrl}/graphql`,
graphqlUri,
gzipEnabled: false,
memcachedEnabled: true,
memcachedServers,
Expand Down
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var path = require('path')

module.exports = {
app: {
apolloBatching: true,
apolloBatching: false,
host: 'www.kiva.org',
transport: 'https',
publicPath: 'https://www-kiva-org.freetls.fastly.net/ui/',
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ configmap:
value: "kiva-ui"
- key: DD_PROFILING_ENABLED
value: true
- key: APOLLO_BATCH
value: "false"
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kvue",
"version": "2.719.1",
"version": "2.720.0-rc.5",
"description": "The Kiva ui",
"author": "braincrave",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion server/util/getGqlPossibleTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = function getGqlPossibleTypes(url, cache) {
return tracer.trace('getGqlFragmentTypes', () => {
return tracer.trace('getGqlFragmentsFromCache', () => {
return getGqlPossibleTypesFromCache(cache).then(data => {
if (data.length) {
if (Object.keys(data).length) {
return data;
}
return tracer.trace('fetchGqlFragments', () => fetchGqlPossibleTypes(url, cache));
Expand Down
2 changes: 1 addition & 1 deletion src/api/HttpLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default ({
fetch,
apolloBatching,
}) => {
const onVm = uri.indexOf('vm') > -1;
const onVm = uri.indexOf('vm') > -1 || uri.indexOf('local') > -1;

const options = {
uri,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 21 additions & 3 deletions src/components/Checkout/DonationNudge/DonationNudgeLightbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ import KvCharityNavigator from '@/components/Kv/KvCharityNavigator';
import { mdiInformation } from '@mdi/js';
import HeartIcon from '@/assets/icons/inline/heart-icon.svg';
import HowKivaUsesDonation from '@/components/Checkout/HowKivaUsesDonation';
import { gql } from '@apollo/client';
import { readBoolSetting } from '@/util/settingsUtils';
import KvButton from '~/@kiva/kv-components/vue/KvButton';
import KvLightbox from '~/@kiva/kv-components/vue/KvLightbox';
import KvMaterialIcon from '~/@kiva/kv-components/vue/KvMaterialIcon';
Expand All @@ -108,9 +110,25 @@ export default {
mdiInformation,
zeroUpsellVisible: false,
title: 'Loans change lives. Your donations make them possible.',
seasonalTipRateEnabled: false,
};
},
inject: ['cookieStore'],
inject: ['apollo', 'cookieStore'],
apollo: {
query: gql`query seasonalTipRateIncrease {
general {
seasonalTipRateEnabled: featureSetting(key: "seasonal_tip_rate.enabled") {
key
value
}
}
}
`,
preFetch: true,
result({ data }) {
this.seasonalTipRateEnabled = readBoolSetting(data, 'general.seasonalTipRateEnabled.value');
}
},
components: {
KvButton,
KvLightbox,
Expand Down Expand Up @@ -154,12 +172,12 @@ export default {
percentageRows() {
return [
{
percentage: 15,
percentage: this.seasonalTipRateEnabled ? 18 : 15,
appeal: `Cover the cost to facilitate ${this.loanCount > 1 ? 'these loans' : 'this loan'}`,
appealIsHorizontallyPadded: false,
},
{
percentage: 20,
percentage: this.seasonalTipRateEnabled ? 24 : 20,
appeal: 'Reach more people around the world!',
appealIsHorizontallyPadded: false,
},
Expand Down
27 changes: 27 additions & 0 deletions src/graphql/query/portfolioQuery.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
query portfolioQuery {
my {
id
teams (
limit: 100
) {
values {
id
team {
id
name
teamPublicId
}
}
}
}
general {
team_challenge_enable: uiConfigSetting(key: "portfolio_team_challenge_enable") {
key
value
}
challenge_allowed_teams: uiConfigSetting(key: "portfolio_challenge_allowed_teams") {
key
value
}
}
}
Loading

0 comments on commit c6a9251

Please sign in to comment.