Skip to content

Commit 7f4066a

Browse files
authored
Merge pull request #97 from scottkurz/refactor-stack-release
Refactor stack release
2 parents 5c28591 + 1064cb6 commit 7f4066a

File tree

12 files changed

+42
-282
lines changed

12 files changed

+42
-282
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
target/
22

3+
# generated from stack build.sh, not source
4+
generated/
5+
36
# eclipse specific git ignore
47
*.pydevproject
58
.project

Diff for: build.sh

+32-13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
####
24
# For more documentation, see:
35
# https://github.com/OpenLiberty/application-stack/wiki/Open-Liberty-Application-Stack-Customization
@@ -21,24 +23,41 @@ OL_UBI_IMAGE="${OL_UBI_IMAGE:-openliberty/open-liberty:20.0.0.10-kernel-java11-o
2123
#
2224
# The name and tag of the "stack image you will build. This will used to create your inner loop development containers, and also as the base image for the first stage of your outer loop image build.
2325
#
24-
STACK_IMAGE="${STACK_IMAGE:-openliberty/application-stack:0.3}"
26+
STACK_IMAGE="${STACK_IMAGE:-openliberty/application-stack:0.4}"
2527

2628
#
2729
# URL at which your outer loop Dockerfile is hosted
2830
#
29-
DEVFILE_DOCKERFILE_LOC="${DEVFILE_DOCKERFILE_LOC:-https://raw.githubusercontent.com/OpenLiberty/application-stack/master/outer-loop/0.3/Dockerfile}"
31+
DEVFILE_DOCKERFILE_LOC="${DEVFILE_DOCKERFILE_LOC:-https://github.com/OpenLiberty/application-stack/releases/download/outer-loop-0.4.0-rc/Dockerfile}"
3032

3133
#
3234
# URL at which your outer loop deploy YAML template is hosted
3335
#
34-
DEVFILE_DEPLOY_YAML_LOC="${DEVFILE_DEPLOY_YAML_LOC:-https://raw.githubusercontent.com/OpenLiberty/application-stack/master/outer-loop/0.3/app-deploy.yaml}"
35-
36-
# Base customization.
37-
sed -e "s!{{.OL_RUNTIME_VERSION}}!$OL_RUNTIME_VERSION!; s!{{.STACK_IMAGE}}!$STACK_IMAGE!; s!{{.DEVFILE_DOCKERFILE_LOC}}!$DEVFILE_DOCKERFILE_LOC!; s!{{.DEVFILE_DEPLOY_YAML_LOC}}!$DEVFILE_DEPLOY_YAML_LOC!" src/devfile.yaml > devfile.yaml
38-
sed -e "s!{{.BASE_OS_IMAGE}}!$BASE_OS_IMAGE!; s!{{.OL_RUNTIME_VERSION}}!$OL_RUNTIME_VERSION!" src/stackimage/Dockerfile > stackimage/Dockerfile
39-
40-
# Outer loop customization of Dockerfile
41-
sed -e "s!{{.STACK_IMAGE}}!$STACK_IMAGE!; s!{{.OL_UBI_IMAGE}}!$OL_UBI_IMAGE!" src/outer-loop/Dockerfile > outer-loop/latest/Dockerfile
42-
43-
# Outer loop copy of app-deploy.yaml (no customization at present)
44-
cp src/outer-loop/app-deploy.yaml outer-loop/latest/app-deploy.yaml
36+
DEVFILE_DEPLOY_YAML_LOC="${DEVFILE_DEPLOY_YAML_LOC:-https://github.com/OpenLiberty/application-stack/releases/download/outer-loop-0.4.0-rc/app-deploy.yaml}"
37+
38+
generate() {
39+
# Base customization.
40+
mkdir -p generated
41+
sed -e "s!{{.OL_RUNTIME_VERSION}}!$OL_RUNTIME_VERSION!; s!{{.STACK_IMAGE}}!$STACK_IMAGE!; s!{{.DEVFILE_DOCKERFILE_LOC}}!$DEVFILE_DOCKERFILE_LOC!; s!{{.DEVFILE_DEPLOY_YAML_LOC}}!$DEVFILE_DEPLOY_YAML_LOC!" templates/devfile.yaml > generated/devfile.yaml
42+
sed -e "s!{{.BASE_OS_IMAGE}}!$BASE_OS_IMAGE!; s!{{.OL_RUNTIME_VERSION}}!$OL_RUNTIME_VERSION!" templates/stackimage/Dockerfile > generated/stackimage-Dockerfile
43+
44+
# Outer loop customization of Dockerfile
45+
sed -e "s!{{.STACK_IMAGE}}!$STACK_IMAGE!; s!{{.OL_UBI_IMAGE}}!$OL_UBI_IMAGE!" templates/outer-loop/Dockerfile > generated/Dockerfile
46+
}
47+
48+
49+
#set the action, default to generate if none passed.
50+
ACTION="generate"
51+
if [ $# -ge 1 ]; then
52+
ACTION=$1
53+
shift
54+
fi
55+
case "${ACTION}" in
56+
generate)
57+
generate
58+
;;
59+
*)
60+
echo "Invalid input action. Allowed values: generate. Default: generate."
61+
exit 1
62+
;;
63+
esac

Diff for: devfile.yaml

-85
This file was deleted.

Diff for: outer-loop/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# NOTE
2+
3+
The usage for the paths nested here has been superseded by the use of https://github.com/OpenLiberty/application-stack release URLs.
4+
5+
We keep this for now, for backwards compatibility for existing users, but will remove in the future.

Diff for: outer-loop/latest/Dockerfile

-46
This file was deleted.

Diff for: src/outer-loop/app-deploy.yaml

-29
This file was deleted.

Diff for: stackimage/Dockerfile

-106
This file was deleted.

Diff for: src/devfile.yaml renamed to templates/devfile.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schemaVersion: 2.0.0
22
metadata:
33
name: java-openliberty
4-
version: 0.3.0
4+
version: 0.4.0-rc
55
description: Java application stack using Open Liberty runtime
66
alpha.build-dockerfile: "{{.DEVFILE_DOCKERFILE_LOC}}"
77
alpha.deployment-manifest: "{{.DEVFILE_DEPLOY_YAML_LOC}}"
@@ -13,8 +13,7 @@ starterProjects:
1313
components:
1414
- name: devruntime
1515
container:
16-
# In the original upstream of this devfile, the image used is openliberty/application-stack:<x.y.z>, which is built from source at:
17-
# https://github.com/OpenLiberty/application-stack/tree/master/stackimage
16+
# In the original upstream of this devfile, the image used is openliberty/application-stack:<x.y.z>, which is built from the repository: https://github.com/OpenLiberty/application-stack
1817
image: {{.STACK_IMAGE}}
1918
memoryLimit: 1512Mi
2019
mountSources: true

Diff for: meta.yaml renamed to templates/meta.yaml

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)