You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/11/25 09:51:27 UTC
[apisix-dashboard] branch master updated: ci: use APISIX master
branch code to run e2e test (#864)
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new f353ad4 ci: use APISIX master branch code to run e2e test (#864)
f353ad4 is described below
commit f353ad463f00a3bdfa0fabffea2f673bf35078fc
Author: nic-chen <33...@users.noreply.github.com>
AuthorDate: Wed Nov 25 17:51:17 2020 +0800
ci: use APISIX master branch code to run e2e test (#864)
---
api/test/docker/Dockerfile-apisix | 58 +++++++++++++++++++++++++++++++++++++
api/test/docker/apisix_config.yaml | 5 ++++
api/test/docker/docker-compose.yaml | 18 ++++++++++--
3 files changed, 78 insertions(+), 3 deletions(-)
diff --git a/api/test/docker/Dockerfile-apisix b/api/test/docker/Dockerfile-apisix
new file mode 100644
index 0000000..5c4bd31
--- /dev/null
+++ b/api/test/docker/Dockerfile-apisix
@@ -0,0 +1,58 @@
+#
+# 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 openresty/openresty:alpine-fat AS production-stage
+
+ARG APISIX_VERSION=master
+LABEL apisix_version="${APISIX_VERSION}"
+
+RUN set -x \
+ && /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories \
+ && apk add --no-cache --virtual .builddeps \
+ automake \
+ autoconf \
+ libtool \
+ pkgconfig \
+ cmake \
+ git \
+ && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps \
+ && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+ && bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path' \
+ && sed -i "1s@.*@$bin@" /usr/bin/apisix \
+ && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+ && apk del .builddeps build-base make unzip
+
+FROM alpine:3.11 AS last-stage
+
+# add runtime for Apache APISIX
+RUN set -x \
+ && /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories \
+ && apk add --no-cache bash libstdc++ curl
+
+WORKDIR /usr/local/apisix
+
+COPY --from=production-stage /usr/local/openresty/ /usr/local/openresty/
+COPY --from=production-stage /usr/local/apisix/ /usr/local/apisix/
+COPY --from=production-stage /usr/bin/apisix /usr/bin/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
diff --git a/api/test/docker/apisix_config.yaml b/api/test/docker/apisix_config.yaml
index 7213f15..1bb8680 100644
--- a/api/test/docker/apisix_config.yaml
+++ b/api/test/docker/apisix_config.yaml
@@ -33,3 +33,8 @@ apisix:
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # If we don't set any IP list, then any IP access is allowed by default.
+
+ ssl:
+ enable: true
+ ssl_cert: "/usr/local/apisix/certs/apisix.crt"
+ ssl_cert_key: "/usr/local/apisix/certs/apisix.key"
diff --git a/api/test/docker/docker-compose.yaml b/api/test/docker/docker-compose.yaml
index d0f0f90..064bff1 100644
--- a/api/test/docker/docker-compose.yaml
+++ b/api/test/docker/docker-compose.yaml
@@ -126,10 +126,16 @@ services:
ipv4_address: 172.16.238.20
apisix:
- image: apache/apisix:dev
+ build:
+ context: ../../
+ dockerfile: test/docker/Dockerfile-apisix
+ args:
+ - APISIX_VERSION=master
restart: always
volumes:
- ./apisix_config.yaml:/usr/local/apisix/conf/config.yaml:ro
+ - ../certs/apisix.crt:/usr/local/apisix/certs/apisix.crt:ro
+ - ../certs/apisix.key:/usr/local/apisix/certs/apisix.key:ro
depends_on:
- node1
- node2
@@ -142,10 +148,16 @@ services:
ipv4_address: 172.16.238.30
apisix2:
- image: apache/apisix:dev
+ build:
+ context: ../../
+ dockerfile: test/docker/Dockerfile-apisix
+ args:
+ - APISIX_VERSION=master
restart: always
volumes:
- ./apisix_config.yaml:/usr/local/apisix/conf/config.yaml:ro
+ - ../certs/apisix.crt:/usr/local/apisix/certs/apisix.crt:ro
+ - ../certs/apisix.key:/usr/local/apisix/certs/apisix.key:ro
depends_on:
- node1
- node2
@@ -159,7 +171,7 @@ services:
managerapi:
build:
context: ../../
- dockerfile: test/docker/Dockerfile
+ dockerfile: test/docker/Dockerfile
restart: always
volumes:
- ./manager-api-conf.yaml:/go/manager-api/conf/conf.yaml:ro