Donaldson's home run with Cespedes aboard in the fourth inning put the Athletics ahead to stay at 2-0.
Straily (3-2) allowed just one run on four hits, issuing one walk while striking out one.
Sean Doolittle fired two scoreless relief frames and Grant Balfour racked up his 11th save as Oakland reeled off a ninth win in 10 outings to begin a four-game home-and-home rivalry series.
Bumgarner (4-3) was reached for four runs on four hits over 6 2/3 innings, walking five.
Buster Posey knocked in the Giants' only run.
Millions of Getty images now available for free via embed tool
Ray Liotta sues skin care company over use of likeness