Skip to content

Commit

Permalink
Merge pull request #21 from Worklytics/rc-v0.4.41
Browse files Browse the repository at this point in the history
update to release v0.4.41
  • Loading branch information
eschultink authored Nov 28, 2023
2 parents e412748 + e2e41db commit 4c047d0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 12 deletions.
30 changes: 25 additions & 5 deletions check-prereqs
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,51 @@ if ! terraform -v &> /dev/null ; then
exit 1
fi

# Check Maven installation

if ! mvn -v &> /dev/null ; then
printf "${RED}Maven not installed.${NC} See https://maven.apache.org/install.html\n"
if $HOMEBREW_AVAILABLE; then printf " or, as you have Homebrew available, run ${BLUE}brew install maven${NC}\n"; fi
exit 1
fi

MVN_VERSION=`mvn -v | grep "Apache Maven"`

MVN_VERSION=`mvn -v | grep "Apache Maven"`
MVN_VERSION_MAJOR_MINOR=$(echo $MVN_VERSION | sed -n 's/^Apache Maven \([0-9]*\.[0-9]*\).*$/\1/p')
printf "Your Maven version is ${BLUE}${MVN_VERSION}${NC}.\n"
printf "\t- if that is a version < 3.6, we recommend you upgrade. See https://maven.apache.org/install.html\n"
printf "\t- Maven is used to build the package that will be deployed to your host platform as an AWS lambda or a GCP Cloud Function\n"

if (( $(echo "$MVN_VERSION_MAJOR_MINOR < 3.6" | bc ) == 1 )); then
printf "${RED}This Maven version appears to be unsupported.${NC} Psoxy requires a supported version of Maven 3.6 or later.\n"
printf "We recommend you upgrade. See https://maven.apache.org/install.html\n"
printf "Maven is used to build the package that will be deployed to your host platform as an AWS lambda or a GCP Cloud Function\n"
fi

printf "\n"

# Check Java installation

JAVA_VERSION=`mvn -v | grep Java`
JAVA_VERSION_MAJOR=$(echo $JAVA_VERSION | sed -n 's/^Java version: \([0-9]*\).*/\1/p')

printf "Your Maven installation uses ${BLUE}${JAVA_VERSION}${NC}.\n"
printf "\t- if that is a Java version < 11, you must upgrade to 11. Java >= 11, <= 20 are supported.\n"
printf "\t- if you have a Java JDK of the right version installed on your machine *other* than the one referenced there, set your ${BLUE}JAVA_HOME${NC} to its location.\n"

if [[ "$JAVA_VERSION_MAJOR" != 11 && "$JAVA_VERSION_MAJOR" != 17 && "$JAVA_VERSION_MAJOR" != 21 ]]; then
printf "${RED}This Java version appears to be unsupported. You should upgrade it, or may have compile errors.${NC} Psoxy requires a supported version of Java 11 or later; as of Nov 2023, this includes Java 11, 17, or 21. See https://maven.apache.org/install.html\n"
if $HOMEBREW_AVAILABLE; then printf "or as you have Homebrew available, run ${BLUE}brew install openjdk@17${NC}\n"; fi
printf "If you have an alternative JDK installed, then you must update your ${BLUE}JAVA_HOME${NC} environment variable to point to it.\n"
fi

printf "\n"

# Check NPM installation

if ! npm -v &> /dev/null ; then
printf "${RED}Node Package Manager (npm) is not installed and is required for some testing to work.${NC} See https://nodejs.org/\n"
if $HOMEBREW_AVAILABLE; then printf " or, as you have Homebrew available, run ${BLUE}brew install node${NC}\n"; fi
fi


# Check AWS installation
AWSCLI_REASON="It is used if you're deploying to AWS."
if ! aws --version &> /dev/null ; then
printf "${RED}AWS CLI is not installed.${NC} ${AWSCLI_REASON} See https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html\n"
Expand All @@ -61,6 +79,7 @@ fi

printf "\n"

# Check GCloud CLI installation
GCLOUD_REASON="It is used if you're deploying to GCP or using Google Workspace data sources."
if ! gcloud --version &> /dev/null ; then
printf "${RED}Google Cloud SDK is not installed.${NC} ${GCLOUD_REASON} See https://cloud.google.com/sdk/docs/install\n"
Expand All @@ -72,6 +91,7 @@ fi

printf "\n"

# Check Azure CLI installation
AZCLI_REASON="It is used if you're deploying to Azure or using Microsoft 365 data sources."
if ! az --version &> /dev/null ; then
printf "${RED}Azure CLI is not installed.${NC} ${AZCLI_REASON} See https://docs.microsoft.com/en-us/cli/azure/install-azure-cli\n"
Expand Down
2 changes: 1 addition & 1 deletion google-workspace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "google" {


module "worklytics_connectors_google_workspace" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.4.40"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.4.41"

providers = {
google = google.google_workspace
Expand Down
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ locals {
# be provisioned via Terraform, so doesn't add any dependencies
# call this 'generic_source_connectors'?
module "worklytics_connectors" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.4.40"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.4.41"


enabled_connectors = var.enabled_connectors
jira_cloud_id = var.jira_cloud_id
jira_server_url = var.jira_server_url
jira_example_issue_id = var.jira_example_issue_id
salesforce_domain = var.salesforce_domain
github_api_host = var.github_api_host
github_installation_id = var.github_installation_id
github_organization = var.github_organization
github_example_repository = var.github_example_repository
Expand Down Expand Up @@ -74,7 +75,7 @@ locals {
}

module "psoxy" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/gcp-host?ref=v0.4.40"
source = "git::https://github.com/worklytics/psoxy//infra/modules/gcp-host?ref=v0.4.41"

gcp_project_id = var.gcp_project_id
environment_name = var.environment_name
Expand Down Expand Up @@ -112,7 +113,7 @@ locals {
module "connection_in_worklytics" {
for_each = local.all_instances

source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-generic?ref=v0.4.40"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-generic?ref=v0.4.41"

psoxy_host_platform_id = local.host_platform_id
psoxy_instance_id = each.key
Expand Down Expand Up @@ -164,4 +165,4 @@ output "todos_3" {
# description = "Value used to salt pseudonyms (SHA-256) hashes. If migrate to new deployment, you should copy this value."
# value = module.psoxy.pseudonym_salt
# sensitive = true
#}
#}
6 changes: 6 additions & 0 deletions misc-data-source-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ variable "jira_example_issue_id" {
description = "If using Jira Server/Cloud connector, provide id of an issue for only to be used as part of example calls for Jira (ex: ETV-12)"
}

variable "github_api_host" {
type = string
default = null
description = "(Only required if using Github connector for on premises) Host of the Github instance (ex: github.mycompany.com)."
}

variable "github_installation_id" {
type = string
default = null
Expand Down
4 changes: 2 additions & 2 deletions msft-365.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BEGIN MSFT

module "worklytics_connectors_msft_365" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-msft-365?ref=rc-v0.4.40"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-msft-365?ref=v0.4.41"


enabled_connectors = var.enabled_connectors
Expand All @@ -25,7 +25,7 @@ locals {
module "msft-connection-auth-federation" {
for_each = module.worklytics_connectors_msft_365.enabled_api_connectors

source = "git::https://github.com/worklytics/psoxy//infra/modules/azuread-federated-credentials?ref=v0.4.40"
source = "git::https://github.com/worklytics/psoxy//infra/modules/azuread-federated-credentials?ref=v0.4.41"

application_object_id = each.value.connector.id
display_name = "GcpFederation"
Expand Down

0 comments on commit 4c047d0

Please sign in to comment.