@docupace/pipeline 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/auth0/configure.js +8 -8
- package/terraform/plan.sh +50 -0
package/package.json
CHANGED
package/src/auth0/configure.js
CHANGED
|
@@ -164,28 +164,28 @@ async function templateAuth0(siteUrl, coreApiContext, env, filePaths, deployUI,
|
|
|
164
164
|
|
|
165
165
|
// Configure URLs based on environment
|
|
166
166
|
if (env === 'prd') {
|
|
167
|
-
uiAllowedCallbacksUrls = [
|
|
168
|
-
uiAllowedLogoutUrls = [
|
|
167
|
+
uiAllowedCallbacksUrls = [`${siteUrl}/api/auth/callback`];
|
|
168
|
+
uiAllowedLogoutUrls = [`${siteUrl}`];
|
|
169
169
|
|
|
170
|
-
graphqlAllowedCallbacksUrls = [
|
|
171
|
-
graphqlAllowedLogoutUrls = [
|
|
170
|
+
graphqlAllowedCallbacksUrls = [`${siteUrl}/api/graphql/callback`];
|
|
171
|
+
graphqlAllowedLogoutUrls = [`${siteUrl}/api/graphql/`];
|
|
172
172
|
} else {
|
|
173
173
|
uiAllowedCallbacksUrls = [
|
|
174
|
-
|
|
174
|
+
`${siteUrl}/api/auth/callback`,
|
|
175
175
|
`http://localhost:3000/api/auth/callback`,
|
|
176
176
|
];
|
|
177
177
|
uiAllowedLogoutUrls = [
|
|
178
|
-
|
|
178
|
+
`${siteUrl}`,
|
|
179
179
|
`http://localhost:3000`,
|
|
180
180
|
];
|
|
181
181
|
|
|
182
182
|
graphqlAllowedCallbacksUrls = [
|
|
183
|
-
|
|
183
|
+
`${siteUrl}/api/graphql/callback`,
|
|
184
184
|
`http://localhost:4000/api/graphql/callback`,
|
|
185
185
|
];
|
|
186
186
|
graphqlAllowedLogoutUrls = [
|
|
187
187
|
`http://localhost:4000/api/graphql/`,
|
|
188
|
-
|
|
188
|
+
`${siteUrl}/api/graphql/`,
|
|
189
189
|
];
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
PROJECT=$1
|
|
5
|
+
CURRENT_ENVIRONMENT=$2
|
|
6
|
+
|
|
7
|
+
if [[ -z "$PROJECT" ]]; then
|
|
8
|
+
echo "Error: Project name is required."
|
|
9
|
+
echo "Usage: $0 <project-name> $1 <environment>"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
if [[ -z "$CURRENT_ENVIRONMENT" ]]; then
|
|
14
|
+
echo "Error: ENVIRONMENT is required."
|
|
15
|
+
echo "Usage: $0 <project-name> $1 <environment>"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
export ROLE_NAME="atlassian-bitbucket-pipelines-runner-eks-role"
|
|
20
|
+
export SESSION_NAME="EKSAdminSession"
|
|
21
|
+
export EKS_CLUSTER_NAME="connect-next-${CURRENT_ENVIRONMENT}-eks-cluster"
|
|
22
|
+
export ROLE_ARN="arn:aws:iam::$(aws sts get-caller-identity | jq -r '.Account'):role/$ROLE_NAME"
|
|
23
|
+
export ASSUME_ROLE_OUTPUT=$(aws sts assume-role --role-arn $ROLE_ARN --role-session-name $SESSION_NAME)
|
|
24
|
+
export AWS_ACCESS_KEY_ID=$(echo $ASSUME_ROLE_OUTPUT | jq -r '.Credentials.AccessKeyId')
|
|
25
|
+
export AWS_SECRET_ACCESS_KEY=$(echo $ASSUME_ROLE_OUTPUT | jq -r '.Credentials.SecretAccessKey')
|
|
26
|
+
export AWS_SESSION_TOKEN=$(echo $ASSUME_ROLE_OUTPUT | jq -r '.Credentials.SessionToken')
|
|
27
|
+
|
|
28
|
+
aws sts get-caller-identity
|
|
29
|
+
cd "$BITBUCKET_CLONE_DIR/${PROJECT}"
|
|
30
|
+
mkdir -p ~/.ssh
|
|
31
|
+
|
|
32
|
+
echo "$atlassian_workspace_runner_ssh_key" | base64 -d > ~/.ssh/id_ed25519
|
|
33
|
+
chmod 600 ~/.ssh/id_ed25519
|
|
34
|
+
ssh-keyscan bitbucket.org > ~/.ssh/known_hosts
|
|
35
|
+
|
|
36
|
+
terraform init -backend-config=./env/${CURRENT_ENVIRONMENT}/us-west-2/backend.tfvars --reconfigure
|
|
37
|
+
|
|
38
|
+
if [[ "$PROJECT" == "bb-build-agent-shell" ]]; then
|
|
39
|
+
if [[ "$CURRENT_ENVIRONMENT" == "dev" ]]; then
|
|
40
|
+
echo "$dev_build_agent_configuration" | base64 -d > ./env/${CURRENT_ENVIRONMENT}/us-west-2/build_agent_configuration.tfvars.json
|
|
41
|
+
elif [[ "$CURRENT_ENVIRONMENT" == "qa" ]]; then
|
|
42
|
+
echo "$qa_build_agent_configuration" | base64 -d > ./env/${CURRENT_ENVIRONMENT}/us-west-2/build_agent_configuration.tfvars.json
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" \
|
|
46
|
+
-var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/build_agent_configuration.tfvars.json" \
|
|
47
|
+
-out .plan
|
|
48
|
+
else
|
|
49
|
+
terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" -out .plan
|
|
50
|
+
fi
|