Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Add new Ace Jenkins pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Dec 20, 2018
1 parent ac5dfad commit 86ffdd4
Show file tree
Hide file tree
Showing 9 changed files with 382 additions and 30 deletions.
1 change: 1 addition & 0 deletions .dockerignorefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
1 change: 1 addition & 0 deletions .gitignorefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
FROM nginx:alpine
FROM node:9-alpine

WORKDIR /usr/src/app

ADD package.json /usr/src/app
ADD yarn.lock /usr/src/app

RUN yarn install

ADD . /usr/src/app

CMD ["node", "index.js"]
9 changes: 4 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!groovy
@Library("ace") _
@Library("ace-example-config") import no.ace.AceGlobalConfig

ace(AceGlobalConfig) {
ace {
stage('Build') {
image = docker.build ace.dockerImage, '--pull .'
dockerBuild()
}

stage('Push') {
// image.push()
dockerPush()
}

stage('Deploy') {
deploy('test', [dryrun: true])
deploy('test')

slack.notifyDeploy('test')
}
Expand Down
57 changes: 33 additions & 24 deletions ace.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# App Configuration
name: jenkins-test
namespace: default

# Disable environment specific namespace
namespaceEnvify: false

# Contact Information
contact:
Expand All @@ -15,27 +11,40 @@ contact:

# Helm Configuration
helm:
# name: $name - $environment
chart: ace/nodejs
version: ^1.0.0
# repo: https://evry-ace.github.io/helm-charts
# repoName: ace
version: ^2.0.0

cluster: kubernetes.ace.alpha
# namespace:
registry: acealpha.azurecr.io

values:
foo: bar
bar: foo

default:
probe:
path: /health
environments:
dev:
# cluster:
namespace: dev
# registry:
#
values:
bar: dev
dev: bar

ingress:
external: true
test:
# cluster:
namespace: test
# registry:
#
# values: {}

secrets:
- name: DB_USER
valueFrom:
secretKeyRef:
name: jenkins-test-secret
key: dbUser
desc: Database username
- name: DB_PASS
valueFrom:
secretKeyRef:
name: jenkins-test-secret
key: dbPass
type: password
desc: Database password
prod:
# cluster:
namesapce: prod
# registry:
#
# values: {}
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '2'

services:
node:
image: node:9-alpine
working_dir: /usr/src/app
volumes:
- ".:/usr/src/app"
environment:
- NODE_ENV=development
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var express = require('express');

var app = express();

app.get('/', function(req, res){
res.send('Hello World');
});

/* istanbul ignore next */
if (!module.parent) {
app.listen(8080);
console.log('Express started on port 3000');
}
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "jenkins-test",
"version": "1.0.0",
"description": "Jenkins Test App",
"main": "index.js",
"repository": "git@github.com:evry-ace/jenkins-test.git",
"author": "Hans Kristian Flaatten",
"license": "MIT",
"private": false,
"dependencies": {
"express": "^4.16.4"
}
}
Loading

0 comments on commit 86ffdd4

Please sign in to comment.