Skip to content

Commit

Permalink
for release 0.4.0 (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeRan213539 authored Nov 22, 2021
1 parent 906e871 commit efb7a8d
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 2 deletions.
30 changes: 30 additions & 0 deletions docker/0.4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM maven:3-openjdk-8
RUN mkdir /source && wget https://github.com/apache/dubbo-admin/archive/0.4.0.zip && unzip -q 0.4.0.zip -d /source
WORKDIR /source/dubbo-admin-0.4.0
RUN mvn --batch-mode clean package -Dmaven.test.skip=true

FROM openjdk:8-jre
LABEL maintainer="[email protected]"
RUN apt-get update && apt-get install -y tini
COPY --from=0 /source/dubbo-admin-0.4.0/dubbo-admin-distribution/target/dubbo-admin-0.4.0.jar /app.jar
COPY --from=0 /source/dubbo-admin-0.4.0/docker/entrypoint.sh /usr/local/bin/entrypoint.sh

ENV JAVA_OPTS ""

ENTRYPOINT ["tini", "--", "/usr/local/bin/entrypoint.sh"]
EXPOSE 8080
23 changes: 23 additions & 0 deletions docker/0.4.0/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:trusty
RUN apt-get update && apt-get install -yq curl && apt-get clean

WORKDIR /app

ADD test.sh /app/test.sh

CMD ["bash", "test.sh"]
33 changes: 33 additions & 0 deletions docker/0.4.0/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

zookeeper:
image: zookeeper:3.5
admin:
build: .
dockerfile: Dockerfile
links:
- zookeeper
environment:
- admin.registry.address=zookeeper://zookeeper:2181
- admin.config-center=zookeeper://zookeeper:2181
- admin.metadata-report.address=zookeeper://zookeeper:2181
ports:
- 8080
sut:
build: .
dockerfile: Dockerfile.test
links:
- admin
34 changes: 34 additions & 0 deletions docker/0.4.0/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOOP_SIZE=60
i=0

while [[ $i -lt LOOP_SIZE ]]; do
status_code=$(curl --write-out %{http_code} --silent --output /dev/null http://admin:8080)

if [[ "$status_code" -eq 200 ]] ; then
echo "Tests passed!"
exit 0
else
curl -v http://admin:8080
echo "status is incorrect, waiting for next turn"
fi
sleep 5
i=$i+1
done

echo "Tests failed!"
exit 1
2 changes: 2 additions & 0 deletions dubbo-admin-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<tasks>
<copy file="../dubbo-admin-server/target/dubbo-admin-server-${project.version}.jar"
tofile="target/dubbo-admin-${project.version}.jar"/>
<copy file="../dubbo-admin-server/target/classes/application.properties"
tofile="src/bin/config/application.properties"/>
</tasks>
</configuration>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ server.compression.enabled=true
server.compression.mime-types=text/css,text/javascript,application/javascript
server.compression.min-response-size=10240

#token timeout, default is one hour
admin.check.tokenTimeoutMilli=3600000
#Jwt signingKey
admin.check.signSecret=86295dd0c4ef69a1036b0b0c15158d77

#dubbo config
dubbo.application.name=dubbo-admin
dubbo.registry.address=${admin.registry.address}
Expand Down
2 changes: 1 addition & 1 deletion dubbo-admin-ui/public/dubbo-admin-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.3.0"
"version": "0.4.0"
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</repositories>

<properties>
<revision>0.3.0</revision>
<revision>0.4.0</revision>
<main.basedir>${project.basedir}</main.basedir>
<commons-lang3-version>3.7</commons-lang3-version>
<dubbo-version>3.0.2.1</dubbo-version>
Expand Down

0 comments on commit efb7a8d

Please sign in to comment.