Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Commit

Permalink
Update the base image to ubuntu:18.04 (#40)
Browse files Browse the repository at this point in the history
* Update the base image to ubuntu:18.04

* Update ci/pipeline.yaml

* Make base-image resource name to a variable
  • Loading branch information
superbrothers authored Aug 27, 2018
1 parent 4fc4eb5 commit 3f15d3e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 28 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ script:
- ./scripts/verify-authors.sh
- make lint
- make test
- make image
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.10
RUN set -x && \
go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator

FROM ubuntu:16.04
FROM ubuntu:18.04

MAINTAINER Kazuki Suda <ksuda@zlab.co.jp>

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
IMAGE := zlabjp/kubernetes-resource

.PHONY: image
image:
docker build -t $(IMAGE) .

.PHONY: test
test:
@scripts/run-bats.sh
Expand Down
38 changes: 19 additions & 19 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# DO NOT MAKE CHANGES TO THIS FILE. Instead, modify ci/pipeline.yml.erb and
# execute build-pipeline-yml.
#
# created: 2018-08-21T15:18:07+09:00
# created: 2018-08-27T15:50:45+09:00
#
resource_types:
- name: slack-notification
Expand All @@ -19,11 +19,11 @@ resource_types:
tag: latest

resources:
- name: ubuntu-16.04
- name: ubuntu-18.04
type: docker-image
source:
repository: ubuntu
tag: "16.04"
tag: "18.04"

- name: kubernetes-resource
type: git
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- aggregate:
- get: kubernetes-resource
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: latest
Expand All @@ -173,7 +173,7 @@ jobs:
- put: kubernetes-resource-image-edge
params:
build: kubernetes-resource
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: stable-1.6
Expand All @@ -212,7 +212,7 @@ jobs:
- put: kubernetes-resource-image-1.6
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand All @@ -239,7 +239,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: stable-1.7
Expand All @@ -250,7 +250,7 @@ jobs:
- put: kubernetes-resource-image-1.7
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand All @@ -277,7 +277,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: stable-1.8
Expand All @@ -288,7 +288,7 @@ jobs:
- put: kubernetes-resource-image-1.8
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand All @@ -315,7 +315,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: stable-1.9
Expand All @@ -326,7 +326,7 @@ jobs:
- put: kubernetes-resource-image-1.9
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand All @@ -353,7 +353,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: stable-1.10
Expand All @@ -364,7 +364,7 @@ jobs:
- put: kubernetes-resource-image-1.10
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand All @@ -391,7 +391,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: stable-1.11
Expand All @@ -402,7 +402,7 @@ jobs:
- put: kubernetes-resource-image-1.11
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand All @@ -429,7 +429,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: ubuntu-18.04
params: {save: true}
trigger: true
- get: latest
Expand All @@ -440,7 +440,7 @@ jobs:
- put: kubernetes-resource-image-latest
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: ubuntu-18.04
build_args_file: output/build-args-file
on_success:
put: notify
Expand Down
18 changes: 10 additions & 8 deletions ci/pipeline.yml.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<%
kubernetes_versions = %w(stable-1.6 stable-1.7 stable-1.8 stable-1.9 stable-1.10 stable-1.11 latest)
def tag(version); version.sub(/^stable-/, ''); end
def image_resource_name(version); "kubernetes-resource-image-" + tag(version); end

kubernetes_versions = %w(stable-1.6 stable-1.7 stable-1.8 stable-1.9 stable-1.10 stable-1.11 latest)
base_image = {repository: 'ubuntu', tag: '18.04'}
def base_image.to_s; "#{self[:repository]}-#{self[:tag]}"; end
%>
# ci/pipeline.yml
#
Expand All @@ -24,11 +26,11 @@ resource_types:
tag: latest

resources:
- name: ubuntu-16.04
- name: <%= base_image %>
type: docker-image
source:
repository: ubuntu
tag: "16.04"
repository: <%= base_image[:repository] %>
tag: "<%= base_image[:tag] %>"

- name: kubernetes-resource
type: git
Expand Down Expand Up @@ -83,7 +85,7 @@ jobs:
- aggregate:
- get: kubernetes-resource
trigger: true
- get: ubuntu-16.04
- get: <%= base_image %>
params: {save: true}
trigger: true
- get: latest
Expand All @@ -94,7 +96,7 @@ jobs:
- put: <%= image_resource_name("edge") %>
params:
build: kubernetes-resource
load_base: ubuntu-16.04
load_base: <%= base_image %>
build_args_file: output/build-args-file
on_success:
put: notify
Expand Down Expand Up @@ -122,7 +124,7 @@ jobs:
- aggregate:
- get: kubernetes-resource-release
trigger: true
- get: ubuntu-16.04
- get: <%= base_image %>
params: {save: true}
trigger: true
- get: <%= version %>
Expand All @@ -133,7 +135,7 @@ jobs:
- put: <%= image_resource_name(version) %>
params:
build: kubernetes-resource-release
load_base: ubuntu-16.04
load_base: <%= base_image %>
build_args_file: output/build-args-file
on_success:
put: notify
Expand Down

0 comments on commit 3f15d3e

Please sign in to comment.