@@ -64,6 +64,10 @@ stages:
64
64
- export OSSRH_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_username --with-decryption --query "Parameter.Value" --out text)
65
65
- export OSSRH_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_password --with-decryption --query "Parameter.Value" --out text)
66
66
- export GPG_PUBLIC_FINGERPRINT=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_public_key --with-decryption --query "Parameter.Value" --out text | gpg --import --import-options show-only | grep -E -o -e "[A-F0-9]{40}")
67
+ set-github-installation-token :
68
+ - export GITHUB_APP_CLIENT_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_client_id --with-decryption --query "Parameter.Value" --out text)
69
+ - export GITHUB_APP_INSTALLATION_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_installation_id --with-decryption --query "Parameter.Value" --out text)
70
+ - export GITHUB_TOKEN=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_private_key --with-decryption --query "Parameter.Value" --out text | bash ./create_github_installation_token.sh "$GITHUB_APP_CLIENT_ID" "$GITHUB_APP_INSTALLATION_ID")
67
71
68
72
# CI IMAGE
69
73
@@ -970,33 +974,15 @@ notify:publish-release-failure:
970
974
- ' MESSAGE_TEXT=":status_alert: $CI_PROJECT_NAME $CI_COMMIT_TAG publish pipeline <$BUILD_URL|$COMMIT_MESSAGE> failed."'
971
975
- postmessage "#mobile-sdk-ops" "$MESSAGE_TEXT"
972
976
973
- notify:prepare-github-token :
974
- tags : [ "arch:amd64" ]
975
- only :
976
- - tags
977
- image : $CI_IMAGE_DOCKER
978
- stage : notify
979
- when : on_success
980
- script :
981
- - aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_private_key --with-decryption --query "Parameter.Value" --out text >> ./gh_private_key.pem
982
- - export GITHUB_APP_CLIENT_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_client_id --with-decryption --query "Parameter.Value" --out text)
983
- - export GITHUB_APP_INSTALLATION_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gh_app_installation_id --with-decryption --query "Parameter.Value" --out text)
984
- - echo "GITHUB_TOKEN=$(bash ./create_github_installation_token.sh)" >> github.env
985
- artifacts :
986
- reports :
987
- dotenv : github.env
988
- access : none
989
-
990
977
notify:dogfood-app :
991
978
tags : [ "arch:amd64" ]
992
979
only :
993
980
- tags
994
981
image : $CI_IMAGE_DOCKER
995
982
stage : notify
996
983
when : on_success
997
- needs :
998
- - notify:prepare-github-token
999
984
script :
985
+ - !reference [ .snippets, set-github-installation-token ]
1000
986
- pip3 install GitPython requests
1001
987
- python3 dogfood.py -v $CI_COMMIT_TAG -t app
1002
988
@@ -1007,9 +993,8 @@ notify:dogfood-demo:
1007
993
image : $CI_IMAGE_DOCKER
1008
994
stage : notify
1009
995
when : on_success
1010
- needs :
1011
- - notify:prepare-github-token
1012
996
script :
997
+ - !reference [ .snippets, set-github-installation-token ]
1013
998
- pip3 install GitPython requests
1014
999
- python3 dogfood.py -v $CI_COMMIT_TAG -t demo
1015
1000
@@ -1021,6 +1006,7 @@ notify:dogfood-gradle-plugin:
1021
1006
stage : notify
1022
1007
when : on_success
1023
1008
script :
1009
+ - !reference [ .snippets, set-github-installation-token ]
1024
1010
- pip3 install GitPython requests
1025
1011
- python3 dogfood.py -v $CI_COMMIT_TAG -t gradle-plugin
1026
1012
0 commit comments