Skip to content

Latest commit

 

History

History
64 lines (60 loc) · 1.62 KB

HELP.md

File metadata and controls

64 lines (60 loc) · 1.62 KB

Building Spring Boot + AngularJS App

npm install --save-dev rimraf
npm install --save-dev mkdirp
npm install --save-dev copyfiles
mvn clean && npm --prefix src/main/frontend run build && mvn package
pipeline {
   agent any
   stages {
      stage('Staging') {
         steps {
//https://issues.jenkins-ci.org/browse/JENKINS-57269             
            script {
                def remote = [:]
                remote.name = 'staging'
                remote.user = 'vagrant'
                remote.allowAnyHosts = true
                remote.host = 'staging.devops'
                remote.identityFile = '~/.ssh/staging.key'
                sshCommand remote: remote, command: "docker --version"
            }
            echo 'Hello World'
            sh '''
                node --version
            '''
         }
      }
      stage('Production') {
         steps {
            script {
                def remote = [:]
                remote.name = 'production'
                remote.user = 'vagrant'
                remote.allowAnyHosts = true
                remote.host = 'production.devops'
                remote.identityFile = '~/.ssh/production.key'
                sshCommand remote: remote, command: "docker --version"
            }
            echo 'Hello World'
            sh '''
                node --version
            '''
         }
      }   
   }
}
 curl -X GET -H "X-Vault-Token:$VAULT_TOKEN" http://127.0.0.1:8200/v1/kv/mysql/root | jq -r '.data.root'
vault status
cat /etc/vault/rootkey | vault login -
vault policy list
vault token create -policy=mysql_db