Skip to content

Commit

Permalink
Initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
include committed Dec 3, 2019
0 parents commit 78d8778
Show file tree
Hide file tree
Showing 5 changed files with 293 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM jenkins/jenkins:lts

ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
ENV JENKINS_SLAVE_AGENT_PORT 50001

USER jenkins
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt

VOLUME ["/var/jenkins_home"]

EXPOSE 8080
EXPOSE 50000
87 changes: 87 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
pipeline {
agent any
options {
timestamps()
ansiColor('xterm')
buildDiscarder(
logRotator(
artifactDaysToKeepStr: '9',
artifactNumToKeepStr: '5',
daysToKeepStr: '9',
numToKeepStr: '5'
)
)
}

environment {
workspace = pwd()
M0 = "static mimo"
}

stages {
stage('00') {
steps {
echo "### FETCH RUBY ###"
script {
sh(script:
"""
test -d .rbenv && cd .rbenv ; git pull || git clone https://github.com/rbenv/rbenv.git .rbenv
test -d .rbenv/plugins/ruby-build && cd .rbenv/plugins/ruby-build ; git pull || git clone https://github.com/rbenv/ruby-build.git .rbenv/plugins/ruby-build
""",
returnStdout: true).trim()
}
}
}
stage('01') {
steps {
echo "#### SETUP ENV ###"
script {
sh(script:
"""
echo 'export PATH=\"\$HOME/.rbenv/bin:\$PATH\"' >> .bash_profile
echo 'export PATH=\"\$HOME/.rbenv/plugins/ruby-build/bin:\$PATH\"' >> .bash_profile
echo 'eval \"\$(rbenv init -)\"' >> .bashrc
""", returnStdout: true).trim()
}
}
}
stage('02') {
steps {
echo "### COMPUTE ###"
script {
GOONE = sh(script: "echo FROM COMPUTE: [${env.M0}] XX", returnStdout: true).trim()
GOTWO = getstuff()
}
}
}
stage('03') {
steps {
echo "### USE ###"
script {
sh(script: "echo USE [${GOTWO}]", returnStdout: true).trim()
}
}
}
stage('04') {
steps {
echo "### MERGE ###"
script {
usestuff()
}
}
}
}
}

def getstuff() {
sh(script:
"""
echo \"[${env.workspace} ${GOONE}]\"
""", returnStdout: true).trim()
}


def usestuff() {
mikeyfunc = getstuff()
sh(script: "echo mimi [${mikeyfunc}] mimi", returnStdout: true).trim()
}
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
DOCKER_REGISTER ?= tarbase
DOCKER_TAG ?= latest

all: build run

build:
docker build -t $(DOCKER_REGISTER)/jenkins:$(DOCKER_TAG) .

run:
docker run \
-p 8080:8080 \
-p 50000:50000 \
-e HTTP_PROXY="$(HTTP_PROXY)" \
-e HTTPS_PROXY="$(HTTPS_PROXY)" \
-e AWS_ACCESS_KEY_ID="$(AWS_ACCESS_KEY_ID)" \
-e AWS_SECRET_ACCESS_KEY="$(AWS_SECRET_ACCESS_KEY)" \
-e AWS_REGION="$(AWS_REGION)" \
-v $(shell pwd)/var/jenkins_home \
$(DOCKER_REGISTER)/jenkins:$(DOCKER_TAG)

clean:
docker rmi -f $(shell docker images tarbase/jenkins -aq)
Empty file added README.md
Empty file.
171 changes: 171 additions & 0 deletions plugins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
ace-editor
active-directory
amazon-ecr
ansible
ansicolor
ant
antisamy-markup-formatter
any-buildstep
apache-httpcomponents-client-4-api
audit-trail
authentication-tokens
aws-credentials
aws-java-sdk
aws-sqs
blueocean
blueocean-autofavorite
blueocean-bitbucket-pipeline
blueocean-commons
blueocean-config
blueocean-core-js
blueocean-dashboard
blueocean-display-url
blueocean-events
blueocean-executor-info
blueocean-github-pipeline
blueocean-git-pipeline
blueocean-i18n
blueocean-jira
blueocean-jwt
blueocean-personalization
blueocean-pipeline-api-impl
blueocean-pipeline-editor
blueocean-pipeline-scm-api
blueocean-rest
blueocean-rest-impl
blueocean-web
bouncycastle-api
branch-api
build-timeout
build-user-vars-plugin
categorized-view
cloudbees-bitbucket-branch-source
cloudbees-folder
command-launcher
conditional-buildstep
copyartifact
credentials
credentials-binding
disk-usage
display-url-api
docker-commons
docker-workflow
durable-task
ec2
email-ext
envinject
envinject-api
external-monitor-job
favorite
flexible-publish
ghprb
git
git-changelog
git-client
github
github-api
github-branch-source
github-issues
github-oauth
github-organization-folder
github-pr-coverage-status
github-pullrequest
gitlab-merge-request-jenkins
gitlab-oauth
gitlab-plugin
git-server
google-login
gradle
gravatar
greenballs
handlebars
handy-uri-templates-2-api
htmlpublisher
icon-shim
jackson2-api
javadoc
jdk-tool
jenkins-design-language
jira
jobConfigHistory
job-restrictions
jquery
jquery-detached
jquery-ui
jsch
junit
kerberos-sso
label-linked-jobs
ldap
locale
lockable-resources
mailer
mapdb-api
matrix-auth
matrix-project
maven-plugin
mercurial
metrics
metrics-diskusage
momentjs
monitoring
nested-view
node-iterator-api
oauth-credentials
Office-365-Connector
oic-auth
openid
openid4java
openshift-login
pam-auth
parameterized-trigger
pipeline-build-step
pipeline-github-lib
pipeline-githubnotify-step
pipeline-graph-analysis
pipeline-input-step
pipeline-milestone-step
pipeline-model-api
pipeline-model-declarative-agent
pipeline-model-definition
pipeline-model-extensions
pipeline-rest-api
pipeline-stage-step
pipeline-stage-tags-metadata
pipeline-stage-view
pipeline-utility-steps
plain-credentials
plugin-usage-plugin
pubsub-light
rebuild
resource-disposer
role-strategy
run-condition
s3
scm-api
script-security
sse-gateway
ssh-agent
ssh-credentials
ssh-slaves
startup-trigger-plugin
structs
subversion
support-core
timestamper
token-macro
url-auth-sso
variant
windows-slaves
workflow-aggregator
workflow-api
workflow-basic-steps
workflow-cps
workflow-cps-global-lib
workflow-durable-task-step
workflow-job
workflow-multibranch
workflow-scm-step
workflow-step-api
workflow-support
ws-cleanup

0 comments on commit 78d8778

Please sign in to comment.