The Labor Department and East Coast apple growers reached a compromise yesterday on the admission of Jamaican farm workers, eliminating the possibility that Labor Secretary Ray Marshall might be held in contempt for refusing to obey a court order on the dispute.

The compromise, worked out with Fourth Circuit Court of Appeals Judge Emory Widener, requires the Labor Department to allow in enough Jamaican workers to make up for any shortage of Puerto Rican workers actually arriving to work in orchards in Virginia, West Virginia, Marylands and New York.

The agreement does not affect earlier Labor approval for more than 1,000 Jamaicans to enter Virginia alone, but it does supercede an order from Judge James C. Turk allowing many more Jamaicans to work in the orchards. The Labor Department had refused to obey that order, appealing to a higher court.

Yesterday's agreement appears to have ended a legal battle between apple growers, who wanted the Jamaicans, and Labor, which is required by law to attempt to place U.S. workers, including Puerto Ricans, in jobs.

In Virginia, the resulting work force of about 1,500 to 2,000 pickers should be balanced between Jamaicans, Puerto Ricans and mainland picking crews. This could provide a working test of growers' contentions that the Puerto Rican recruits are not sufficiently hardy and disciplined to handle the long ladders and heavy buckets which are an apple picker's tools.