<commit_before>import jetbrains.buildServer.configs.kotlin.v2018_2.*
import jetbrains.buildServer.configs.kotlin.v2018_2.BuildType
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.ScriptBuildStep
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2018_2.triggers.vcs

version = "2019.1"

project {
    params {
        param("teamcity.ui.settings.readOnly", "true")
    }

    sequence {
        build(Build)
        build(DeployUat)
        build(DeployProduction)
    }
}


object Build : BuildType({
    name = "Build"

    steps {
        step {
            name = "Install Node JS"
            type = "jonnyzzz.nvm"
            param("version", "10.16.3")
        }
        script {
            name = "Restore Packages"
            scriptContent = "npm ci"
        }
        script {
            name = "Build"
            scriptContent = "npm run build"
        }
    }

    vcs {
        root(DslContext.settingsRoot.id!!)
        cleanCheckout = true
    }

    triggers {
        vcs {
            branchFilter = "+:*"
        }
    }
})

object DeployUat : BuildType({
    name = "Deploy to UAT"

    steps {
        script {
            name = "Run Terraform"
            scriptContent = "aws sts get-caller-identity"
        }
    }

    vcs {
        root(DslContext.settingsRoot.id!!)
        cleanCheckout = true
    }
})
<commit_msg>Upload Assets to S3 in TeamCity Build<commit_after>import jetbrains.buildServer.configs.kotlin.v2018_2.*
import jetbrains.buildServer.configs.kotlin.v2018_2.BuildType
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.ScriptBuildStep
import jetbrains.buildServer.configs.kotlin.v2018_2.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2018_2.triggers.vcs

version = "2019.1"

project {
    params {
        param("teamcity.ui.settings.readOnly", "true")
    }

    sequence {
        build(Build)
        build(DeployProduction)
    }
}


object Build : BuildType({
    name = "Build & Deploy JS to Test"

    steps {
        step {
            name = "Install Node JS"
            type = "jonnyzzz.nvm"
            param("version", "10.16.3")
        }
        script {
            name = "Restore Packages"
            scriptContent = "npm ci"
        }
        script {
            name = "Build"
            scriptContent = "npm run build"
        }
        script {
            name = "Install AWS CLI"
            scriptContent = """
                apt-update && apt install -y unzip  
                curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
                unzip awscli-bundle.zip
                ./awscli-bundle/install -b ~/bin/aws
            """.trim()
        }
        script {
            name = "Upload assets to S3"
            scriptContent = "~/bin/aws s3 sync dist s3://test-assets-us-west-2.waka.app"
        }
    }

    vcs {
        root(DslContext.settingsRoot.id!!)
        cleanCheckout = true
    }

    triggers {
        vcs {
            branchFilter = "+:*"
        }
    }
})

{'fraction_non_alphanumeric': 0.10824742268041238, 'fraction_numerical': 0.024484536082474227, 'mean_word_length': 1.76, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1319855', 'n_tokens_mistral': 1055, 'n_tokens_neox': 972, 'n_words': 174}