Skip to content

Commit e08e76a

Browse files
authored
Merge pull request #3 from fbladilo/init_v8.1
Bootstrap MTA v8.1.0
2 parents 18d9c1c + 48e895a commit e08e76a

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

.gitmodules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[submodule "hack/build/rulesets"]
2+
path = hack/build/rulesets
3+
url = https://github.com/konveyor/rulesets
4+
branch = main
5+
[submodule "hack/build/windup-rulesets"]
6+
path = hack/build/windup-rulesets
7+
url = https://github.com/windup/windup-rulesets

hack/build/rulesets

Submodule rulesets added at 27515eb

hack/build/windup-rulesets

Submodule windup-rulesets added at 35391c0

konflux.Dockerfile

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM registry.redhat.io/ubi9/go-toolset:1.23 AS builder
2+
COPY --chown=1001:0 . /workspace
3+
WORKDIR /workspace
4+
5+
RUN CGO_ENABLED=0 GOOS=linux GOEXPERIMENT=strictfipsruntime go build -tags strictfipsruntime \
6+
--ldflags="-X 'github.com/konveyor-ecosystem/kantra/cmd.Version=$BUILD_VERSION' \
7+
-X 'github.com/konveyor-ecosystem/kantra/cmd.RunnerImage=registry.redhat.io/mta/mta-cli-rhel9:$BUILD_VERSION' \
8+
-X 'github.com/konveyor-ecosystem/kantra/cmd.JavaBundlesLocation=/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core.jar' \
9+
-X 'github.com/konveyor-ecosystem/kantra/cmd.JavaProviderImage=registry.redhat.io/mta/mta-java-external-provider-rhel9:$BUILD_VERSION' \
10+
-X 'github.com/konveyor-ecosystem/kantra/cmd.DotnetProviderImage=registry.redhat.io/mta/mta-dotnet-external-provider-rhel9:$BUILD_VERSION' \
11+
-X 'github.com/konveyor-ecosystem/kantra/cmd.GenericProviderImage=registry.redhat.io/mta/mta-generic-external-provider-rhel9:$BUILD_VERSION' \
12+
-X 'github.com/konveyor-ecosystem/kantra/cmd.RootCommandName=mta-cli' \
13+
-X 'github.com/konveyor-ecosystem/kantra/cmd.BuildCommit=$SOURCE_GIT_COMMIT'" \
14+
-a -o mta-cli main.go
15+
RUN CGO_ENABLED=0 GOOS=darwin go build \
16+
--ldflags="-X 'github.com/konveyor-ecosystem/kantra/cmd.Version=$BUILD_VERSION' \
17+
-X 'github.com/konveyor-ecosystem/kantra/cmd.RunnerImage=registry.redhat.io/mta/mta-cli-rhel9:$BUILD_VERSION' \
18+
-X 'github.com/konveyor-ecosystem/kantra/cmd.JavaBundlesLocation=/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core.jar' \
19+
-X 'github.com/konveyor-ecosystem/kantra/cmd.JavaProviderImage=registry.redhat.io/mta/mta-java-external-provider-rhel9:$BUILD_VERSION' \
20+
-X 'github.com/konveyor-ecosystem/kantra/cmd.DotnetProviderImage=registry.redhat.io/mta/mta-dotnet-external-provider-rhel9:$BUILD_VERSION' \
21+
-X 'github.com/konveyor-ecosystem/kantra/cmd.GenericProviderImage=registry.redhat.io/mta/mta-generic-external-provider-rhel9:$BUILD_VERSION' \
22+
-X 'github.com/konveyor-ecosystem/kantra/cmd.RootCommandName=mta-cli' \
23+
-X 'github.com/konveyor-ecosystem/kantra/cmd.BuildCommit=$SOURCE_GIT_COMMIT'" \
24+
-a -o darwin-mta-cli main.go
25+
RUN CGO_ENABLED=0 GOOS=windows go build \
26+
--ldflags="-X 'github.com/konveyor-ecosystem/kantra/cmd.Version=$BUILD_VERSION' \
27+
-X 'github.com/konveyor-ecosystem/kantra/cmd.RunnerImage=registry.redhat.io/mta/mta-cli-rhel9:$BUILD_VERSION' \
28+
-X 'github.com/konveyor-ecosystem/kantra/cmd.JavaBundlesLocation=/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core.jar' \
29+
-X 'github.com/konveyor-ecosystem/kantra/cmd.JavaProviderImage=registry.redhat.io/mta/mta-java-external-provider-rhel9:$BUILD_VERSION' \
30+
-X 'github.com/konveyor-ecosystem/kantra/cmd.DotnetProviderImage=registry.redhat.io/mta/mta-dotnet-external-provider-rhel9:$BUILD_VERSION' \
31+
-X 'github.com/konveyor-ecosystem/kantra/cmd.GenericProviderImage=registry.redhat.io/mta/mta-generic-external-provider-rhel9:$BUILD_VERSION' \
32+
-X 'github.com/konveyor-ecosystem/kantra/cmd.RootCommandName=mta-cli' \
33+
-X 'github.com/konveyor-ecosystem/kantra/cmd.BuildCommit=$SOURCE_GIT_COMMIT'" \
34+
-a -o windows-mta-cli.exe main.go
35+
36+
FROM registry.redhat.io/ubi9:latest AS rulesets
37+
COPY --chown=1001:0 . /workspace
38+
39+
FROM brew.registry.redhat.io/rh-osbs/mta-mta-static-report-rhel9:8.0.0 as static-report
40+
41+
FROM brew.registry.redhat.io/rh-osbs/mta-mta-analyzer-lsp-rhel9:8.0.0
42+
RUN dnf -y install podman && dnf -y clean all
43+
44+
RUN echo mta:x:1000:0:1000 user:/home/mta:/sbin/nologin > /etc/passwd
45+
RUN echo mta:10000:5000 > /etc/subuid
46+
RUN echo mta:10000:5000 > /etc/subgid
47+
RUN mkdir -p /home/mta/.config/containers/
48+
RUN cp /etc/containers/storage.conf /home/mta/.config/containers/storage.conf
49+
RUN sed -i "s/^driver.*/driver = \"vfs\"/g" /home/mta/.config/containers/storage.conf
50+
RUN echo -ne '[containers]\nvolumes = ["/proc:/proc",]\ndefault_sysctls = []' > /home/mta/.config/containers/containers.conf
51+
RUN chown -R 1000:1000 /home/mta
52+
53+
RUN mkdir -p /opt/rulesets /opt/rulesets/input /opt/rulesets/convert /opt/openrewrite /opt/input /opt/input/rules /opt/input/rules/custom /opt/output /tmp/source-app /tmp/source-app/input
54+
55+
COPY --from=builder /workspace/mta-cli /usr/local/bin/mta-cli
56+
COPY --from=builder /workspace/darwin-mta-cli /usr/local/bin/darwin-mta-cli
57+
COPY --from=builder /workspace/windows-mta-cli.exe /usr/local/bin/windows-mta-cli.exe
58+
COPY --from=rulesets /workspace/hack/build/rulesets/default/generated /opt/rulesets
59+
COPY --from=rulesets /workspace/hack/build/windup-rulesets/rules/rules-reviewed/openrewrite /opt/openrewrite
60+
COPY --from=static-report /usr/bin/js-bundle-generator /usr/local/bin/js-bundle-generator
61+
COPY --from=static-report /usr/local/static-report /usr/local/static-report
62+
COPY --from=builder --chmod=755 /workspace/entrypoint.sh /usr/bin/entrypoint.sh
63+
COPY --from=builder --chmod=755 /workspace/openrewrite_entrypoint.sh /usr/bin/openrewrite_entrypoint.sh
64+
COPY --from=builder /workspace/LICENSE /licenses/
65+
66+
RUN find /opt/rulesets/azure -type f -exec sed -i '/konveyor.io\/target=azure-aks/d' {} +
67+
RUN find /opt/rulesets/azure -type f -exec sed -i '/konveyor.io\/target=azure-container-apps/d' {} +
68+
69+
ENTRYPOINT ["mta-cli"]
70+
71+
LABEL \
72+
description="Migration Toolkit for Applications - CLI" \
73+
io.k8s.description="Migration Toolkit for Applications - CLI" \
74+
io.k8s.display-name="MTA - CLI" \
75+
io.openshift.maintainer.project="MTA" \
76+
io.openshift.tags="migration,modernization,mta,tackle,konveyor" \
77+
summary="Migration Toolkit for Applications - CLI"

0 commit comments

Comments
 (0)