aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
blob: 5d2801bf18e1192352e4d8288da44cd07b7f465c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0

set -xe

repo=${REPO:-opnfv}
tag=${BRANCH:-fraser}
arch=${arch-"\
amd64 \
arm64"}
image="xtesting"
build_opts=(--pull=true --no-cache --force-rm=true)

for arch in ${arch};do
    if [[ ${arch} == arm64 ]]; then
        find . -name Dockerfile -exec sed -i \
            -e "s|alpine:3.7|multiarch/alpine:arm64-v3.7|g" {} +
    fi
    (cd docker &&   docker build "${build_opts[@]}" \
        -t "${repo}/${image}:${arch}-${tag}" .)
    docker push "${repo}/${image}:${arch}-${tag}"
    [ "$?" == "0" ] &&
        (sudo docker rmi "${repo}/${image}:${arch}-${tag}"|| true)
    find . -name Dockerfile -exec git checkout \{\} +;
done
exit $?
pan>).tickFormat(d3.time.format("%m-%d")); var trend_yAxis = d3.svg.axis().scale(trend_y) .orient("left").ticks(2); // Define the line var valueline = d3.svg.line() .x(function(d) { return trend_x(d.date); }) .y(function(d) { return trend_y(d.score); }); var trend = function(container, trend_data) { var trend_svg = d3.select(container) .append("svg") .attr("width", trend_width + trend_margin.left + trend_margin.right) .attr("height", trend_height + trend_margin.top + trend_margin.bottom) .append("g") .attr("transform", "translate(" + trend_margin.left + "," + trend_margin.top + ")"); // Scale the range of the data trend_x.domain(d3.extent(trend_data, function(d) { return d.date; })); trend_y.domain([0, d3.max(trend_data, function(d) { return d.score; })]); // Add the X Axis trend_svg.append("g") .attr("class", "x axis") .attr("transform", "translate(0," + trend_height + ")") .call(trend_xAxis); // Add the Y Axis trend_svg.append("g") .attr("class", "y axis") .call(trend_yAxis); // Add the valueline path. trend_svg.append("path") .attr("class", "line") .attr("d", valueline(trend_data)) .attr("stroke", "steelblue") .attr("fill", "none"); trend_svg.selectAll(".dot") .data(trend_data) .enter().append("circle") .attr("r", 2.5) .attr("cx", function(d) { return trend_x(d.date); }) .attr("cy", function(d) { return trend_y(d.score); }); return trend; }