Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
605139f4
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
605139f4
编写于
11月 08, 2018
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup snap build
上级
c850728d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
6 addition
and
197 deletion
+6
-197
build/tfs/linux/.gitignore
build/tfs/linux/.gitignore
+1
-2
build/tfs/linux/release-snap.sh
build/tfs/linux/release-snap.sh
+0
-51
build/tfs/linux/snap-build-linux.yml
build/tfs/linux/snap-build-linux.yml
+5
-5
build/tfs/linux/x64-snap/Dockerfile
build/tfs/linux/x64-snap/Dockerfile
+0
-71
build/tfs/linux/x64-snap/run-agent.sh
build/tfs/linux/x64-snap/run-agent.sh
+0
-15
build/tfs/linux/x64-snap/xvfb.init
build/tfs/linux/x64-snap/xvfb.init
+0
-53
未找到文件。
build/tfs/linux/.gitignore
浏览文件 @
605139f4
pat
*.js
\ No newline at end of file
pat
\ No newline at end of file
build/tfs/linux/release-snap.sh
已删除
100755 → 0
浏览文件 @
c850728d
#!/bin/bash
.
./scripts/env.sh
yarn gulp
"vscode-linux-
$ARCH
-build-snap"
# Variables
PLATFORM_LINUX
=
"linux-
$ARCH
"
PLATFORM_SNAP
=
"linux-snap-
$ARCH
"
REPO
=
"
`
pwd
`
"
ROOT
=
"
$REPO
/.."
BUILDNAME
=
"VSCode-
$PLATFORM_LINUX
"
BUILD
=
"
$ROOT
/
$BUILDNAME
"
PACKAGEJSON
=
"
$BUILD
/resources/app/package.json"
VERSION
=
$(
node
-p
"require(
\"
$PACKAGEJSON
\"
).version"
)
SNAP_FILENAME
=
"
$(
ls
$REPO
/.build/linux/snap/
$ARCH
/ |
grep
.snap
)
"
SNAP_PATH
=
"
$REPO
/.build/linux/snap/
$ARCH
/
$SNAP_FILENAME
"
node build/tfs/common/publish.js
$VSCODE_QUALITY
$PLATFORM_SNAP
package
$SNAP_FILENAME
$VERSION
true
$SNAP_PATH
if
[
-z
"
$VSCODE_QUALITY
"
]
;
then
echo
"VSCODE_QUALITY is not set, skipping repo package publish"
else
if
[
-z
"
$SNAPCRAFT_LOGIN
"
]
||
[
-z
"
$SNAPCRAFT_MACAROON
"
]
||
[
-z
"
$SNAPCRAFT_UNBOUND_DISCHARGE
"
]
;
then
echo
"SNAPCRAFT* env vars not set, skipping repo package publish"
else
IS_FROZEN
=
"
$(
node build/tfs/linux/frozen-check.js
$VSCODE_QUALITY
)
"
AUTO_RELEASE
=
0
if
[
"
$IS_FROZEN
"
!=
"true"
]
;
then
if
[
"
$BUILD_SOURCEBRANCH
"
=
"master"
]
||
[
"
$BUILD_SOURCEBRANCH
"
=
"refs/heads/master"
]
;
then
if
[[
$BUILD_QUEUEDBY
=
*
"Project Collection Service Accounts"
*
||
$BUILD_QUEUEDBY
=
*
"Microsoft.VisualStudio.Services.TFS"
*
]]
;
then
if
[
"
$VSCODE_QUALITY
"
=
"insider"
]
;
then
AUTO_RELEASE
=
1
fi
fi
fi
fi
LOGIN_FILE
=
snapcraft_login_file
echo
-e
'[login.ubuntu.com]\nmacaroon = '
$SNAPCRAFT_MACAROON
'\nunbound_discharge = '
$SNAPCRAFT_UNBOUND_DISCHARGE
'\nemail = '
$VSCODE_SNAP_LOGIN
'\n'
>
$LOGIN_FILE
snapcraft login
--with
$LOGIN_FILE
if
[
"
$AUTO_RELEASE
"
=
"1"
]
;
then
echo
"Pushing and releasing to Snap Store stable channel"
snapcraft push
$SNAP_PATH
--release
stable
else
echo
"Pushing to Snap Store"
snapcraft push
$SNAP_PATH
fi
fi
fi
\ No newline at end of file
build/tfs/linux/snap-build-linux.yml
浏览文件 @
605139f4
...
...
@@ -16,26 +16,26 @@ steps:
-
script
:
|
set -e
(cd build && yarn)
REPO="$(pwd)"
ARCH="$(VSCODE_ARCH)"
SNAP_ROOT="$REPO/.build/linux/snap/$ARCH"
# Install build dependencies
(cd build && yarn)
# Unpack snap tarball artifact, in order to preserve file perms
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$ARCH.tar.gz"
(cd .build/linux && tar -xzf $SNAP_TARBALL_PATH)
ls -la "$SNAP_ROOT"
# Create snap package
BUILD_VERSION="$(date +%s)"
SNAP_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.snap"
PACKAGEJSON="$(ls $SNAP_ROOT/code*/usr/share/code*/resources/app/package.json)"
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME"
(cd $SNAP_ROOT/code-* && snapcraft snap --output "$SNAP_PATH")
# Publish snap package
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
...
...
build/tfs/linux/x64-snap/Dockerfile
已删除
100644 → 0
浏览文件 @
c850728d
FROM
microsoft/vsts-agent:ubuntu-16.04-standard
MAINTAINER
Daniel Imms <daimms@microsoft.com>
ARG
DEBIAN_FRONTEND=noninteractive
RUN
apt-get update
# Dependencies
RUN
apt-get
install
-y
build-essential
\
gcc-multilib
\
g++-multilib
\
git
\
dpkg-dev
\
zip
\
rpm
\
createrepo
\
python-gtk2
\
jq
\
xvfb
\
fakeroot
\
libgtk2.0-0
\
libgconf-2-4
\
libnss3
\
libasound2
\
libxtst6
\
libfuse2
\
libnotify-bin
\
libx11-dev
\
libxss1
\
libx11-xcb-dev
\
libxkbfile-dev
\
bc
\
bsdmainutils
\
libsecret-1-dev
# Xvfb
# Thanks https://medium.com/@griggheo/running-headless-selenium-webdriver-tests-in-docker-containers-342fdbabf756
ADD
./xvfb.init /etc/init.d/xvfb
RUN
chmod
+x /etc/init.d/xvfb
RUN
update-rc.d xvfb defaults
# dbus
RUN
ln
-sf
/bin/dbus-daemon /usr/bin/dbus-daemon
# nvm
ENV
NVM_DIR /usr/local/nvm
RUN
curl https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
# snapcraft
# From https://github.com/snapcore/snapcraft/tree/master/docker
RUN
apt-get update
&&
\
apt-get dist-upgrade
--yes
&&
\
apt-get
install
--yes
\
curl
sudo
squashfs-tools
&&
\
curl
-L
$(
curl
-H
'X-Ubuntu-Series: 16'
'https://api.snapcraft.io/api/v1/snaps/details/core'
| jq
'.download_url'
-r
)
--output
core.snap
&&
\
mkdir
-p
/snap/core
&&
unsquashfs
-d
/snap/core/current core.snap
&&
rm
core.snap
&&
\
curl
-L
$(
curl
-H
'X-Ubuntu-Series: 16'
'https://api.snapcraft.io/api/v1/snaps/details/snapcraft?channel=beta'
| jq
'.download_url'
-r
)
--output
snapcraft.snap
&&
\
mkdir
-p
/snap/snapcraft
&&
unsquashfs
-d
/snap/snapcraft/current snapcraft.snap
&&
rm
snapcraft.snap
&&
\
mkdir
-p
/snap/bin
&&
\
echo
"#!/bin/sh"
>
/snap/bin/snapcraft
&&
\
echo
'exec $SNAP/usr/bin/python3 $SNAP/bin/snapcraft "$@"'
>>
/snap/bin/snapcraft
&&
\
chmod
a+x /snap/bin/snapcraft
&&
\
apt-get autoclean
--yes
&&
\
apt-get clean
--yes
ENV
SNAP=/snap/snapcraft/current
ENV
SNAP_NAME=snapcraft
ENV
SNAP_VERSION=beta
ENV
PATH=/snap/bin:$PATH
# Required by click.
ENV
LC_ALL C.UTF-8
CMD
(service xvfb start; service dbus start; export DISPLAY=:10; ./start.sh "16.04")
\ No newline at end of file
build/tfs/linux/x64-snap/run-agent.sh
已删除
100755 → 0
浏览文件 @
c850728d
#!/bin/bash
if
[
!
-f
pat
]
;
then
echo
"Error: file pat not found"
exit
1
fi
docker run
\
-e
VSTS_ACCOUNT
=
"monacotools"
\
-e
VSTS_TOKEN
=
"
$(
cat
pat
)
"
\
-e
VSTS_AGENT
=
"tb-lnx-x64-snap"
\
-e
VSTS_POOL
=
"linux-x64-ubuntu-16-04-snap"
\
-e
VSTS_WORK
=
"/var/vsts/work"
\
--name
"tb-lnx-x64-snap"
\
-it
daimms-snap-agent:latest
\ No newline at end of file
build/tfs/linux/x64-snap/xvfb.init
已删除
100644 → 0
浏览文件 @
c850728d
#!/bin/bash
#
# /etc/rc.d/init.d/xvfbd
#
# chkconfig: 345 95 28
# description: Starts/Stops X Virtual Framebuffer server
# processname: Xvfb
#
### BEGIN INIT INFO
# Provides: xvfb
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start xvfb at boot time
# Description: Enable xvfb provided by daemon.
### END INIT INFO
[
"
${
NETWORKING
}
"
=
"no"
]
&&
exit
0
PROG
=
"/usr/bin/Xvfb"
PROG_OPTIONS
=
":10 -ac"
PROG_OUTPUT
=
"/tmp/Xvfb.out"
case
"
$1
"
in
start
)
echo
"Starting : X Virtual Frame Buffer "
$PROG
$PROG_OPTIONS
>>
$PROG_OUTPUT
2>&1 &
disown
-ar
;;
stop
)
echo
"Shutting down : X Virtual Frame Buffer"
killproc
$PROG
RETVAL
=
$?
[
$RETVAL
-eq
0
]
&&
/bin/rm
-f
/var/lock/subsys/Xvfb
/var/run/Xvfb.pid
echo
;;
restart|reload
)
$0
stop
$0
start
RETVAL
=
$?
;;
status
)
status Xvfb
RETVAL
=
$?
;;
*
)
echo
$"Usage:
$0
(start|stop|restart|reload|status)"
exit
1
esac
exit
$RETVAL
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录