-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkins_Octo
33 lines (24 loc) · 1.36 KB
/
Jenkins_Octo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
node {
def app
stage('Clone repository') {
checkout scm
}
stage('Build image') {
/* Referencing the image name in AWS */
app = docker.build("underwater-octo")
}
stage('Test image') {
/* Empty for test purposes */
}
stage('Push image') {
/* Referencing the AWS registry. Tagging with the Jenkins build number and the latest tag */
docker.withRegistry('https://720766170633.dkr.ecr.us-east-2.amazonaws.com', 'ecr:us-east-2:aws-credentials') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
stage('Create and Deploy Release') {
octopusCreateRelease additionalArgs: '', cancelOnTimeout: false, channel: '', defaultPackageVersion: '', deployThisRelease: false, deploymentTimeout: '', environment: "Production", jenkinsUrlLinkback: false, project: "underwater-octo", releaseNotes: false, releaseNotesFile: '', releaseVersion: "1.0.${BUILD_NUMBER}", tenant: '', tenantTag: '', toolId: 'Default', verboseLogging: false, waitForDeployment: false
octopusDeployRelease cancelOnTimeout: false, deploymentTimeout: '', environment: "Production", project: "underwater-octo", releaseVersion: "1.0.${BUILD_NUMBER}", tenant: '', tenantTag: '', toolId: 'Default', variables: '', verboseLogging: false, waitForDeployment: true
}
}