Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM nginx

COPY . /usr/share/nginx/html

EXPOSE 80
12 changes: 12 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "registry.hub.docker.com/chandradeoarya/dojo-jump:latest"
},
"Ports": [
{
"ContainerPort": 80
}
]
}

38 changes: 38 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
pipeline {
agent any

enviroment {
DOCKERHUB_CERDENTIALS=credentials('chandra-dockerhub')

}

stages {
stage('Build'){

steps {
sh 'docker build -t chandradeoarya/dojo-jump:leatest .'
}
}

stage('Login'){

steps {
sh 'echo $DOCKERHUB_CREDENTALS_PWS | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin'
}
}

stage('Push') {

steps {
sh 'docker push chandradeoarya/dojo-jump:latest'
}
}
}

post {
always {
sh 'docker logout'
}
}

}
53 changes: 53 additions & 0 deletions Jenkinsfile-EBS3
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
pipeline {

agent any

environment {
DOCKERHUB_CREDENTIALS=credentials('chandra-dockerhub')
AWS_ACCESS_KEY_ID = credentials('jenkins-aws-secret-key-id')
AWS_SECRET_ACCESS_KEY = credentials('jenkins-aws-secret-access-key')
ARTIFACT_NAME = 'Dockerrun.aws.json'
AWS_S3_BUCKET = 'online-dojojump-docker-cicd'
AWS_EB_APP_NAME = 'online-dojojump-cicd'
AWS_EB_ENVIRONMENT_NAME = 'Onlinedojojumpcicd-env'
AWS_EB_APP_VERSION = "${BUILD_ID}"
}

stages {

stage('Build') {

steps {
sh 'docker build -t chandradeoarya/dojo-jump:latest .'
}
}

stage('Login') {

steps {
sh 'echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin'
}
}

stage('Push') {

steps {
sh 'docker push chandradeoarya/dojo-jump:latest'
}
}

stage('Deploy') {
steps {
sh 'aws configure set region us-east-1 '
sh 'aws elasticbeanstalk create-application-version --application-name $AWS_EB_APP_NAME --version-label $AWS_EB_APP_VERSION --source-bundle S3Bucket=$AWS_S3_BUCKET,S3Key=$ARTIFACT_NAME'
sh 'aws elasticbeanstalk update-environment --application-name $AWS_EB_APP_NAME --environment-name $AWS_EB_ENVIRONMENT_NAME --version-label $AWS_EB_APP_VERSION'
}
}
}
post {
always {
sh 'docker logout'
}
}

}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


<h3 align="center">
Dojo Jump
Dojo Jumping Game
</h3>
<p align="center">
<a href="http://a639835ca735246ee841e2aecde1701c-1023464538.us-west-1.elb.amazonaws.com/">
Expand Down
4 changes: 4 additions & 0 deletions forbidden.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h2>Open in https by clicking here </h2>
<a href="https://ds6ibjhqyw38e.cloudfront.net/">click here</a>

<h2> Only saudi people can play this game</h2>