forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of building the helper images (cassandra, redis, postgres, selenium) in the main canvas-lms build, move the images to be built in a separate Jenkins build to prevent accidental overwriting. refs DE-196 flag = none Test plan: - Ensure cassandra image is built and pushed to starlord - Ensure redis image is built and pushed to starlord - Ensure dynamodb image is built and pushed to starlord - Ensure postgres image is built and pushed to starlord - Ensure Jenkins build passes with the images created by the helpers - Ensure Jenkins build passess with the original Jenkinsfile Change-Id: I1be5f4d0ff5fa28a0c3ec01e209f54379f58c173 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246802 Reviewed-by: Aaron Ogata <[email protected]> Reviewed-by: James Butters <[email protected]> QA-Review: Andrea Cirulli <[email protected]> Tested-by: Service Cloud Jenkins <[email protected]> Product-Review: James Butters <[email protected]>
- Loading branch information
Showing
5 changed files
with
227 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env groovy | ||
|
||
/* | ||
* Copyright (C) 2020 - present Instructure, Inc. | ||
* | ||
* This file is part of Canvas. | ||
* | ||
* Canvas is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, version 3 of the License. | ||
* | ||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
pipeline { | ||
agent { label 'canvas-docker' } | ||
options { | ||
ansiColor('xterm') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage ('Parameters Check') { | ||
steps { | ||
script { | ||
if (!params.TARGET) { | ||
currentBuild.result = 'ABORTED' | ||
error('TARGET parameter must be specified.') | ||
} | ||
} | ||
} | ||
} | ||
stage('Build Cassandra Image') { | ||
steps { | ||
script { | ||
sh "docker build -f build/docker-compose/cassandra/Dockerfile.cachable -t $TARGET build/docker-compose/cassandra" | ||
} | ||
} | ||
} | ||
stage('Push Cassandra Image') { | ||
steps { | ||
script { | ||
sh "./build/new-jenkins/docker-with-flakey-network-protection.sh push $TARGET" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env groovy | ||
|
||
/* | ||
* Copyright (C) 2020 - present Instructure, Inc. | ||
* | ||
* This file is part of Canvas. | ||
* | ||
* Canvas is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, version 3 of the License. | ||
* | ||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
pipeline { | ||
agent { label 'canvas-docker' } | ||
options { | ||
ansiColor('xterm') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage ('Parameters Check') { | ||
steps { | ||
script { | ||
if (!params.TARGET) { | ||
currentBuild.result = 'ABORTED' | ||
error('TARGET parameter must be specified.') | ||
} | ||
} | ||
} | ||
} | ||
stage('Build DynamoDB Image') { | ||
steps { | ||
script { | ||
sh "docker build -t $TARGET build/docker-compose/dynamodb" | ||
} | ||
} | ||
} | ||
stage('Push DynamoDB Image') { | ||
steps { | ||
script { | ||
sh "./build/new-jenkins/docker-with-flakey-network-protection.sh push $TARGET" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env groovy | ||
|
||
/* | ||
* Copyright (C) 2020 - present Instructure, Inc. | ||
* | ||
* This file is part of Canvas. | ||
* | ||
* Canvas is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, version 3 of the License. | ||
* | ||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
pipeline { | ||
agent { label 'canvas-docker' } | ||
options { | ||
ansiColor('xterm') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage ('Parameters Check') { | ||
steps { | ||
script { | ||
if (!params.TARGET || !params.POSTGRES) { | ||
currentBuild.result = 'ABORTED' | ||
error('TARGET and POSTGRES parameters must be specified.') | ||
} | ||
} | ||
} | ||
} | ||
stage('Build Postgres Image') { | ||
steps { | ||
script { | ||
sh "docker build -t $TARGET --build-arg POSTGRES=\"$POSTGRES\" docker-compose/postgres" | ||
} | ||
} | ||
} | ||
stage('Push Postgres Image') { | ||
steps { | ||
script { | ||
sh "./build/new-jenkins/docker-with-flakey-network-protection.sh push $TARGET" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/usr/bin/env groovy | ||
|
||
/* | ||
* Copyright (C) 2020 - present Instructure, Inc. | ||
* | ||
* This file is part of Canvas. | ||
* | ||
* Canvas is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU Affero General Public License as published by the Free | ||
* Software Foundation, version 3 of the License. | ||
* | ||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
pipeline { | ||
agent { label 'canvas-docker' } | ||
options { | ||
ansiColor('xterm') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage ('Parameters Check') { | ||
steps { | ||
script { | ||
if (!params.TARGET) { | ||
currentBuild.result = 'ABORTED' | ||
error('TARGET parameter must be specified.') | ||
} | ||
} | ||
} | ||
} | ||
stage('Pull Redis Image') { | ||
steps { | ||
script { | ||
sh "./build/new-jenkins/docker-with-flakey-network-protection.sh pull redis:alpine" | ||
} | ||
} | ||
} | ||
stage('Tag Redis Image') { | ||
steps { | ||
script { | ||
sh "docker tag redis:alpine $TARGET" | ||
} | ||
} | ||
} | ||
stage('Push Redis Image') { | ||
steps { | ||
script { | ||
sh "./build/new-jenkins/docker-with-flakey-network-protection.sh push $TARGET" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters