Last active
July 12, 2018 12:49
-
-
Save daharon/4bc8da8f3f02d8d5628ec079542fea00 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ECS_REPO_NAME = 'jenkins-docker-test' | |
ECS_TASK_DEF = 'jenkins-docker-test' | |
ECS_SERVICE = 'jenkins-docker-test-http-v3' | |
REGIONS = [ 'us-east-1' ] | |
node { | |
stage('Test') { | |
build( | |
job: 'Node 8 Test', | |
parameters: [ | |
string(name: 'REPOSITORY', value: "${REPOSITORY}"), | |
string(name: 'COMMIT_SHA1', value: "${COMMIT_SHA1}") | |
] | |
) | |
} | |
stage('Build') { | |
build( | |
job: '/Docker/Build and Push to AWS ECR', | |
parameters: [ | |
string(name: 'REPOSITORY', value: "${REPOSITORY}"), | |
string(name: 'COMMIT_SHA1', value: "${COMMIT_SHA1}"), | |
string(name: 'ECS_REPO_NAME', value: ECS_REPO_NAME), | |
string(name: 'DOCKER_BUILD_ARGS', value: '') | |
] | |
) | |
} | |
stage('Register Revision') { | |
build( | |
job: '/ECS/Register Task Definition Revision', | |
parameters: [ | |
string(name: 'REPOSITORY', value: "${REPOSITORY}"), | |
string(name: 'COMMIT_SHA1', value: "${COMMIT_SHA1}"), | |
string(name: 'TASK_DEFINITION_NAME', value: "${ECS_TASK_DEF}"), | |
string(name: 'DOCKERFILE_DIR', value: '.') | |
] | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment