-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into unit-test-script
- Loading branch information
Showing
214 changed files
with
259 additions
and
29,216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'agora/v*' | ||
- 'openchallenges/v*' | ||
|
||
permissions: | ||
packages: write | ||
|
||
env: | ||
PRODUCT: '' | ||
VERSION: '' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04-4core-16GBRAM-150GBSSD | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Extract product and version from Git tag | ||
run: | | ||
# Extract the product name (part before the first slash) and version (part after the first slash) | ||
PRODUCT=$(echo "${GITHUB_REF#refs/tags/}" | cut -d'/' -f1) | ||
VERSION=$(echo "${GITHUB_REF#refs/tags/}" | cut -d'/' -f2) | ||
# Output extracted values for the rest of the job | ||
echo "PRODUCT=${PRODUCT}" >> $GITHUB_ENV | ||
echo "VERSION=${VERSION}" >> $GITHUB_ENV | ||
- name: Derive appropriate SHAs for base and head for `nx affected` commands | ||
uses: nrwl/nx-set-shas@v4 | ||
|
||
- name: Set up the dev container | ||
uses: ./.github/actions/setup-dev-container | ||
|
||
- name: Build the Docker images for the specified product | ||
run: | | ||
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \ | ||
&& export VERSION=${{ env.VERSION }} \ | ||
&& echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin \ | ||
&& nx run-many --target=build-image --projects=${{ env.PRODUCT }}-* --configuration=ci" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
SERVER_PORT=8082 | ||
KEYCLOAK_URL=http://openchallenges-keycloak:8080 | ||
SERVICE_REGISTRY_URL=http://openchallenges-service-registry:8081/eureka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,11 @@ | ||
@serviceRegistryHost = http://openchallenges-service-registry:8081 | ||
@apiGatewayHost = http://openchallenges-api-gateway:8082 | ||
@userServiceHost = http://openchallenges-user-service:8083 | ||
@keycloakHost = http://localhost:8080 | ||
|
||
### Check API gateway actuator (expected to redirect to Keycloak login page) | ||
### Check API gateway actuator | ||
|
||
GET {{apiGatewayHost}}/actuator | ||
|
||
### Check service registry info | ||
|
||
GET {{serviceRegistryHost}}/actuator/info | ||
|
||
### Check user service info | ||
|
||
GET {{userServiceHost}}/actuator/info | ||
|
||
### Check user service info via the API gateway (expected to redirect to | ||
### Keycloak login page) | ||
|
||
GET {{apiGatewayHost}}/user/actuator/info | ||
|
||
### Get access token from Keycloak | ||
|
||
@clientId = challenge-core-client | ||
@clientSecret = O0cNRMWg3LHsdHW8BNPlY96qKooDPhPX | ||
@username = luke | ||
@password = changeme | ||
|
||
# @name login | ||
|
||
POST {{keycloakHost}}/realms/test/protocol/openid-connect/token | ||
Content-Type: application/x-www-form-urlencoded | ||
|
||
grant_type=password | ||
&scope=email | ||
&client_id={{clientId}} | ||
&client_secret={{clientSecret}} | ||
&username={{username}} | ||
&password={{password}} | ||
|
||
### Check user service info | ||
|
||
GET {{apiGatewayHost}}/user/actuator/info | ||
Authorization: Bearer {{login.response.body.$.access_token}} | ||
|
||
### Check API gateway info | ||
|
||
GET {{apiGatewayHost}}/actuator/info | ||
Authorization: Bearer {{login.response.body.$.access_token}} | ||
|
||
### Check API gateway routes | ||
|
||
GET {{apiGatewayHost}}/actuator/gateway/routes | ||
Authorization: Bearer {{login.response.body.$.access_token}} | ||
GET {{serviceRegistryHost}}/actuator/info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
apps/openchallenges/app/src/app/initialize-keycloak.factory.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.