Skip to content

Commit 18a9d8d

Browse files
dkwon17ibuziuk
authored andcommitted
Add devfile.yaml and extensions.json
Signed-off-by: dkwon17 <[email protected]>
1 parent 0bc78c0 commit 18a9d8d

File tree

3 files changed

+32
-39
lines changed

3 files changed

+32
-39
lines changed

.vscode/extensions.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"github.vscode-pull-request-github",
4+
"golang.Go",
5+
]
6+
}

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
BINARY_NAME=kubernetes-image-puller
2-
DOCKERIMAGE_NAME=kubernetes-image-puller
3-
DOCKERIMAGE_TAG=next
2+
IMAGE_NAME=kubernetes-image-puller
3+
IMAGE_TAG=next
44
CGO_ENABLED=1
5+
PODMAN=podman
56

67
all: build docker
78

@@ -18,10 +19,10 @@ test:
1819
CGO_ENABLED=${CGO_ENABLED} go test -v ./cfg... ./pkg... ./sleep... ./utils...
1920

2021
docker:
21-
docker build -t ${DOCKERIMAGE_NAME}:${DOCKERIMAGE_TAG} -f ./build/dockerfiles/Dockerfile .
22+
${PODMAN} build -t ${IMAGE_NAME}:${IMAGE_TAG} -f ./build/dockerfiles/Dockerfile .
2223

2324
docker-dev: build
24-
docker build -t ${DOCKERIMAGE_NAME}:${DOCKERIMAGE_TAG} -f ./build/dockerfiles/dev.Dockerfile .
25+
${PODMAN} build -t ${IMAGE_NAME}:${IMAGE_TAG} -f ./build/dockerfiles/dev.Dockerfile .
2526

2627
local-setup:
2728
oc process -f ./deploy/serviceaccount.yaml | oc apply -f -

devfile.yaml

+21-35
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,24 @@
1+
schemaVersion: 2.2.0
12
metadata:
2-
generateName: kubernetes-image-puller-
3-
attributes:
4-
persistVolumes: 'false'
3+
generateName: kubernetes-image-puller
54
components:
6-
- id: golang/go/latest
7-
memoryLimit: 512Mi
8-
preferences:
9-
go.lintTool: golangci-lint
10-
go.lintFlags: '--fast'
11-
type: chePlugin
12-
alias: go-plugin
13-
- mountSources: true
14-
endpoints:
15-
- name: 8080/tcp
16-
port: 8080
17-
memoryLimit: 2Gi
18-
type: dockerimage
19-
image: 'quay.io/eclipse/che-golang-1.12:next'
20-
alias: go-cli
21-
env:
22-
- value: '/go:$(CHE_PROJECTS_ROOT)'
23-
name: GOPATH
24-
- value: /tmp/.cache
25-
name: GOCACHE
26-
27-
- id: github/vscode-pull-request-github/latest
28-
type: chePlugin
29-
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
30-
apiVersion: 1.0.0
5+
- name: universal-developer-image
6+
container:
7+
image: quay.io/devfile/universal-developer-image:ubi8-latest
8+
memoryLimit: 6Gi
9+
mountSources: true
3110
commands:
32-
- name: build kubernetes-image-puller
33-
actions:
34-
- workdir: '${CHE_PROJECTS_ROOT}/kubernetes-image-puller'
35-
type: exec
36-
command: go build -v -o ./bin/kubernetes-image-puller ./cmd/main.go
37-
component: go-cli
38-
11+
- id: build
12+
exec:
13+
label: "Build kubernetes-image-puller"
14+
component: universal-developer-image
15+
commandLine: "make build"
16+
group:
17+
kind: build
18+
- id: build-kip-and-image
19+
exec:
20+
label: "Build kubernetes-image-puller and the container image"
21+
component: universal-developer-image
22+
commandLine: "make"
23+
group:
24+
kind: build

0 commit comments

Comments
 (0)