<commit_before>box: golang
build:
  steps:
    - setup-go-workspace

    # Gets the dependencies
    - script:
        name: go get
        code: |
          cd $WERCKER_SOURCE_DIR
          go version
          go get github.com/Masterminds/glide
          export PATH=$WERCKER_SOURCE_DIR/bin:$PATH
          glide --version
          glide install

    - script:
        name: generate fixture test plugins
        code: |
          rm pluginlib/registry/fixtures/cloudconfig/.keep
          rm pluginlib/registry/fixtures/product/.keep
          GOOS=linux ./createRegistryFixturePlugin

    # Test the project
    - script:
        name: go test
        code: |
          go test $(glide novendor) -v -cover -race

    - script:
        name: set release id variable for version
        code: |
          go get github.com/xchapter7x/versioning
          export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning bump_patch`

    - script:
        name: compile for all platforms
        code: |
          GOOS=darwin go build -o omg-osx -ldflags "-X main.Version=${WERCKER_GITHUB_CREATE_RELEASE_ID}-`git rev-parse HEAD | cut -c1-6`" main.go bosh-init-wrapper.go
          GOOS=linux go build -o omg-linux -ldflags "-X main.Version=${WERCKER_GITHUB_CREATE_RELEASE_ID}-`git rev-parse HEAD | cut -c1-6`" main.go bosh-init-wrapper.go

    - script:
        name: compile built in cloud config plugins
        code: |
          GOOS=darwin go build -o aws-cloudconfigplugin-osx ./plugins/cloudconfigs/aws/main.go
          GOOS=linux go build -o aws-cloudconfigplugin-linux ./plugins/cloudconfigs/aws/main.go

    - script:
        name: compile built in product plugins
        code: |
          GOOS=darwin go build -o concourse-plugin-osx ./plugins/products/concourse/cmd/concourse-plugin/main.go
          GOOS=linux go build -o concourse-plugin-linux ./plugins/products/concourse/cmd/concourse-plugin/main.go

    - script:
        name: add repo to artifact
        code: |
          cp -R ./ ${WERCKER_OUTPUT_DIR}

publish-release:
  steps:
    - setup-go-workspace
    - script:
        name: install-packages
        code: |
          sudo apt-get install -y openssh-client wget
          ls -la
          pwd
          echo ${WERCKER_OUTPUT_DIR}
          ls -la ${WERCKER_OUTPUT_DIR}

    - wercker/add-ssh-key@1.0.2:
        keyname: PCF_GITHUB_KEY

    - wercker/add-to-known_hosts@1.4.0:
        hostname: github.com
        fingerprint: fd00:a516:7c1b:17cd:6d81:2137:bd2a:2c5b:63:1b:56:4d:eb:df:a6:48

    - script:
        name: set release id variable for version
        code: |
          go get github.com/xchapter7x/versioning
          export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning ${VERSION_COMMAND}`

    - github-create-release:
        token: $GITHUB_TOKEN
        tag: $WERCKER_GITHUB_CREATE_RELEASE_ID
        title: omg-cli $WERCKER_GITHUB_CREATE_RELEASE_ID
        draft: false 
        prerelease: ${IS_PRE_RELEASE} 

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-osx
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

deploy-pre-release:
  steps:
    - setup-go-workspace
    - script:
        name: install-packages
        code: |
          sudo apt-get install -y openssh-client wget
          ls -la
          pwd
          echo ${WERCKER_OUTPUT_DIR}
          ls -la ${WERCKER_OUTPUT_DIR}

    - wercker/add-ssh-key@1.0.2:
        keyname: PCF_GITHUB_KEY

    - wercker/add-to-known_hosts@1.4.0:
        hostname: github.com
        fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48

    - script:
        name: set release id variable for version
        code: |
          go get github.com/xchapter7x/versioning
          export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning bump_patch`-`git rev-parse HEAD | cut -c1-6`

    - github-create-release:
        token: $GITHUB_TOKEN
        tag: $WERCKER_GITHUB_CREATE_RELEASE_ID
        title: omg-cli $WERCKER_GITHUB_CREATE_RELEASE_ID
        draft: true 
        prerelease: ${IS_PRE_RELEASE} 

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip<commit_msg>[#121358431] adding vault to release<commit_after>box: golang
build:
  steps:
    - setup-go-workspace

    # Gets the dependencies
    - script:
        name: go get
        code: |
          cd $WERCKER_SOURCE_DIR
          go version
          go get github.com/Masterminds/glide
          export PATH=$WERCKER_SOURCE_DIR/bin:$PATH
          glide --version
          glide install

    - script:
        name: generate fixture test plugins
        code: |
          rm pluginlib/registry/fixtures/cloudconfig/.keep
          rm pluginlib/registry/fixtures/product/.keep
          GOOS=linux ./createRegistryFixturePlugin

    # Test the project
    - script:
        name: go test
        code: |
          go test $(glide novendor) -v -cover -race

    - script:
        name: set release id variable for version
        code: |
          go get github.com/xchapter7x/versioning
          export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning bump_patch`

    - script:
        name: compile for all platforms
        code: |
          GOOS=darwin go build -o omg-osx -ldflags "-X main.Version=${WERCKER_GITHUB_CREATE_RELEASE_ID}-`git rev-parse HEAD | cut -c1-6`" main.go bosh-init-wrapper.go
          GOOS=linux go build -o omg-linux -ldflags "-X main.Version=${WERCKER_GITHUB_CREATE_RELEASE_ID}-`git rev-parse HEAD | cut -c1-6`" main.go bosh-init-wrapper.go

    - script:
        name: compile built in cloud config plugins
        code: |
          GOOS=darwin go build -o aws-cloudconfigplugin-osx ./plugins/cloudconfigs/aws/main.go
          GOOS=linux go build -o aws-cloudconfigplugin-linux ./plugins/cloudconfigs/aws/main.go

    - script:
        name: compile built in product plugins
        code: |
          GOOS=darwin go build -o concourse-plugin-osx ./plugins/products/concourse/cmd/concourse-plugin/main.go
          GOOS=linux go build -o concourse-plugin-linux ./plugins/products/concourse/cmd/concourse-plugin/main.go
          GOOS=darwin go build -o vault-plugin-osx ./plugins/products/vault/cmd/vault/main.go
          GOOS=linux go build -o vault-plugin-linux ./plugins/products/vault/cmd/vault/main.go

    - script:
        name: add repo to artifact
        code: |
          cp -R ./ ${WERCKER_OUTPUT_DIR}

publish-release:
  steps:
    - setup-go-workspace
    - script:
        name: install-packages
        code: |
          sudo apt-get install -y openssh-client wget
          ls -la
          pwd
          echo ${WERCKER_OUTPUT_DIR}
          ls -la ${WERCKER_OUTPUT_DIR}

    - wercker/add-ssh-key@1.0.2:
        keyname: PCF_GITHUB_KEY

    - wercker/add-to-known_hosts@1.4.0:
        hostname: github.com
        fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48

    - script:
        name: set release id variable for version
        code: |
          go get github.com/xchapter7x/versioning
          export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning ${VERSION_COMMAND}`

    - github-create-release:
        token: $GITHUB_TOKEN
        tag: $WERCKER_GITHUB_CREATE_RELEASE_ID
        title: omg-cli $WERCKER_GITHUB_CREATE_RELEASE_ID
        draft: false 
        prerelease: ${IS_PRE_RELEASE} 

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-osx
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: vault-plugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: vault-plugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

deploy-pre-release:
  steps:
    - setup-go-workspace
    - script:
        name: install-packages
        code: |
          sudo apt-get install -y openssh-client wget
          ls -la
          pwd
          echo ${WERCKER_OUTPUT_DIR}
          ls -la ${WERCKER_OUTPUT_DIR}

    - wercker/add-ssh-key@1.0.2:
        keyname: PCF_GITHUB_KEY

    - wercker/add-to-known_hosts@1.4.0:
        hostname: github.com
        fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48

    - script:
        name: set release id variable for version
        code: |
          go get github.com/xchapter7x/versioning
          export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning bump_patch`-`git rev-parse HEAD | cut -c1-6`

    - github-create-release:
        token: $GITHUB_TOKEN
        tag: $WERCKER_GITHUB_CREATE_RELEASE_ID
        title: omg-cli $WERCKER_GITHUB_CREATE_RELEASE_ID
        draft: true 
        prerelease: ${IS_PRE_RELEASE} 

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: omg-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: aws-cloudconfigplugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: concourse-plugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: vault-plugin-linux 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip

    - github-upload-asset:
        token: $GITHUB_TOKEN
        file: vault-plugin-osx 
        release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
        content-type: application/x-gzip
{'fraction_non_alphanumeric': 0.08865838885523925, 'fraction_numerical': 0.01075105996365839, 'mean_word_length': 2.2021818181818182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6759278', 'n_tokens_mistral': 4619, 'n_tokens_neox': 4441, 'n_words': 809}