-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from patou/preprod/release-ng5
Preprod/release V7 ng5 Front in Angular
- Loading branch information
Showing
382 changed files
with
72,830 additions
and
2,067 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
version: 2.1 # use CircleCI 2.0 | ||
jobs: # a collection of steps | ||
build-frontend: | ||
working_directory: ~/liste-envies | ||
docker: | ||
- image: circleci/node:12.18.4 | ||
steps: | ||
- checkout | ||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/ | ||
key: yarn-packages-{{ checksum "liste-envies-front/yarn.lock" }} | ||
- run: cd liste-envies-front && yarn install --frozen-lockfile | ||
- save_cache: # special step to save the dependency cache | ||
key: yarn-packages-{{ checksum "liste-envies-front/yarn.lock" }} | ||
paths: | ||
- ~/.cache/yarn | ||
- run: cd liste-envies-front && yarn run build | ||
- persist_to_workspace: | ||
root: ~/liste-envies | ||
paths: | ||
- liste-envies-front/dist | ||
- store_artifacts: | ||
path: liste-envies-front/dist | ||
build-backend: # runs not using Workflows must have a `build` job as entry point | ||
working_directory: ~/liste-envies | ||
docker: | ||
- image: circleci/openjdk:8-jdk-stretch | ||
steps: | ||
- checkout | ||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/ | ||
key: java-{{ checksum "liste-envies-war/pom.xml" }} | ||
- run: cd liste-envies-war && mvn dependency:go-offline # gets the project dependencies | ||
- save_cache: # saves the project dependencies | ||
paths: | ||
- ~/.m2 | ||
key: java-{{ checksum "liste-envies-war/pom.xml" }} | ||
- run: echo ${FIREBASE_SERVICE_TEST_ACCOUNT} > liste-envies-war/src/main/resources/firebase.json | ||
- run: cd liste-envies-war && mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=error clean test | ||
- run: | ||
name: Save test results | ||
command: | | ||
mkdir -p ~/test-results/junit/ | ||
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \; | ||
when: always | ||
- persist_to_workspace: | ||
root: ~/liste-envies | ||
paths: | ||
- liste-envies-war/target/liste-envies | ||
- store_test_results: | ||
path: ~/test-results | ||
- store_artifacts: | ||
path: ~/test-results/junit | ||
deploy-test: | ||
working_directory: ~/liste-envies | ||
docker: | ||
- image: circleci/openjdk:8-jdk-stretch | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/liste-envies | ||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/ | ||
key: java-{{ checksum "liste-envies-war/pom.xml" }} | ||
- run: | ||
name: Install Gcloud | ||
command: | | ||
if [ ! -d "~/google-cloud-sdk/bin" ]; then rm -rf ~/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi | ||
source ~/google-cloud-sdk/path.bash.inc | ||
gcloud version | ||
gcloud --quiet components update app-engine-java | ||
- run: | ||
name: Deploy Apps | ||
command: | | ||
source ~/google-cloud-sdk/path.bash.inc | ||
cd liste-envies-war | ||
echo ${FIREBASE_SERVICE_ACCOUNT_TEST} > src/main/resources/firebase.json | ||
echo ${GOOGLE_CLIENT_SECRET_TEST} > client-secret.json; | ||
export APP_ID=${CLOUDSDK_PROJECT_TEST}; | ||
BRANCH=${CIRCLE_BRANCH//[^a-zA-Z0-9]/-} | ||
export APP_VERSION=${BRANCH:0:63}; | ||
echo "Deploy application ${APP_ID} version ${APP_VERSION}" | ||
gcloud auth activate-service-account --key-file client-secret.json | ||
mvn -B --no-transfer-progress -DskipTests=true -Dapp.deploy.projectId=${APP_ID} -Dapp.deploy.version=${APP_VERSION} -Dapp.deploy.promote=false package appengine:deployAll | ||
deploy-prod: | ||
working_directory: ~/liste-envies | ||
docker: | ||
- image: circleci/openjdk:8-jdk-stretch | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/liste-envies | ||
- restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed | ||
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/ | ||
key: java-{{ checksum "liste-envies-war/pom.xml" }} | ||
- run: | ||
name: Install Gcloud | ||
command: | | ||
if [ ! -d "~/google-cloud-sdk/bin" ]; then rm -rf ~/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi | ||
source ~/google-cloud-sdk/path.bash.inc | ||
gcloud version | ||
gcloud --quiet components update app-engine-java | ||
- run: | ||
name: Deploy Apps | ||
command: | | ||
source ~/google-cloud-sdk/path.bash.inc | ||
cd liste-envies-war | ||
echo ${FIREBASE_SERVICE_ACCOUNT} > src/main/resources/firebase.json | ||
echo ${GOOGLE_CLIENT_SECRET} > client-secret.json; | ||
export APP_ID=${CLOUDSDK_PROJECT}; | ||
export APP_VERSION=${MASTER_VERSION:0:63}; | ||
echo "Deploy application ${APP_ID} version ${APP_VERSION}" | ||
gcloud auth activate-service-account --key-file client-secret.json | ||
mvn -B --no-transfer-progress -DskipTests=true -Dapp.deploy.projectId=${APP_ID} -Dapp.deploy.version=${APP_VERSION} -Dapp.deploy.promote=false package appengine:deployAll | ||
workflows: | ||
version: 2 | ||
build-test-and-deploy: | ||
jobs: | ||
- build-frontend | ||
- build-backend | ||
- deploy-test: | ||
requires: | ||
- build-frontend | ||
- build-backend | ||
filters: | ||
branches: | ||
ignore: master | ||
- deploy-prod: | ||
requires: | ||
- build-frontend | ||
- build-backend | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- /preprod\/.*/ | ||
- /beta\/.*/ |
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,22 @@ | ||
ci: | ||
- ./.github/workflows/* | ||
- ./.github/* | ||
- .circleci/* | ||
- .travis.yml | ||
repo: | ||
- ./* | ||
back: | ||
- liste-envies-war/src/* | ||
- liste-envies-war/src/**/* | ||
front: | ||
- liste-envies-front/src/* | ||
- liste-envies-front/src/**/* | ||
style: | ||
- liste-envies-front/**/*.scss | ||
- liste-envies-front/**/*.css | ||
test: | ||
- liste-envies-front/**/*.spec.ts | ||
- liste-envies-war/src/test/**/*.java | ||
dependencies: | ||
- liste-envies-front/package.json | ||
- liste-envies-war/pom.xml |
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,20 @@ | ||
name: Supression d'une branche | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
removeversion: | ||
name: Suppression d'une branche | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rlespinasse/[email protected] | ||
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master | ||
with: | ||
version: "277.0.0" | ||
service_account_key: ${{ secrets.GCP_SA_KEY }} | ||
- run: | | ||
APP_VERSION=${{ env.GITHUB_HEAD_REF_SLUG }} | ||
echo Delete version ${APP_VERSION} | ||
gcloud app versions delete --project test-liste-envies ${APP_VERSION} |
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,18 @@ | ||
# This workflow will triage pull requests and apply a label based on the | ||
# paths that are modified in the pull request. | ||
# | ||
# To use this workflow, you will need to set up a .github/labeler.yml | ||
# file with configuration. For more information, see: | ||
# https://github.com/actions/labeler/blob/master/README.md | ||
|
||
name: Labeler | ||
on: [pull_request] | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/labeler@v2 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
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,31 @@ | ||
name: Add url on PR | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
commentpr: | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- name: "Wait for status checks" | ||
id: waitforstatuschecks | ||
uses: "WyriHaximus/[email protected]" | ||
with: | ||
ignoreActions: commentpr | ||
checkInterval: 13 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- uses: rlespinasse/[email protected] | ||
- uses: mshick/add-pr-comment@v1 | ||
if: steps.waitforstatuschecks.outputs.status == 'success' | ||
with: | ||
message: | | ||
Application deployé sur https://${{ env.GITHUB_HEAD_REF_SLUG }}-dot-test-liste-envies.appspot.com/ (http://${{ env.GITHUB_HEAD_REF_SLUG }}.test-liste-envies.appspot.com/) | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
allow-repeats: false | ||
- name: Slack notification | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_AVATAR: repository # Optional. can be (repository, sender, an URL) (defaults to webhook app avatar) | ||
uses: Ilshidur/action-slack@master | ||
with: | ||
args: "Voir l'application deployé sur https://{{ GITHUB_HEAD_REF_SLUG }}-dot-test-liste-envies.appspot.com/" |
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 @@ | ||
v12.18.4 |
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,33 +1,57 @@ | ||
language: java | ||
cache: | ||
directories: | ||
- $HOME/.m2 | ||
- $HOME/google-cloud-sdk | ||
install: | ||
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi | ||
- source $HOME/google-cloud-sdk/path.bash.inc | ||
- gcloud version | ||
- gcloud --quiet components update app-engine-java | ||
jobs: | ||
include: | ||
- language: java | ||
name: "Backend" | ||
stage: build | ||
cache: | ||
directories: | ||
- $HOME/.m2 | ||
- $HOME/google-cloud-sdk | ||
install: | ||
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi | ||
- source $HOME/google-cloud-sdk/path.bash.inc | ||
- gcloud version | ||
- gcloud --quiet components update app-engine-java | ||
|
||
#command to install dependencies | ||
script: | ||
- cd liste-envies-war | ||
- "mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=error clean install" | ||
#command to install dependencies | ||
script: | ||
- cd $TRAVIS_BUILD_DIR/liste-envies-war | ||
- echo ${FIREBASE_SERVICE_ACCOUNT} > $TRAVIS_BUILD_DIR/liste-envies-war/src/main/resources/firebase.json | ||
- "mvn -B --no-transfer-progress -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=error clean test" | ||
|
||
- language: node_js | ||
stage: build | ||
name: "Frontend" | ||
node_js: | ||
- 12 | ||
cache: | ||
directories: | ||
- $TRAVIS_BUILD_DIR/liste-envies-front/node_modules | ||
install: | ||
- cd $TRAVIS_BUILD_DIR/liste-envies-front | ||
- npm install | ||
|
||
#command to install dependencies | ||
script: | ||
- cd $TRAVIS_BUILD_DIR/liste-envies-front | ||
- npm run build | ||
- language: java | ||
stage: deploy | ||
name: "Deploy" | ||
script: | ||
- cd $TRAVIS_BUILD_DIR/liste-envies-war | ||
- if [ a${TRAVIS_BRANCH} = "amaster" -a ${TRAVIS_EVENT_TYPE} = "push" ]; then | ||
echo ${GOOGLE_CLIENT_SECRET} > client-secret.json; | ||
export APP_ID=${CLOUDSDK_CORE_PROJECT}; | ||
export APP_VERSION=${VERSION_CORE_NAME}; | ||
else | ||
echo ${GOOGLE_CLIENT_SECRET_TEST} > client-secret.json; | ||
export APP_ID=${CLOUDSDK_TEST_PROJECT}; | ||
export APP_VERSION=${TRAVIS_BRANCH//_/-}; | ||
fi | ||
- echo "Deploy application ${APP_ID} version ${APP_VERSION}" | ||
- gcloud auth activate-service-account --key-file client-secret.json | ||
- mvn -B -DskipTests=true -Dapp.deploy.project=${APP_ID} -Dapp.deploy.version=${APP_VERSION} -Dapp.deploy.promote=false appengine:deploy | ||
|
||
#command to deploy | ||
after_success: | ||
- if [ a${TRAVIS_BRANCH} = "amaster" -a ${TRAVIS_EVENT_TYPE} = "push" ]; then | ||
echo ${GOOGLE_CLIENT_SECRET} > client-secret.json; | ||
export APP_ID=${CLOUDSDK_CORE_PROJECT}; | ||
export APP_VERSION=${VERSION_CORE_NAME}; | ||
else | ||
echo ${GOOGLE_CLIENT_SECRET_TEST} > client-secret.json; | ||
export APP_ID=${CLOUDSDK_TEST_PROJECT}; | ||
export APP_VERSION=${TRAVIS_BRANCH//_/-}; | ||
fi | ||
- echo "Deploy application ${APP_ID} version ${APP_VERSION}" | ||
- gcloud auth activate-service-account --key-file client-secret.json | ||
- mvn -B -DskipTests=true -Dapp.deploy.project=${APP_ID} -Dapp.deploy.version=${APP_VERSION} appengine:deploy | ||
|
||
notifications: | ||
slack: desaintsteban:OBrvC8hmnZXdW1HTa0QOE5tM |
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,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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,15 @@ | ||
# Default ignored files | ||
/.idea/shelf/ | ||
/.idea/workspace.xml | ||
|
||
# Project exclude paths | ||
/documentation/ | ||
|
||
# Datasource local storage ignored files | ||
/.idea/dataSources/ | ||
dataSources.local.xml | ||
|
||
# Editor-based HTTP Client requests | ||
/.idea/httpRequests/ | ||
rest-client.private.env.json | ||
http-client.private.env.json |
Oops, something went wrong.