From 75a07cfc7a8170b1579b4cda6822a6b7ae291d19 Mon Sep 17 00:00:00 2001 From: Jeremy Tellier - ROG Date: Thu, 16 Jul 2020 14:25:58 +0100 Subject: [PATCH 01/35] TimeStamp Files so there is not a processing error of the same file if clicked more than once. --- DesktopEdge/MainMenu.xaml.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DesktopEdge/MainMenu.xaml.cs b/DesktopEdge/MainMenu.xaml.cs index feec6188..f35ae09b 100644 --- a/DesktopEdge/MainMenu.xaml.cs +++ b/DesktopEdge/MainMenu.xaml.cs @@ -140,12 +140,13 @@ namespace ZitiDesktopEdge mailMessage.IsBodyHtml = true; mailMessage.Body = ""; - string serviceLogTempFile = Path.Combine(Path.GetTempPath(), "Ziti-Service.log"); + string timestamp = DateTime.Now.ToFileTime().ToString(); + string serviceLogTempFile = Path.Combine(Path.GetTempPath(), timestamp+"-Ziti-Service.log"); using (StreamWriter sw = new StreamWriter(serviceLogTempFile)) { sw.WriteLine(client.GetLogs()); } - string uiLogTempFile = Path.Combine(Path.GetTempPath(), "Ziti-Application.log"); + string uiLogTempFile = Path.Combine(Path.GetTempPath(), timestamp+"-Ziti-Application.log"); using (StreamWriter sw = new StreamWriter(uiLogTempFile)) { sw.WriteLine(UILog.GetLogs()); } @@ -153,7 +154,7 @@ namespace ZitiDesktopEdge mailMessage.Attachments.Add(new Attachment(serviceLogTempFile)); mailMessage.Attachments.Add(new Attachment(uiLogTempFile)); - string emlFile = Path.Combine(Path.GetTempPath(), "ziti.eml"); + string emlFile = Path.Combine(Path.GetTempPath(), timestamp+"-ziti.eml"); using (var filestream = File.Open(emlFile, FileMode.Create)) { var binaryWriter = new BinaryWriter(filestream); From 636177ac9792ee3652a67e37aefc6b66295a1300 Mon Sep 17 00:00:00 2001 From: Jeremy Tellier - ROG Date: Thu, 16 Jul 2020 19:18:39 +0100 Subject: [PATCH 02/35] Confirmation from 1999 to 2020 --- DesktopEdge/IdentityDetails.xaml | 33 +++++++++++++++++++ DesktopEdge/IdentityDetails.xaml.cs | 50 +++++++++++++++-------------- 2 files changed, 59 insertions(+), 24 deletions(-) diff --git a/DesktopEdge/IdentityDetails.xaml b/DesktopEdge/IdentityDetails.xaml index eeb2d905..11aafaba 100644 --- a/DesktopEdge/IdentityDetails.xaml +++ b/DesktopEdge/IdentityDetails.xaml @@ -51,5 +51,38 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DesktopEdge/IdentityDetails.xaml.cs b/DesktopEdge/IdentityDetails.xaml.cs index fc47e1b0..403fb727 100644 --- a/DesktopEdge/IdentityDetails.xaml.cs +++ b/DesktopEdge/IdentityDetails.xaml.cs @@ -99,35 +99,37 @@ namespace ZitiDesktopEdge { MainDetailScroll.Height = height; } - private void ForgetIdentity(object sender, MouseButtonEventArgs e) { - // Jeremy - this works now as long as you pass a fingerprint that's valid! - UIModel.HideOnLostFocus = false; - MessageBoxResult messageBoxResult = MessageBox.Show("Are you sure you want to forget this identity?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo); - UIModel.HideOnLostFocus = true; - if (messageBoxResult == MessageBoxResult.Yes) { - this.Visibility = Visibility.Collapsed; - ServiceClient.Client client = (ServiceClient.Client)Application.Current.Properties["ServiceClient"]; - try { - client.RemoveIdentity(_identity.Fingerprint); + private void CancelConfirm(object sender, MouseButtonEventArgs e) { + ConfirmView.Visibility = Visibility.Collapsed; + } - ZitiIdentity forgotten = new ZitiIdentity(); - foreach (var id in identities) { - if (id.Fingerprint == _identity.Fingerprint) { - forgotten = id; - identities.Remove(id); - break; - } - } + private void ConfirmForget(object sender, MouseButtonEventArgs e) { + this.Visibility = Visibility.Collapsed; + ServiceClient.Client client = (ServiceClient.Client)Application.Current.Properties["ServiceClient"]; + try { + client.RemoveIdentity(_identity.Fingerprint); - if (OnForgot != null) { - OnForgot(forgotten); + ZitiIdentity forgotten = new ZitiIdentity(); + foreach (var id in identities) { + if (id.Fingerprint == _identity.Fingerprint) { + forgotten = id; + identities.Remove(id); + break; } - } catch (ServiceClient.ServiceException se) { - OnError(se.Message); - } catch (Exception ex) { - OnError(ex.Message); } + + if (OnForgot != null) { + OnForgot(forgotten); + } + } catch (ServiceClient.ServiceException se) { + OnError(se.Message); + } catch (Exception ex) { + OnError(ex.Message); } } + + private void ForgetIdentity(object sender, MouseButtonEventArgs e) { + ConfirmView.Visibility = Visibility.Visible; + } } } From a49ff63a0f71682e0c00db080b68ac987df81f79 Mon Sep 17 00:00:00 2001 From: Jeremy Tellier - ROG Date: Mon, 27 Jul 2020 15:56:42 +0100 Subject: [PATCH 03/35] Fix widths on list --- DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml b/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml index 1fe5b1dd..c6a7806c 100644 --- a/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml +++ b/DesktopEdge/Views/ItemRenderers/ServiceInfo.xaml @@ -14,8 +14,8 @@ - - + + From df653a477328f27a72c2188f544cced709ce9163 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Wed, 29 Jul 2020 15:41:34 -0400 Subject: [PATCH 04/35] attempt better dns recovery --- service/cziti/dns-proxy.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/service/cziti/dns-proxy.go b/service/cziti/dns-proxy.go index 4c67a038..b180d2b9 100644 --- a/service/cziti/dns-proxy.go +++ b/service/cziti/dns-proxy.go @@ -20,7 +20,9 @@ package cziti import ( "fmt" "github.com/miekg/dns" + "io" "net" + "os" "time" "github.com/openziti/desktop-edge-win/service/cziti/windns" ) @@ -155,16 +157,16 @@ func proxyDNS(req *dns.Msg, peer *net.UDPAddr, serv *net.UDPConn) { } } -func dnsPanicRecover(dnsServers []string) { - //just rerun the dns proxy function - go runDNSproxy(dnsServers) +func dnsPanicRecover() { + // get dns again and reconfigure + go runDNSproxy(windns.GetUpstreamDNS()) } func runDNSproxy(dnsServers []string) { defer func() { if r := recover(); r != nil { log.Errorf("Recovered in f. %v", r) - dnsPanicRecover(dnsServers) + dnsPanicRecover() } }() @@ -193,7 +195,12 @@ func runDNSproxy(dnsServers []string) { for { n, err := proxy.Read(resp) if err != nil { - log.Debug("error receiving from ", proxy.RemoteAddr(), err) + // something is wrong with the DNS connection panic and let DNS recovery kick in + if err == io.EOF || err == os.ErrClosed || err.Error() == "use of closed network connection" { + log.Panicf("error receiving from ", proxy.RemoteAddr(), err) + } else { + log.Panicf("UNEXPECTED error receiving from ", proxy.RemoteAddr(), err) + } } else { respChan <- resp[:n] } From f8d46c6e6afa223af8073bf92f18b1dc3b9f9bd7 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Thu, 30 Jul 2020 09:14:15 -0400 Subject: [PATCH 05/35] add a small msg when building 'quick' --- service/build.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/service/build.bat b/service/build.bat index 5120c060..79c7e25d 100644 --- a/service/build.bat +++ b/service/build.bat @@ -24,6 +24,7 @@ rmdir /s /q deps del /q %SVC_ROOT_DIR%ziti.dll :QUICK +echo doing 'quick' build - no tunneler sdk/c sdk build cd %SVC_ROOT_DIR% SET REPO_URL=https://github.com/openziti/ziti-tunneler-sdk-c.git From 6401bd7526ec0b587a72cb642c62646c4c2fe1d9 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:13:34 -0400 Subject: [PATCH 06/35] minor build.bat updates --- service/build.bat | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/service/build.bat b/service/build.bat index 79c7e25d..ee7d36d2 100644 --- a/service/build.bat +++ b/service/build.bat @@ -46,6 +46,7 @@ echo --------------------------------------------------------------------------- set BEFORE_GIT=%cd% +pushd %TUNNELER_SDK_DIR% if exist %TUNNELER_SDK_DIR% ( echo ------------------------------------------------------------------------------ echo issuing git pull to pick up any changes @@ -53,10 +54,18 @@ if exist %TUNNELER_SDK_DIR% ( git pull git submodule update --init --recursive SET ACTUAL_ERR=%ERRORLEVEL% + IF %ACTUAL_ERR% NEQ 0 ( + echo. + echo Could not pull git repo??? : %REPO_URL% + echo. + goto FAIL + ) + echo git clone is complete and ERRORLEVEL was: %ACTUAL_ERR% echo ------------------------------------------------------------------------------ ) else ( echo ------------------------------------------------------------------------------ - echo cloning %REPO_URL% + echo %TUNNELER_SDK_DIR% not found + echo - cloning %REPO_URL% echo ------------------------------------------------------------------------------ echo issuing mkdir %TUNNELER_SDK_DIR% mkdir %TUNNELER_SDK_DIR% @@ -65,17 +74,23 @@ if exist %TUNNELER_SDK_DIR% ( cd %TUNNELER_SDK_DIR% echo current directory is %CD% - should be %TUNNELER_SDK_DIR% + echo. + echo git clone %REPO_URL% %TUNNELER_SDK_DIR% --recurse-submodules + echo. + + git clone %REPO_URL% %TUNNELER_SDK_DIR% --recurse-submodules SET ACTUAL_ERR=%ERRORLEVEL% -) -IF %ACTUAL_ERR% NEQ 0 ( - echo. - echo Could not pull or clone git repo:%REPO_URL% - echo. - goto FAIL + IF %ACTUAL_ERR% NEQ 0 ( + echo. + echo Could not clone git repo??? : %REPO_URL% + echo. + goto FAIL + ) + echo git clone is complete and ERRORLEVEL was: %ACTUAL_ERR% ) -echo checking out branch: %ZITI_TUNNEL_REPO_BRANCH% +echo in %cd% - checking out branch: %ZITI_TUNNEL_REPO_BRANCH% git checkout %ZITI_TUNNEL_REPO_BRANCH% IF %ERRORLEVEL% NEQ 0 ( SET ACTUAL_ERR=%ERRORLEVEL% @@ -84,6 +99,7 @@ IF %ERRORLEVEL% NEQ 0 ( echo. goto FAIL ) +popd echo ------------------------------------------------------------------------------ type %TUNNELER_SDK_DIR%.gitmodules From bd5b402a93ba356fd7a4344c92c22e1178149f4b Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:17:39 -0400 Subject: [PATCH 07/35] small log fix as well as not logging the ipv6 legacy from windows --- service/cziti/ctun.go | 4 ++-- service/cziti/dns-proxy.go | 9 ++++++++- service/cziti/sdk.go | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/service/cziti/ctun.go b/service/cziti/ctun.go index eb3db76d..2e1e088f 100644 --- a/service/cziti/ctun.go +++ b/service/cziti/ctun.go @@ -150,13 +150,13 @@ func netifSetup(h C.netif_handle, l *C.uv_loop_t, packetCb C.packet_cb, ctx unsa t.read = (*C.uv_async_t)(C.calloc(1, C.sizeof_uv_async_t)) C.uv_async_init(l, t.read, C.uv_async_cb(C.readAsync)) t.read.data = unsafe.Pointer(h) - log.Debugf("in netifSetup netif[%s] handle[%p]", C.GoString(h.id), h) + log.Debugf("in netifSetup netif[%s] handle[%p] before", C.GoString(h.id), h) t.idleR = (*C.uv_prepare_t)(C.calloc(1, C.sizeof_uv_prepare_t)) C.uv_prepare_init(l, t.idleR) t.idleR.data = unsafe.Pointer(h) C.uv_prepare_start(t.idleR, C.uv_prepare_cb(C.readIdle)) - log.Debugf("in netifSetup netif[%s] handle[%p]", C.GoString(h.id), h) + log.Debugf("in netifSetup netif[%s] handle[%p] after", C.GoString(h.id), h) t.onPacket = packetCb t.onPacketCtx = ctx diff --git a/service/cziti/dns-proxy.go b/service/cziti/dns-proxy.go index b180d2b9..4d63c489 100644 --- a/service/cziti/dns-proxy.go +++ b/service/cziti/dns-proxy.go @@ -23,6 +23,7 @@ import ( "io" "net" "os" + "strings" "time" "github.com/openziti/desktop-edge-win/service/cziti/windns" ) @@ -174,7 +175,13 @@ func runDNSproxy(dnsServers []string) { for _, s := range dnsServers { sAddr, err := net.ResolveUDPAddr("udp", fmt.Sprintf("%s:53", s)) if err != nil { - log.Debugf("skipping upstream: %s, %v", s, err.Error()) + // fec0:0:0:ffff:: is 'legacy' from windows apparently... + // see: https://en.wikipedia.org/wiki/IPv6_address#Deprecated_and_obsolete_addresses_2 + if ! strings.HasPrefix(s, "fec0:0:0:ffff::") { + log.Debugf("skipping upstream: %s, %v", s, err.Error()) + } else { + // just ignore for now - don't even log it... + } } else { log.Debugf("adding upstream dns server: %s", s) conn, err := net.DialUDP("udp", nil, sAddr) diff --git a/service/cziti/sdk.go b/service/cziti/sdk.go index 83e1f822..c0fcc824 100644 --- a/service/cziti/sdk.go +++ b/service/cziti/sdk.go @@ -200,6 +200,8 @@ func serviceCB(_ C.ziti_context, service *C.ziti_service, status C.int, data uns Service: &added, ZitiContext: ctx, } + } else { + log.Debugf("service named %s is not enabled for 'tunneling'", name) } } } From 7bf7fb77da37559954d6aa2139b664dc78d1fae3 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:38:00 -0400 Subject: [PATCH 08/35] fix mtu to not overflow uint16 --- service/ziti-tunnel/service/ipc.go | 4 ++-- service/ziti-tunnel/service/state.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/ziti-tunnel/service/ipc.go b/service/ziti-tunnel/service/ipc.go index c55c5eff..bbe122f0 100644 --- a/service/ziti-tunnel/service/ipc.go +++ b/service/ziti-tunnel/service/ipc.go @@ -259,12 +259,12 @@ func setTunInfo(s *dto.TunnelStatus, ipv4 string, ipv4mask int) { log.Errorf("error reading MTU - using 0 for MTU: (%v)", err) mtu = 0 } - + umtu := uint16(mtu) //set the tun info into the state s.IpInfo = &dto.TunIpInfo{ Ip: ipv4, DNS: Ipv4dns, - MTU: uint16(mtu), + MTU: umtu, Subnet: ipv4MaskString(ipnet.Mask), } } diff --git a/service/ziti-tunnel/service/state.go b/service/ziti-tunnel/service/state.go index 4e86942c..a46b9ea2 100644 --- a/service/ziti-tunnel/service/state.go +++ b/service/ziti-tunnel/service/state.go @@ -120,7 +120,7 @@ func (t *RuntimeState) CreateTun(ipv4 string, ipv4mask int) error { } log.Infof("creating TUN device: %s", TunName) - tunDevice, err := tun.CreateTUN(TunName, 64*1024) + tunDevice, err := tun.CreateTUN(TunName, 64*1024 - 1) if err == nil { t.tun = &tunDevice tunName, err2 := tunDevice.Name() From 020f8551f3956e187dc622f20db901f02f381e11 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:48:52 -0400 Subject: [PATCH 09/35] more build.bat tweaks --- service/build.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/service/build.bat b/service/build.bat index ee7d36d2..0d96136c 100644 --- a/service/build.bat +++ b/service/build.bat @@ -8,7 +8,10 @@ cd /d %ZITI_TUNNEL_WIN_ROOT% IF "%BUILD_VERSION%"=="" GOTO BUILD_VERSION_ERROR IF "%1"=="clean" GOTO CLEAN -IF "%1"=="quick" GOTO QUICK +IF "%1"=="quick" ( + echo doing 'quick' build - no tunneler sdk/c sdk build + GOTO QUICK +) echo fetching ziti-ci call %SVC_ROOT_DIR%/../get-ziti-ci.bat @@ -24,7 +27,6 @@ rmdir /s /q deps del /q %SVC_ROOT_DIR%ziti.dll :QUICK -echo doing 'quick' build - no tunneler sdk/c sdk build cd %SVC_ROOT_DIR% SET REPO_URL=https://github.com/openziti/ziti-tunneler-sdk-c.git From 4fdbcfd4a455546ac655c2bbc1b5b4b61ba0731b Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 11:59:42 -0400 Subject: [PATCH 10/35] folder doesn't exist in CI. update build.bat again --- service/build.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/build.bat b/service/build.bat index 0d96136c..0e811dad 100644 --- a/service/build.bat +++ b/service/build.bat @@ -48,8 +48,8 @@ echo --------------------------------------------------------------------------- set BEFORE_GIT=%cd% -pushd %TUNNELER_SDK_DIR% if exist %TUNNELER_SDK_DIR% ( + pushd %TUNNELER_SDK_DIR% echo ------------------------------------------------------------------------------ echo issuing git pull to pick up any changes echo ------------------------------------------------------------------------------ @@ -71,6 +71,7 @@ if exist %TUNNELER_SDK_DIR% ( echo ------------------------------------------------------------------------------ echo issuing mkdir %TUNNELER_SDK_DIR% mkdir %TUNNELER_SDK_DIR% + pushd %TUNNELER_SDK_DIR% echo changing to %TUNNELER_SDK_DIR% cd %TUNNELER_SDK_DIR% From 9f067d56bf094dcfc8cc85dc5e1a7cd5457a97c1 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:06:55 -0400 Subject: [PATCH 11/35] man debugging travis is a pain --- service/build.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/service/build.bat b/service/build.bat index 0e811dad..47f95171 100644 --- a/service/build.bat +++ b/service/build.bat @@ -49,6 +49,7 @@ echo --------------------------------------------------------------------------- set BEFORE_GIT=%cd% if exist %TUNNELER_SDK_DIR% ( + echo %TUNNELER_SDK_DIR% supposedly exists? pushd %TUNNELER_SDK_DIR% echo ------------------------------------------------------------------------------ echo issuing git pull to pick up any changes From 3fc44468500ed0551a23cc39cd917786cce7bb19 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:16:14 -0400 Subject: [PATCH 12/35] still don't see what travis doesn't like --- service/build.bat | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/service/build.bat b/service/build.bat index 47f95171..b5dc12f8 100644 --- a/service/build.bat +++ b/service/build.bat @@ -15,10 +15,11 @@ IF "%1"=="quick" ( echo fetching ziti-ci call %SVC_ROOT_DIR%/../get-ziti-ci.bat +echo ziti-ci has been retrieved. running: ziti-ci version ziti-ci version -echo generating version info - this will pushed from publish.bat in CI -ziti-ci generate-build-info --noAddNoCommit --useVersion=false %SVC_ROOT_DIR%/ziti-tunnel/version.go main --verbose +echo generating version info - this will get pushed from publish.bat in CI _if_ publish.bat started build.bat +ziti-ci generate-build-info --noAddNoCommit --useVersion=false %SVC_ROOT_DIR%/ziti-tunnel/version.go main --verbose 2>&1 echo version info generated goto QUICK @@ -27,13 +28,14 @@ rmdir /s /q deps del /q %SVC_ROOT_DIR%ziti.dll :QUICK +echo changing to service folder: %SVC_ROOT_DIR% cd %SVC_ROOT_DIR% SET REPO_URL=https://github.com/openziti/ziti-tunneler-sdk-c.git SET ZITI_TUNNEL_REPO_BRANCH=master SET TUNNELER_SDK_DIR=%SVC_ROOT_DIR%deps\ziti-tunneler-sdk-c\ -set CGO_CFLAGS=-DNOGDI -I %TUNNELER_SDK_DIR%install\include -set CGO_LDFLAGS=-L %TUNNELER_SDK_DIR%install\lib +SET CGO_CFLAGS=-DNOGDI -I %TUNNELER_SDK_DIR%install\include +SET CGO_LDFLAGS=-L %TUNNELER_SDK_DIR%install\lib if exist %SVC_ROOT_DIR%ziti.dll ( echo ------------------------------------------------------------------------------ @@ -47,7 +49,7 @@ echo BUILDING ziti.dll begins echo ------------------------------------------------------------------------------ set BEFORE_GIT=%cd% - +echo about to enter the 'if exist %TUNNELER_SDK_DIR%'' block: if exist %TUNNELER_SDK_DIR% ( echo %TUNNELER_SDK_DIR% supposedly exists? pushd %TUNNELER_SDK_DIR% From 20f74685a9344e8af1a7cbf681ce452720682dcd Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:21:21 -0400 Subject: [PATCH 13/35] does pushd and popd really cause issues? --- service/build.bat | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/service/build.bat b/service/build.bat index b5dc12f8..4da837d2 100644 --- a/service/build.bat +++ b/service/build.bat @@ -52,7 +52,7 @@ set BEFORE_GIT=%cd% echo about to enter the 'if exist %TUNNELER_SDK_DIR%'' block: if exist %TUNNELER_SDK_DIR% ( echo %TUNNELER_SDK_DIR% supposedly exists? - pushd %TUNNELER_SDK_DIR% + cd %TUNNELER_SDK_DIR% echo ------------------------------------------------------------------------------ echo issuing git pull to pick up any changes echo ------------------------------------------------------------------------------ @@ -74,7 +74,6 @@ if exist %TUNNELER_SDK_DIR% ( echo ------------------------------------------------------------------------------ echo issuing mkdir %TUNNELER_SDK_DIR% mkdir %TUNNELER_SDK_DIR% - pushd %TUNNELER_SDK_DIR% echo changing to %TUNNELER_SDK_DIR% cd %TUNNELER_SDK_DIR% @@ -83,8 +82,7 @@ if exist %TUNNELER_SDK_DIR% ( echo. echo git clone %REPO_URL% %TUNNELER_SDK_DIR% --recurse-submodules echo. - - + git clone %REPO_URL% %TUNNELER_SDK_DIR% --recurse-submodules SET ACTUAL_ERR=%ERRORLEVEL% IF %ACTUAL_ERR% NEQ 0 ( @@ -105,7 +103,8 @@ IF %ERRORLEVEL% NEQ 0 ( echo. goto FAIL ) -popd + +echo "clone or checkout complete." echo ------------------------------------------------------------------------------ type %TUNNELER_SDK_DIR%.gitmodules From b91769649e7f2a09939847cff5c55f131cee04b4 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:32:58 -0400 Subject: [PATCH 14/35] update build files more --- service/build.bat | 4 ++-- service/publish.bat | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/service/build.bat b/service/build.bat index 4da837d2..6b3486dd 100644 --- a/service/build.bat +++ b/service/build.bat @@ -49,7 +49,7 @@ echo BUILDING ziti.dll begins echo ------------------------------------------------------------------------------ set BEFORE_GIT=%cd% -echo about to enter the 'if exist %TUNNELER_SDK_DIR%'' block: +echo about to enter the 'if exist %TUNNELER_SDK_DIR%' block: if exist %TUNNELER_SDK_DIR% ( echo %TUNNELER_SDK_DIR% supposedly exists? cd %TUNNELER_SDK_DIR% @@ -87,7 +87,7 @@ if exist %TUNNELER_SDK_DIR% ( SET ACTUAL_ERR=%ERRORLEVEL% IF %ACTUAL_ERR% NEQ 0 ( echo. - echo Could not clone git repo??? : %REPO_URL% + echo Could not clone git repo??? : %ACTUAL_ERR% %REPO_URL% echo. goto FAIL ) diff --git a/service/publish.bat b/service/publish.bat index 72743dd9..56fc3545 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -19,13 +19,13 @@ if %ACTUAL_ERR% NEQ 0 ( IF "%GIT_BRANCH%"=="master" GOTO RELEASE @echo Publishing to snapshot repo -ziti-ci publish artifactory --groupId=ziti-tunnel-win.amd64.windows --artifactId=ziti-tunnel-win --version=%BUILD_VERSION%-SNAPSHOT --target=service/ziti-tunnel-win.zip -REM ziti-ci publish artifactory --groupId=ziti-tunnel-win.amd64.windows --artifactId=ziti-tunnel-win --version=%BUILD_VERSION%-SNAPSHOT --target=service/ziti-tunnel-win.zip --classifier=%GIT_BRANCH% +ziti-ci publish artifactory --groupId=ziti-tunnel-win.amd64.windows --artifactId=ziti-tunnel-win --version=%BUILD_VERSION%-SNAPSHOT --target=service/ziti-tunnel-win.zip 2>&1 +REM ziti-ci publish artifactory --groupId=ziti-tunnel-win.amd64.windows --artifactId=ziti-tunnel-win --version=%BUILD_VERSION%-SNAPSHOT --target=service/ziti-tunnel-win.zip --classifier=%GIT_BRANCH% 2>&1 GOTO END :RELEASE @echo Publishing release -ziti-ci publish artifactory --groupId=ziti-tunnel-win.amd64.windows --artifactId=ziti-tunnel-win --version=%BUILD_VERSION% --target=service/ziti-tunnel-win.zip +ziti-ci publish artifactory --groupId=ziti-tunnel-win.amd64.windows --artifactId=ziti-tunnel-win --version=%BUILD_VERSION% --target=service/ziti-tunnel-win.zip 2>&1 GOTO END :BUILD_VERSION_ERROR From 9bdba665cd0ab3cae93e13523000e8c0abe0e04c Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:44:45 -0400 Subject: [PATCH 15/35] this is tiresome... --- service/build.bat | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/service/build.bat b/service/build.bat index 6b3486dd..06c4ab21 100644 --- a/service/build.bat +++ b/service/build.bat @@ -49,7 +49,15 @@ echo BUILDING ziti.dll begins echo ------------------------------------------------------------------------------ set BEFORE_GIT=%cd% -echo about to enter the 'if exist %TUNNELER_SDK_DIR%' block: +echo about to enter the 'if exist %TUNNELER_SDK_DIR%' block + +if exist %TUNNELER_SDK_DIR% ( + echo xxxxxxx: it existed +) else ( + echo xxxxxxx: it did not existed +) +echo about to enter the 'if exist %TUNNELER_SDK_DIR%' block again + if exist %TUNNELER_SDK_DIR% ( echo %TUNNELER_SDK_DIR% supposedly exists? cd %TUNNELER_SDK_DIR% From 2600cf4fd1f42bb3b371137aaf34d7874293ca99 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:07:30 -0400 Subject: [PATCH 16/35] nested if's the issue? --- service/build.bat | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/service/build.bat b/service/build.bat index 06c4ab21..72ee6936 100644 --- a/service/build.bat +++ b/service/build.bat @@ -49,14 +49,6 @@ echo BUILDING ziti.dll begins echo ------------------------------------------------------------------------------ set BEFORE_GIT=%cd% -echo about to enter the 'if exist %TUNNELER_SDK_DIR%' block - -if exist %TUNNELER_SDK_DIR% ( - echo xxxxxxx: it existed -) else ( - echo xxxxxxx: it did not existed -) -echo about to enter the 'if exist %TUNNELER_SDK_DIR%' block again if exist %TUNNELER_SDK_DIR% ( echo %TUNNELER_SDK_DIR% supposedly exists? @@ -67,13 +59,6 @@ if exist %TUNNELER_SDK_DIR% ( git pull git submodule update --init --recursive SET ACTUAL_ERR=%ERRORLEVEL% - IF %ACTUAL_ERR% NEQ 0 ( - echo. - echo Could not pull git repo??? : %REPO_URL% - echo. - goto FAIL - ) - echo git clone is complete and ERRORLEVEL was: %ACTUAL_ERR% echo ------------------------------------------------------------------------------ ) else ( echo ------------------------------------------------------------------------------ @@ -93,14 +78,15 @@ if exist %TUNNELER_SDK_DIR% ( git clone %REPO_URL% %TUNNELER_SDK_DIR% --recurse-submodules SET ACTUAL_ERR=%ERRORLEVEL% - IF %ACTUAL_ERR% NEQ 0 ( - echo. - echo Could not clone git repo??? : %ACTUAL_ERR% %REPO_URL% - echo. - goto FAIL - ) - echo git clone is complete and ERRORLEVEL was: %ACTUAL_ERR% ) +IF %ACTUAL_ERR% NEQ 0 ( + echo. + echo Could not pull or clone git repo:%REPO_URL% + echo. + goto FAIL +) + +echo checking out branch: %ZITI_TUNNEL_REPO_BRANCH% echo in %cd% - checking out branch: %ZITI_TUNNEL_REPO_BRANCH% git checkout %ZITI_TUNNEL_REPO_BRANCH% From 0c2794f3f3fe8c40f915d1055f749762f0d41f75 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:28:57 -0400 Subject: [PATCH 17/35] see if i can get a sha1sum from travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 24c429f7..35ecae1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,5 @@ before_script: - export GIT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) script: - - service/publish.bat \ No newline at end of file + - service/publish.bat + - sha1sum <<< "bob" \ No newline at end of file From dce3991b4c47feead21b0d5ebe7fb3ef6f89cf46 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:30:53 -0400 Subject: [PATCH 18/35] add sha1has to bat file to see if it works there --- service/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/build.bat b/service/build.bat index 72ee6936..25a97902 100644 --- a/service/build.bat +++ b/service/build.bat @@ -51,7 +51,7 @@ echo --------------------------------------------------------------------------- set BEFORE_GIT=%cd% if exist %TUNNELER_SDK_DIR% ( - echo %TUNNELER_SDK_DIR% supposedly exists? + echo %TUNNELER_SDK_DIR% exists cd %TUNNELER_SDK_DIR% echo ------------------------------------------------------------------------------ echo issuing git pull to pick up any changes From 801b23451d03f751726e7a50aeb0971773d25b03 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:36:51 -0400 Subject: [PATCH 19/35] hash the key to make sure it's right --- service/publish.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/service/publish.bat b/service/publish.bat index 56fc3545..85511e0a 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -49,6 +49,8 @@ echo configuring git - relies on build.bat successfully grabbing ziti-ci and bui ziti-ci configure-git 2>&1 @echo publishing complete - committing version.go as ci +sha1sum <<< "bob" +@echo sha1sum was on path. nice git checkout %GIT_BRANCH% 2>&1 CALL :FAIL %ERRORLEVEL% "checkout failed" From ecbdf96af531d659028494967302995c7508cf3d Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:42:36 -0400 Subject: [PATCH 20/35] get the hash of the key --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 35ecae1c..89a9c5f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ before_script: script: - service/publish.bat - - sha1sum <<< "bob" \ No newline at end of file + - sha1sum <<< $gh_ci_key \ No newline at end of file From c96499323e3adb9d12e9a9b430024028b375b064 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:44:49 -0400 Subject: [PATCH 21/35] get the hash sooner than later --- .travis.yml | 2 +- service/publish.bat | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89a9c5f7..fbd39ee1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,5 @@ before_script: - export GIT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) script: - - service/publish.bat + - sha1sum <<< $gh_ci_key \ No newline at end of file diff --git a/service/publish.bat b/service/publish.bat index 85511e0a..56fc3545 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -49,8 +49,6 @@ echo configuring git - relies on build.bat successfully grabbing ziti-ci and bui ziti-ci configure-git 2>&1 @echo publishing complete - committing version.go as ci -sha1sum <<< "bob" -@echo sha1sum was on path. nice git checkout %GIT_BRANCH% 2>&1 CALL :FAIL %ERRORLEVEL% "checkout failed" From 94569c94be475dfe5f85db9cf5a4cadeacfee936 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:55:14 -0400 Subject: [PATCH 22/35] get the sha of the file now --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fbd39ee1..c6d36b69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,5 @@ before_script: - export GIT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) script: - - - sha1sum <<< $gh_ci_key \ No newline at end of file + - service/publish.bat + - sha1sum < github_deploy_key \ No newline at end of file From a9cf04965f38fc8d88d654985eb18bc086e0ad34 Mon Sep 17 00:00:00 2001 From: ziti-ci Date: Fri, 31 Jul 2020 14:08:54 -0400 Subject: [PATCH 23/35] change back to the root folder to commit --- .travis.yml | 3 +-- service/publish.bat | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6d36b69..24c429f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,4 @@ before_script: - export GIT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) script: - - service/publish.bat - - sha1sum < github_deploy_key \ No newline at end of file + - service/publish.bat \ No newline at end of file diff --git a/service/publish.bat b/service/publish.bat index 56fc3545..cf346bb0 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -8,13 +8,13 @@ IF "%BUILD_VERSION%"=="" GOTO BUILD_VERSION_ERROR call %SVC_ROOT_DIR%\build.bat SET ACTUAL_ERR=%ERRORLEVEL% if %ACTUAL_ERR% NEQ 0 ( - echo. - echo call to build.bat failed with %ACTUAL_ERR% - echo. + @echo. + @echo call to build.bat failed with %ACTUAL_ERR% + @echo. exit /b 1 ) else ( - echo. - echo result of ninja build: %ACTUAL_ERR% + @echo. + @echo result of ninja build: %ACTUAL_ERR% ) IF "%GIT_BRANCH%"=="master" GOTO RELEASE @@ -34,18 +34,18 @@ exit /b 1 :FAIL IF %~1 NEQ 0 ( - echo ================================================================ - echo. - echo FAILURE: - echo %~2 - echo. - echo ================================================================ + @echo ================================================================ + @echo. + @echo FAILURE: + @echo %~2 + @echo. + @echo ================================================================ exit /b %~1 ) exit /b 0 :END -echo configuring git - relies on build.bat successfully grabbing ziti-ci and build.bat updating service/ziti-tunnel/version.go +@echo configuring git - relies on build.bat successfully grabbing ziti-ci and build.bat updating service/ziti-tunnel/version.go ziti-ci configure-git 2>&1 @echo publishing complete - committing version.go as ci @@ -70,9 +70,11 @@ CALL :FAIL %ERRORLEVEL% "git commit failed" @echo issuing git status and push now @echo ======================================================== git status 2>&1 + +cd %CURDIR% +@echo back at: %CURDIR% + git push 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% - -cd %CURDIR% @echo publish script has completed From d08bab88452b13db7577dde1e2f89387e305a6a4 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 14:58:50 -0400 Subject: [PATCH 24/35] trying to appease travis' shallow clone --- service/publish.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/publish.bat b/service/publish.bat index cf346bb0..09c85ebb 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -53,6 +53,10 @@ ziti-ci configure-git 2>&1 git checkout %GIT_BRANCH% 2>&1 CALL :FAIL %ERRORLEVEL% "checkout failed" +@echo converting shallow clone so travis can co: %GIT_BRANCH% +git remote set-branches origin %GIT_BRANCH% 2>&1 +git fetch --depth 1 origin %GIT_BRANCH% 2>&1 +git checkout %GIT_BRANCH% 2>&1 @echo git checkout %GIT_BRANCH% complete: %ERRORLEVEL% git add service/ziti-tunnel/version.go 2>&1 From bc55633538ac8dbc9182a3e3f01b738abdfa3da4 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 15:14:27 -0400 Subject: [PATCH 25/35] move the co --- service/publish.bat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/service/publish.bat b/service/publish.bat index 09c85ebb..ef7d8346 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -50,13 +50,11 @@ ziti-ci configure-git 2>&1 @echo publishing complete - committing version.go as ci -git checkout %GIT_BRANCH% 2>&1 -CALL :FAIL %ERRORLEVEL% "checkout failed" - @echo converting shallow clone so travis can co: %GIT_BRANCH% git remote set-branches origin %GIT_BRANCH% 2>&1 git fetch --depth 1 origin %GIT_BRANCH% 2>&1 git checkout %GIT_BRANCH% 2>&1 +CALL :FAIL %ERRORLEVEL% "checkout failed" @echo git checkout %GIT_BRANCH% complete: %ERRORLEVEL% git add service/ziti-tunnel/version.go 2>&1 From 241fc497a700ed0f228840bb0495e9ec61ad5599 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 15:23:35 -0400 Subject: [PATCH 26/35] move where the cd happens further up --- service/publish.bat | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/service/publish.bat b/service/publish.bat index ef7d8346..33992f7b 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -49,6 +49,8 @@ exit /b 0 ziti-ci configure-git 2>&1 @echo publishing complete - committing version.go as ci +cd %CURDIR% +@echo back at: %CURDIR% @echo converting shallow clone so travis can co: %GIT_BRANCH% git remote set-branches origin %GIT_BRANCH% 2>&1 @@ -73,9 +75,6 @@ CALL :FAIL %ERRORLEVEL% "git commit failed" @echo ======================================================== git status 2>&1 -cd %CURDIR% -@echo back at: %CURDIR% - git push 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% From 5cc7f65a85134f8069457c09a74b9fc4cf855a6f Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 15:39:12 -0400 Subject: [PATCH 27/35] still trying to get travis to push! --- service/publish.bat | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/service/publish.bat b/service/publish.bat index 33992f7b..ef0428d9 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -45,12 +45,15 @@ IF %~1 NEQ 0 ( exit /b 0 :END -@echo configuring git - relies on build.bat successfully grabbing ziti-ci and build.bat updating service/ziti-tunnel/version.go -ziti-ci configure-git 2>&1 @echo publishing complete - committing version.go as ci +@echo changing back to: %CURDIR% cd %CURDIR% -@echo back at: %CURDIR% +@echo current dir: %CD% + +@echo configuring git - relies on build.bat successfully grabbing ziti-ci and build.bat updating service/ziti-tunnel/version.go +ziti-ci configure-git 2>&1 +dir *github_* @echo converting shallow clone so travis can co: %GIT_BRANCH% git remote set-branches origin %GIT_BRANCH% 2>&1 @@ -59,22 +62,27 @@ git checkout %GIT_BRANCH% 2>&1 CALL :FAIL %ERRORLEVEL% "checkout failed" @echo git checkout %GIT_BRANCH% complete: %ERRORLEVEL% +@echo issuing status, diff +@echo ======================================================== +git status 2>&1 +git diff 2>&1 + git add service/ziti-tunnel/version.go 2>&1 CALL :FAIL %ERRORLEVEL% "git add failed" @echo git add service/ziti-tunnel/version.go complete: %ERRORLEVEL% -@echo issuing status, diff, commit -@echo ======================================================== -git status 2>&1 -git diff 2>&1 +@echo issuing commit git commit -m "[ci skip] committing updated version information" 2>&1 CALL :FAIL %ERRORLEVEL% "git commit failed" @echo git commit -m "[ci skip] committing updated version information" complete: %ERRORLEVEL% +@echo ======================================================== -@echo issuing git status and push now + + + +@echo issuing git status and push @echo ======================================================== git status 2>&1 - git push 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% From 8e21138c5ce44b399eda2c52fd11d910b6efd90e Mon Sep 17 00:00:00 2001 From: ziti-ci Date: Fri, 31 Jul 2020 16:04:37 -0400 Subject: [PATCH 28/35] [ci skip] committing updated version information --- testing.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 testing.txt diff --git a/testing.txt b/testing.txt new file mode 100644 index 00000000..45b983be --- /dev/null +++ b/testing.txt @@ -0,0 +1 @@ +hi From 31ed3af06f21b0759473f43a75a1e139adaca0fb Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:14:48 -0400 Subject: [PATCH 29/35] try to set the remote url away from https in case it is --- service/publish.bat | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/service/publish.bat b/service/publish.bat index ef0428d9..6ad65827 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -53,7 +53,6 @@ cd %CURDIR% @echo configuring git - relies on build.bat successfully grabbing ziti-ci and build.bat updating service/ziti-tunnel/version.go ziti-ci configure-git 2>&1 -dir *github_* @echo converting shallow clone so travis can co: %GIT_BRANCH% git remote set-branches origin %GIT_BRANCH% 2>&1 @@ -62,10 +61,9 @@ git checkout %GIT_BRANCH% 2>&1 CALL :FAIL %ERRORLEVEL% "checkout failed" @echo git checkout %GIT_BRANCH% complete: %ERRORLEVEL% -@echo issuing status, diff +@echo issuing status @echo ======================================================== git status 2>&1 -git diff 2>&1 git add service/ziti-tunnel/version.go 2>&1 CALL :FAIL %ERRORLEVEL% "git add failed" @@ -76,13 +74,10 @@ git commit -m "[ci skip] committing updated version information" 2>&1 CALL :FAIL %ERRORLEVEL% "git commit failed" @echo git commit -m "[ci skip] committing updated version information" complete: %ERRORLEVEL% @echo ======================================================== - - - - -@echo issuing git status and push +@echo issuing git push @echo ======================================================== -git status 2>&1 +@echo setting git config remote.url git@github.com:openziti/desktop-edge-win.git +git config remote.url git@github.com:openziti/desktop-edge-win.git git push 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% From cc1698715211ad70a536b25cb15a9766e34b86fe Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:21:51 -0400 Subject: [PATCH 30/35] list git config --- service/publish.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/service/publish.bat b/service/publish.bat index 6ad65827..9c2ecb4b 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -78,6 +78,7 @@ CALL :FAIL %ERRORLEVEL% "git commit failed" @echo ======================================================== @echo setting git config remote.url git@github.com:openziti/desktop-edge-win.git git config remote.url git@github.com:openziti/desktop-edge-win.git +git config --list git push 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% From 5019afa63fd25f6741500b8666537715922153a8 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:34:16 -0400 Subject: [PATCH 31/35] issue the dir cmd again --- service/publish.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/service/publish.bat b/service/publish.bat index 9c2ecb4b..82aeb2a7 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -79,6 +79,7 @@ CALL :FAIL %ERRORLEVEL% "git commit failed" @echo setting git config remote.url git@github.com:openziti/desktop-edge-win.git git config remote.url git@github.com:openziti/desktop-edge-win.git git config --list +dir github_deploy_key git push 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% From c16cb0db922cd78cb5975c82b91ed954021b9003 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:47:11 -0400 Subject: [PATCH 32/35] adding ssh -Tv --- service/publish.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/publish.bat b/service/publish.bat index 82aeb2a7..706c1b29 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -69,6 +69,9 @@ git add service/ziti-tunnel/version.go 2>&1 CALL :FAIL %ERRORLEVEL% "git add failed" @echo git add service/ziti-tunnel/version.go complete: %ERRORLEVEL% +@echo issuing ssh -vT -i github_deploy_key git@github.com +ssh -vT -i github_deploy_key git@github.com + @echo issuing commit git commit -m "[ci skip] committing updated version information" 2>&1 CALL :FAIL %ERRORLEVEL% "git commit failed" From 33bf054cd057bcd58349b7744a351cb92b63fcef Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:55:05 -0400 Subject: [PATCH 33/35] redirect stderr to out --- service/publish.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/publish.bat b/service/publish.bat index 706c1b29..9be6ab8b 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -70,7 +70,7 @@ CALL :FAIL %ERRORLEVEL% "git add failed" @echo git add service/ziti-tunnel/version.go complete: %ERRORLEVEL% @echo issuing ssh -vT -i github_deploy_key git@github.com -ssh -vT -i github_deploy_key git@github.com +ssh -vT -i github_deploy_key git@github.com 2>&1 @echo issuing commit git commit -m "[ci skip] committing updated version information" 2>&1 From 683755bed5246636f776d0abd689688d19b9622e Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 17:03:14 -0400 Subject: [PATCH 34/35] try using ssh-keyscan to add github's key --- service/publish.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/service/publish.bat b/service/publish.bat index 9be6ab8b..2a414e5d 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -70,6 +70,7 @@ CALL :FAIL %ERRORLEVEL% "git add failed" @echo git add service/ziti-tunnel/version.go complete: %ERRORLEVEL% @echo issuing ssh -vT -i github_deploy_key git@github.com +ssh-keyscan -H github.com >> ~/.ssh/known_hosts ssh -vT -i github_deploy_key git@github.com 2>&1 @echo issuing commit From 16fb5678d04e4f32c93ca381a9d20cc25e987eb3 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 31 Jul 2020 17:31:12 -0400 Subject: [PATCH 35/35] try again --- service/publish.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/publish.bat b/service/publish.bat index 2a414e5d..58aa5c19 100644 --- a/service/publish.bat +++ b/service/publish.bat @@ -81,10 +81,10 @@ CALL :FAIL %ERRORLEVEL% "git commit failed" @echo issuing git push @echo ======================================================== @echo setting git config remote.url git@github.com:openziti/desktop-edge-win.git -git config remote.url git@github.com:openziti/desktop-edge-win.git -git config --list +git config remote.url git@github.com:openziti/desktop-edge-win.git 2>&1 +git config --list 2>&1 dir github_deploy_key -git push 2>&1 +git push --verbose 2>&1 CALL :FAIL %ERRORLEVEL% "git push failed" @echo git push complete: %ERRORLEVEL% @echo publish script has completed