-
Create file
secret.tfvar
:YA_TOKEN="<0Auth-Token>" YA_CLOUD="<Yandex-Cloud-Name>" YA_FOLDER="<Yandex-Cloud-Folder-ID>" YA_SUBNET="<Yandex-Cloud-Subnet-ID>" YA_USER="<user-name>" YA_KEY_FOLDER="<some-folder>"
-
Create VM with Jenkins using
jenkins-vm.tf
:terraform init terraform apply -var-file secret.tfvar -auto-approve
-
Login into Jenkins using URL and password from terraform logs
-
Install recommended plugins + Docker plugin + Docker Pipeline plugin
-
Add
ya-cloud-cred
Jenkins creds with usernameoauth
and yandex cloud token as a password -
Create Jenkins Pipeline with
jenkins-pipelines/Jenkinsfile
-
Approve signatures:
method java.util.Properties load java.io.InputStream method org.jenkinsci.plugins.workflow.support.actions.EnvironmentAction getEnvironment new java.io.File java.lang.String new java.util.Properties staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods newDataInputStream java.io.File
-
Run Pipeline