This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added script
pre_deploy
and github issues templates (#19)
- Loading branch information
1 parent
1d49fe7
commit 0118a2b
Showing
3 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- | ||
Thanks for filing an issue! Before hitting the button, give this a read. | ||
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. | ||
If you suspect your issue is a bug, please add as much context as you can using the template below. If it is not a bug, remove any sections you don't need and explain how we can help. | ||
As a basic rule, if you cannot provide enough information to continue addressing the issue within 7 days, a maintainer will close it. We will, however, reopen it if you later provide the information. Thanks again. | ||
--> | ||
|
||
**Snap daemon version** (use `snapteld -v`): | ||
|
||
**Environment**: | ||
- **Cloud provider or hardware configuration**: | ||
- **OS** (e.g. from /etc/os-release): | ||
- **Kernel** (e.g. `uname -a`): | ||
- **Relevant tools** (e.g. plugins used with Snap): | ||
- **Others** (e.g. deploying with Ansible): | ||
|
||
|
||
**What happened**: | ||
|
||
|
||
**What you expected to happen**: | ||
|
||
|
||
**Steps to reproduce it** (as minimally and precisely as possible): | ||
|
||
1. | ||
2. | ||
3. | ||
|
||
|
||
**Anything else do we need to know** (e.g. issue happens only occasionally): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
If this is a bug fix, make sure your description includes "fixes #xxxx", or | ||
"closes #xxxx" | ||
Please provide the following information: | ||
--> | ||
Fixes # | ||
|
||
Summary of changes: | ||
- | ||
- | ||
- | ||
|
||
How to verify it: | ||
- | ||
|
||
Testing done: | ||
- | ||
|
||
A picture of a snapping turtle (not required but encouraged): | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env bash | ||
# File managed by pluginsync | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0.txt | ||
# | ||
# | ||
# Copyright 2016 Intel Corporation | ||
# | ||
# Licensed 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. | ||
|
||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
__proj_dir="$(dirname "$__dir")" | ||
|
||
# shellcheck source=scripts/common.sh | ||
. "${__dir}/common.sh" | ||
|
||
build_path="${__proj_dir}/build" | ||
_info "build_path: ${build_path}" | ||
_debug "$(find "${build_path}")" | ||
|
||
plugin_name="${__proj_dir##*/}" | ||
git_sha=$(git log --pretty=format:"%H" -1) | ||
s3_path="${__proj_dir}/s3/${plugin_name}" | ||
|
||
set +u | ||
if [ -z "$TRAVIS_TAG" ]; then | ||
set -u | ||
git_path="${s3_path}/${git_sha}" | ||
latest_path="${s3_path}/latest_build" | ||
mkdir -p "${git_path}" | ||
mkdir -p "${latest_path}" | ||
|
||
_info "copying plugin binaries to ${git_path}" | ||
cp -rp "${build_path}/"* "${git_path}" | ||
_info "copying plugin binaries to ${latest_path}" | ||
cp -rp "${build_path}/"* "${latest_path}" | ||
else | ||
set -u | ||
tag_path="${s3_path}/${TRAVIS_TAG}" | ||
latest_path="${s3_path}/latest" | ||
mkdir -p "${tag_path}" | ||
mkdir -p "${latest_path}" | ||
|
||
_info "copying plugin binaries to ${tag_path}" | ||
cp -rp "${build_path}/"* "${tag_path}" | ||
_info "copying plugin binaries to ${latest_path}" | ||
cp -rp "${build_path}/"* "${latest_path}" | ||
fi | ||
|
||
release_path="${SNAP_PATH:-"${__proj_dir}/release"}" | ||
mkdir -p "${release_path}" | ||
|
||
_info "moving plugin binaries to ${release_path}" | ||
|
||
for file in "${build_path}"/**/*/snap-* ; do | ||
filename="${file##*/}" | ||
parent="${file%/*}" | ||
arch="${parent##*/}" | ||
parent="${parent%/*}" | ||
os="${parent##*/}" | ||
cp "${file}" "${release_path}/${filename}_${os}_${arch}" | ||
done | ||
|
||
_debug "$(find "${build_path}")" | ||
_debug "$(find "${s3_path}")" | ||
_debug "$(find "${release_path}")" |